Upgrade Kotlin jvmTarget to match the Java version

MSAL

Align 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.UpgradeKotlinJvmTargetVersion

Required

The Java version to align Kotlin's jvmTarget with.

mod run . --recipe=org.openrewrite.java.migrate.UpgradeKotlinJvmTargetVersion \ -P version=21

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.