deviant
10/31/2018, 3:18 PMcompileKotlin {
kotlinOptions {
freeCompilerArgs = ['-Xuse-experimental=kotlinx.coroutines.ObsoleteCoroutinesApi']
}
}
dave08
10/31/2018, 3:20 PMJonathan
10/31/2018, 3:24 PMdeviant
10/31/2018, 3:51 PMdave08
10/31/2018, 6:07 PMtasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
freeCompilerArgs += [
'-Xuse-experimental=kotlinx.coroutines.ObsoleteCoroutinesApi',
'-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi'
]
}
}
The +=
adds more options (just in case you already have some elsewhere), and Experimental
is for things like Dispatchers.Unconfined
.rocketraman
11/01/2018, 3:44 PMdave08
11/01/2018, 4:23 PMuse-experimental
though... for me I just put this where I do have it on my classpath.rocketraman
11/01/2018, 4:36 PMdave08
11/01/2018, 4:39 PMrocketraman
11/01/2018, 4:48 PM"-Xuse-experimental=kotlin.Experimental"
to your list abovedave08
11/01/2018, 4:50 PMrocketraman
11/01/2018, 4:50 PM@UseExperimental(ObsoleteCoroutinesApi::class)
UseExperimental
itself needs the flagdave08
11/01/2018, 4:52 PMrocketraman
11/01/2018, 4:56 PM@ObsoleteCoroutinesApi
directlyPaul Woitaschek
11/02/2018, 1:01 PMe: Experimental API marker kotlinx.coroutines.ObsoleteCoroutinesApi is unresolved. Please make sure it's present in the module dependencies
e: Experimental API marker kotlinx.coroutines.ExperimentalCoroutinesApi is unresolved. Please make sure it's present in the module dependencies
> Task :rx:compileDebugKotlin FAILED
Is there a solution for this?louiscad
11/02/2018, 1:01 PMPaul Woitaschek
11/02/2018, 1:20 PMlouiscad
11/02/2018, 1:24 PM