Stephan Schröder
06/24/2025, 10:01 PMjvmToolchain(24)
and using Kotlin 2.2.0, Gradle 8.14.1, and Amazon's 24.0.1 Corretto JDK a ./gradlew clean build
gives me:
Kotlin does not yet support 24 JDK target, falling back to Kotlin JVM_22 JVM target
Did I understand something wrong, or is this a bug?hho
06/25/2025, 8:29 AMStephan Schröder
06/25/2025, 8:34 AMSzymon Jeziorski
06/25/2025, 8:56 AMkotlin {
jvmToolchain(24)
}
and it compiled just fine with compiled classes properly indicating JVM 24 target.
Maybe double check your setup to ensure nothing is overwriting Kotlin version used for compilationStephan Schröder
06/25/2025, 9:53 AMkotlin {
// uses org.gradle.java.installations.auto-download=false in gradle.properties to disable auto provisioning of JDK
jvmToolchain(JDK.version)
compilerOptions {
extraWarnings = true
//kotlinlang.org/docs/whatsnew22.html#changes-to-default-method-generation-for-interface-functions
jvmDefault = JvmDefaultMode.NO_COMPATIBILITY
}
}
with JDK.version being defined in buildSrc:
object JDK {
const val version = 24
}
I have a multimodule setup, but each uses
kotlin {
// uses org.gradle.java.installations.auto-download=false in gradle.properties to disable auto provisioning of JDK
jvmToolchain(JDK.version)
}
just to reenforce the jdk (and if I remember correctly I do have to reenforce the jvmToolchain.ephemient
06/25/2025, 1:20 PMStephan Schröder
06/25/2025, 6:10 PMephemient
06/25/2025, 6:23 PM