diff --git a/build-logic/convention/build.gradle.kts b/build-logic/convention/build.gradle.kts index c7a111bc5..e37f7a612 100644 --- a/build-logic/convention/build.gradle.kts +++ b/build-logic/convention/build.gradle.kts @@ -14,7 +14,8 @@ * limitations under the License. */ -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile plugins { `kotlin-dsl` @@ -29,9 +30,9 @@ java { targetCompatibility = JavaVersion.values()[javaVersion - 1] } -tasks.withType().configureEach { - kotlinOptions { - jvmTarget = "$javaVersion" +tasks.withType().configureEach { + compilerOptions { + jvmTarget.set(JvmTarget.valueOf("JVM_$javaVersion")) } }