Upgrade Kotlin jvmTarget to match the Java version
MSALAlign the Kotlin jvmTarget with the project's Java version so the Kotlin compiler emits bytecode at the same level as javac. Covers kotlin-maven-plugin <jvmTarget> configuration and the Gradle kotlinOptions { jvmTarget = ... } / compilerOptions { jvmTarget = ... } blocks (Groovy and Kotlin DSL). Will not downgrade if the existing Kotlin target is higher than the requested version.
org. openrewrite. java. migrate. UpgradeKotlinJvmTargetVersionRequired
The Java version to align Kotlin's jvmTarget with.
mod run . --recipe= org. openrewrite. java. migrate. UpgradeKotlinJvmTargetVersion \
-P version=21Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.