You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generating a new JDK 21 Kotlin Gradle project when using JDK 22 locally results in Kotlin target JDK mismatch causing the sync to fail. For example, new Spring Boot projects automatically set the Java language version using Gradle's JavaToolchain support.
Task List
Steps to reproduce provided
Stacktrace (if present) provided
Example that reproduces the problem uploaded to Github
Full description of the issue provided (see below)
Steps to Reproduce
Create a starter using Java 21 w/o any plugins using Kotlin & Kotlin Gradle
Have JDK 22 as Java Home
Sync project, notice the warning that Kotlin is incompatible with 22 JDK target, it downgrades to 21 automatically Kotlin does not yet support 22 JDK target, falling back to Kotlin JVM_21 JVM target
Change Java sourceCompatability to 17
Try to resync & run the app and notice error: > Inconsistent JVM-target compatibility detected for tasks 'compileJava' (17) and 'kspKotlin' (21).
Expected Behaviour
kspKotlin and compileJava should use the same language version automatically.
Actual Behaviour
kspKotlin and compileJava use different JVM target versions.
Environment Information
Operating System: Mac OS X 14.5 aarch64
Micronaut Version: 4.5.0
JDK Version: JDK22
The text was updated successfully, but these errors were encountered:
Description
Generating a new JDK 21 Kotlin Gradle project when using JDK 22 locally results in Kotlin target JDK mismatch causing the sync to fail. For example, new Spring Boot projects automatically set the Java language version using Gradle's JavaToolchain support.
Task List
Steps to Reproduce
Kotlin does not yet support 22 JDK target, falling back to Kotlin JVM_21 JVM target
> Inconsistent JVM-target compatibility detected for tasks 'compileJava' (17) and 'kspKotlin' (21).
Expected Behaviour
kspKotlin and compileJava should use the same language version automatically.
Actual Behaviour
kspKotlin and compileJava use different JVM target versions.
Environment Information
The text was updated successfully, but these errors were encountered: