plugins {
id "com.android.library"
id "kotlin-android"
}
android {
defaultConfig {
kotlinOptions {
freeCompilerArgs += [
"-opt-in=kotlin.time.ExperimentalTime",
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
]
}
}
}
plugins {
id "org.jetbrains.kotlin.jvm"
}
compileKotlin {
kotlinOptions {
freeCompilerArgs += [
"-opt-in=kotlin.time.ExperimentalTime",
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
]
}
}
Add the following snippet to the root gradle.build
file:
allprojects {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += [
"-opt-in=kotlin.time.ExperimentalTime",
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
]
}
}
}