azabost
03/22/2022, 8:07 AMbuildSrc
directory so I’m skipping that part. In the end, what I’m calling (or at least I should be calling) is simply:
android {
val javaVersion: JavaVersion = JavaVersion.VERSION_11
compileOptions {
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
}
kotlinOptions {
jvmTarget = javaVersion.toString()
}
}
Nevertheless, I’m still seeing a lot of build warnings:
'compileJava' task (current target is 11) and 'compileKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version.
Does anyone have any idea if I’m doing something wrong?azabost
03/22/2022, 8:27 AMallprojects {
tasks.withType(type = org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
kotlinOptions {
jvmTarget = javaVersion.toString()
}
}
}
and it seems to be working well because the warnings disappeared.