igor.wojda
08/23/2019, 12:03 PMJavaVersion in kotlinOptions and compileOptions.
I wonder what is the difference between compileOptions and kotlinOptions? When we would use one over another?
android {
//...
kotlinOptions {
// "this" is currently lacking a proper type
// See: https://youtrack.jetbrains.com/issue/KT-31077
val options = this as? KotlinJvmOptions
options?.jvmTarget = JavaVersion.VERSION_1_8.toString()
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}