Skip to content

Commit 56d2c3e

Browse files
committed
fix: set Kotlin API Version to 1.6
Ensures that the compiled code is compatible with older versions of Kotlin. In the modelix.samples project this fixes an incompatibility with the Kotlin version used by Quarkus (1.7).
1 parent 8cc45ce commit 56d2c3e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

build.gradle.kts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,12 @@ subprojects {
7777
}
7878

7979
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().all {
80-
kotlinOptions {
81-
jvmTarget = "11"
82-
freeCompilerArgs += listOf("-Xjvm-default=all-compatibility")
80+
if (!name.lowercase().contains("test")) {
81+
kotlinOptions {
82+
jvmTarget = "11"
83+
freeCompilerArgs += listOf("-Xjvm-default=all-compatibility")
84+
apiVersion = org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_1_6.version
85+
}
8386
}
8487
}
8588
}

0 commit comments

Comments
 (0)