This message was deleted.
# releases
s
This message was deleted.
gradlephant 2
party gradlephant 2
🎉 9
p
The code sample of the new configuration api in the release docs is confusing: the old api example contains the same lines 2 times but should differ I guess.
👍 1
s
Currently, you cannot run Gradle on Java 21 because Kotlin lacks support for JDK 21.
Do you know what the most relevant issue in Kotlin's YouTrack would be to follow for this?
m
I just discovered this... https://github.com/melix/astro4j/actions/runs/6276469081/job/17046224619#step:6:31 This is a big deal, since using toolchains is broken in many use cases
Kotlin 1.9 actually supports 21 akaik
m
there's one easy workaround though, in your
buildSrc/build.gradle.kts
, use:
Copy code
tasks.withType<KotlinJvmCompile>().configureEach {
    compilerOptions {
        jvmTarget.set(JvmTarget.JVM_17)
    }
}

tasks.withType<JavaCompile>().configureEach {
    targetCompatibility = "17"
}
so your Kotlin build scripts compile with target 17, then you can still use 21 to run Gradle
maybe Gradle 8.4 should set this by default, if it knows it runs on a higher version of the JVM, automatically set the target kotlin version to the highest supported
this would prevent a few headaches
p
That's a good idea @melix, care to create a feature request?
m