deviant
11/06/2018, 10:35 AMcompileKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = [
'-Xuse-experimental=kotlinx.coroutines.ObsoleteCoroutinesApi',
'-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi',
"-XXLanguage:+InlineClasses"
]
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = [
'-Xuse-experimental=kotlinx.coroutines.ObsoleteCoroutinesApi',
'-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi',
"-XXLanguage:+InlineClasses"
]
}
}eskatos
11/06/2018, 10:52 AMKotlinCompile tasks the same way
tasks.withType(KotlinCompile) {
// configure all KotlinCompile tasks
}deviant
11/06/2018, 10:55 AMCould not get unknown property 'KotlinCompile' for root project...deviant
11/06/2018, 11:00 AMtasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile.class).all {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = [
'-Xuse-experimental=kotlinx.coroutines.ObsoleteCoroutinesApi',
'-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi',
"-XXLanguage:+InlineClasses"
]
}
}eskatos
11/06/2018, 11:12 AMKotlinCompile class name or import it, also the .all { is not neededgildor
11/06/2018, 11:13 AMgildor
11/06/2018, 11:18 AM