Skip to content

Commit

Permalink
Change kotlin gradle plugin compiler option format
Browse files Browse the repository at this point in the history
Signed-off-by: Taeik Lim <[email protected]>
  • Loading branch information
acktsap committed Mar 8, 2024
1 parent ef389c9 commit 688aae2
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion

plugins {
id("org.jetbrains.kotlin.jvm")
Expand All @@ -7,15 +8,12 @@ plugins {

kotlin {
jvmToolchain(17) // use this version when development
}

tasks.withType<KotlinCompile> {
kotlinOptions {
compilerOptions {
freeCompilerArgs = listOf(
"-Xjsr305=strict", // enable jsr305 null-safety in kotlin
)
jvmTarget = "17" // make class files for this version
languageVersion = "1.6" // code level
apiVersion = "1.6" // runtime level
jvmTarget = JvmTarget.JVM_17 // make class files for this version
languageVersion = KotlinVersion.KOTLIN_1_6 // code level
apiVersion = KotlinVersion.KOTLIN_1_6 // runtime level
}
}

0 comments on commit 688aae2

Please sign in to comment.