benkuly
02/18/2023, 11:58 AMid("io.realm.kotlin")
any magic regarding JVM versions? Since upgrading to Kotlin 1.8.0 and gradle 8.0 I get
Caused by: org.gradle.api.GradleException: 'compileJava' task (current target is 11) and 'compileKotlinJvm' task (current target is 1.8) jvm target compatibility should be set to the same Java version.
Consider using JVM toolchain: <https://kotl.in/gradle/jvm/toolchain>
You can find the build.gradle.kts
file here. It uses JVM toolchain, which works in all the other modules of this project.tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = Versions.kotlinJvmTarget.majorVersion
}
}
But this wasn't required before.withJava()
seems to have fixed the issue.