I am trying to upgrade project from java 17 to jav...
# gradle
m
I am trying to upgrade project from java 17 to java 21. Gradle version is 8.4. I have done the same on another project fra 17 to 21 and gradle version was also 8.4. But in this project I got this error:
Copy code
FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':compileKotlin'.
> Unknown Kotlin JVM target: 21
Copy code
kotlin {
    jvmToolchain {
        languageVersion.set(JavaLanguageVersion.of(21))
    }
}
Anyone know how I can solve this issues?
t
Please make sure you are using Kotlin Gradle plugin 1.9.20. Otherwise you need to explicetly specify jvm target with lower version
v
Which Kotlin version?
The first to support 21 is 1.9.20
m
Copy code
kotlin("jvm") version "1.9.10"
ah I see 🙂
👌 1
I did not see that tiny change hehe 🙂 Thank you!
👌 1