Use the jvmTarget provider syntax in Kotlin compilerOptions

Proprietary

In Gradle Kotlin DSL build scripts, replace the legacy jvmTarget = "X" string assignment inside a compilerOptions (or kotlinOptions) block with the modern Provider-style jvmTarget.set(JvmTarget.JVM_X), adding the JvmTarget import. The string-assignment form does not compile against the compilerOptions DSL, where jvmTarget is a Property<JvmTarget>.

org.openrewrite.kotlin.migrate.UseJvmTargetProviderSyntax
mod run . --recipe=org.openrewrite.kotlin.migrate.UseJvmTargetProviderSyntax

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