diff --git a/docs/src/main/asciidoc/kotlin.adoc b/docs/src/main/asciidoc/kotlin.adoc index 2ff3227ba340a..6dd2319bcb707 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 = 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..4865ac51577f9 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 = JvmTarget.JVM_21 + 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..a6fe8f38513c3 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 = JvmTarget.JVM_21 + 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..781337262c1b9 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 = JvmTarget.JVM_21 + javaParameters = true + } }