diff --git a/docs/src/main/asciidoc/kotlin.adoc b/docs/src/main/asciidoc/kotlin.adoc index 2ff3227ba340a..767e610cf8af8 100644 --- a/docs/src/main/asciidoc/kotlin.adoc +++ b/docs/src/main/asciidoc/kotlin.adoc @@ -301,9 +301,11 @@ allOpen { // <2> annotation("io.quarkus.test.junit.QuarkusTest") } -tasks.withType { - kotlinOptions.jvmTarget = JavaVersion.VERSION_11.toString() - kotlinOptions.javaParameters = true +kotlin { + compilerOptions { + jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21 + javaParameters = true + } } ---- diff --git a/independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/buildtool/gradle-kotlin-dsl/kotlin/build.tpl.qute.gradle.kts b/independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/buildtool/gradle-kotlin-dsl/kotlin/build.tpl.qute.gradle.kts index 3005bf160cd0b..69dd5db777700 100644 --- a/independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/buildtool/gradle-kotlin-dsl/kotlin/build.tpl.qute.gradle.kts +++ b/independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/buildtool/gradle-kotlin-dsl/kotlin/build.tpl.qute.gradle.kts @@ -25,7 +25,9 @@ allOpen { annotation("io.quarkus.test.junit.QuarkusTest") } -tasks.withType { - kotlinOptions.jvmTarget = JavaVersion.VERSION_{java.version}.toString() - kotlinOptions.javaParameters = true +kotlin { + compilerOptions { + jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_{java.version} + javaParameters = true + } } diff --git a/integration-tests/devtools/src/test/resources/__snapshots__/KotlinSerializationCodestartTest/testGradleKotlinContent/build.gradle.kts b/integration-tests/devtools/src/test/resources/__snapshots__/KotlinSerializationCodestartTest/testGradleKotlinContent/build.gradle.kts index 29e2753624387..4206a766670ad 100644 --- a/integration-tests/devtools/src/test/resources/__snapshots__/KotlinSerializationCodestartTest/testGradleKotlinContent/build.gradle.kts +++ b/integration-tests/devtools/src/test/resources/__snapshots__/KotlinSerializationCodestartTest/testGradleKotlinContent/build.gradle.kts @@ -43,7 +43,9 @@ allOpen { annotation("io.quarkus.test.junit.QuarkusTest") } -tasks.withType { - kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString() - kotlinOptions.javaParameters = true +kotlin { + compilerOptions { + jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17 + javaParameters = true + } } diff --git a/integration-tests/gradle/src/main/resources/conditional-dependencies-kotlin/build.gradle.kts b/integration-tests/gradle/src/main/resources/conditional-dependencies-kotlin/build.gradle.kts index 007458ade94b9..5dea13880a16b 100644 --- a/integration-tests/gradle/src/main/resources/conditional-dependencies-kotlin/build.gradle.kts +++ b/integration-tests/gradle/src/main/resources/conditional-dependencies-kotlin/build.gradle.kts @@ -45,7 +45,9 @@ allOpen { annotation("io.quarkus.test.junit.QuarkusTest") } -tasks.withType { - kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString() - kotlinOptions.javaParameters = true +kotlin { + compilerOptions { + jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17 + javaParameters = true + } }