Skip to content

Commit 1ba60a9

Browse files
committed
Update Kotlin Gradle Plugin config
1 parent 79b0bc9 commit 1ba60a9

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

plugin/build.gradle.kts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
1+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2+
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
23

34
plugins {
45
`kotlin-dsl`
@@ -28,17 +29,14 @@ kotlin {
2829
jvmToolchain {
2930
languageVersion.set(JavaLanguageVersion.of(8))
3031
}
32+
compilerOptions {
33+
apiVersion = KotlinVersion.KOTLIN_1_4
34+
jvmTarget = JvmTarget.JVM_1_8
35+
freeCompilerArgs = listOf("-opt-in=kotlin.io.path.ExperimentalPathApi")
36+
}
3137
}
3238

3339
tasks {
34-
withType<KotlinCompile> {
35-
kotlinOptions {
36-
apiVersion = "1.4"
37-
jvmTarget = "1.8"
38-
freeCompilerArgs = listOf("-opt-in=kotlin.io.path.ExperimentalPathApi")
39-
}
40-
}
41-
4240
register("format") {
4341
group = "formatting"
4442
description = "Formats source code according to project style."

0 commit comments

Comments
 (0)