Edoardo Luppi
07/01/2023, 10:00 AMbuild.gradle.kts
?Robert Munro
07/01/2023, 1:16 PMsourceSets {
all {
languageSettings.optIn("kotlin.time.ExperimentalTime")
languageSettings.optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
languageSettings.optIn("kotlinx.serialization.ExperimentalSerializationApi")
}
this is for an optin if thats what you wantEdoardo Luppi
07/01/2023, 1:47 PM-Xdebug
Robert Munro
07/01/2023, 1:47 PMRobert Munro
07/01/2023, 1:48 PMRobert Munro
07/01/2023, 1:49 PMEdoardo Luppi
07/01/2023, 1:49 PMRobert Munro
07/01/2023, 1:54 PMEdoardo Luppi
07/01/2023, 1:56 PMcommonTest
tests on the JVM as of now, yes.
I'd like to test out -Xdebug
as any enhancement on DevEx is a +1 when I'll get to present a multiplatform POCEdoardo Luppi
07/01/2023, 1:57 PMRobert Munro
07/01/2023, 2:05 PMRobert Munro
07/01/2023, 2:15 PMRobert Munro
07/01/2023, 2:17 PMEdoardo Luppi
07/01/2023, 2:32 PMsocket
, connect
and serviceLevel
at that point.
Which makes the debug experience miserableRobert Munro
07/01/2023, 2:36 PMRobert Munro
07/01/2023, 2:37 PMRobert Munro
07/01/2023, 2:38 PMandroid {
javaCompileOptions {
compileOptions {
arguments += ["-Xebug":true]
}
}
}
Robert Munro
07/01/2023, 2:43 PMRobert Munro
07/01/2023, 2:44 PMEdoardo Luppi
07/01/2023, 3:15 PMval configuration: KotlinCompilationTask<*>.() -> Unit = {
val isDebug = project.property("your.debug.prop")
if (isDebug == "true") {
compilerOptions {
freeCompilerArgs.add("-Xdebug")
}
}
}
tasks.named<KotlinCompilationTask<*>>("compileKotlinJvm", configuration)
tasks.named<KotlinCompilationTask<*>>("compileTestKotlinJvm", configuration)
This does the trick it seems.