Jorge Domínguez
02/09/2023, 2:15 AMExecution failed for task ':app:kaptGenerateStubsDebugKotlin'.
> 'compileDebugJavaWithJavac' task (current target is 1.8) and 'kaptGenerateStubsDebugKotlin' task (current target is 17) jvm target compatibility should be set to the same Java version.
Consider using JVM toolchain: <https://kotl.in/gradle/jvm/toolchain>
but my Gradle config is:
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
so I'm not sure where target 17 is setup, has somebody experienced the same error?allprojects {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
}
which I guess forces the JVM target version of every Kotlin task, but still don't know what was happening before 🤔Daniele Segato
02/25/2023, 10:57 AMkotlin {
jvmToolchain(11)
}
Also updating your target from 1.8 to 11 as far as I understood.
in all the projects (or 17 depending on what you use).
I posted another question here because I'm also a bit confused by the changes:
https://kotlinlang.slack.com/archives/C0B8M7BUY/p1677325937895979Bruno Braga
03/12/2023, 1:54 AMconstraints {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") {
because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib")
}
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") {
because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
}
}
inside of the dependencies{ } gradle :app.