brabo-hi
07/19/2023, 6:03 PMkotlin {
androidTarget {
compilations.all {
kotlinOptions {
jvmTarget = "17"
}
}
}
i am getting the following error 'compileDebugJavaWithJavac' task (current target is 1.8) and 'compileDebugKotlinAndroid' task (current target is 17) jvm target compatibility should be set to the same Java version.Jacob Ras
07/19/2023, 6:05 PMjvmToolchain(17)brabo-hi
07/19/2023, 6:06 PMJacob Ras
07/19/2023, 6:07 PMkotlin {} block.brabo-hi
07/19/2023, 6:08 PMkotlin {
androidTarget {
compilations.all {
kotlinOptions {
jvmTarget = "17"
}
}
}
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}jw
07/19/2023, 6:09 PMandroid {
compileOptions {
sourceCompatibility(JavaVersion.VERSION_17)
targetCompatibility(JavaVersion.VERSION_17)brabo-hi
07/19/2023, 6:13 PMandroid {
compileOptions {
sourceCompatibility(JavaVersion.VERSION_17)
targetCompatibility(JavaVersion.VERSION_17)
}
}
kotlin {
androidTarget {
compilations.all {
kotlinOptions {
jvmTarget = "17"
}
}
}
}Jacob Ras
07/19/2023, 6:15 PMandroid {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
I was very sure I was using the toolchain, forgot I later updated it; removing it in favour of what Jake said 🙂brabo-hi
07/19/2023, 6:26 PMeygraber
07/19/2023, 6:49 PMjw
07/19/2023, 6:51 PMeygraber
07/20/2023, 2:43 AMno reason to use anything but the latest locally
What about on CI?
jw
07/20/2023, 2:45 AMeygraber
07/20/2023, 3:23 AMSanjayKarki
07/20/2023, 5:15 AMMichael Paus
07/20/2023, 7:10 AMjw
07/20/2023, 10:33 AMMichael Paus
07/20/2023, 2:04 PMExecution failed for task ':shared:compileKotlinDesktop'.
> Error while evaluating property 'compilerOptions.jvmTarget' of task ':shared:compileKotlinDesktop'.
> Failed to calculate the value of property 'jvmTarget'.
> Unknown Kotlin JVM target: 20
when I try.jw
07/20/2023, 2:04 PMMichael Paus
07/20/2023, 2:22 PM