Skip to content

Commit

Permalink
Merge pull request quarkusio#43893 from geoand/kotlin-options
Browse files Browse the repository at this point in the history
Use newer way of configuring the Kotlin compiler in Gradle
  • Loading branch information
gsmet authored Oct 17, 2024
2 parents 63376ae + b17021b commit 571634c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
8 changes: 5 additions & 3 deletions docs/src/main/asciidoc/kotlin.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,11 @@ allOpen { // <2>
annotation("io.quarkus.test.junit.QuarkusTest")
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = JavaVersion.VERSION_11.toString()
kotlinOptions.javaParameters = true
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21
javaParameters = true
}
}
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ allOpen {
annotation("io.quarkus.test.junit.QuarkusTest")
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = JavaVersion.VERSION_{java.version}.toString()
kotlinOptions.javaParameters = true
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_{java.version}
javaParameters = true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ allOpen {
annotation("io.quarkus.test.junit.QuarkusTest")
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString()
kotlinOptions.javaParameters = true
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
javaParameters = true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ allOpen {
annotation("io.quarkus.test.junit.QuarkusTest")
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString()
kotlinOptions.javaParameters = true
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
javaParameters = true
}
}

0 comments on commit 571634c

Please sign in to comment.