File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
build-logic/jvm/src/main/kotlin Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 11import com.github.vlsi.gradle.dsl.configureEach
2- import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
3+ import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
4+ import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
35
46plugins {
57 id(" java-library" )
@@ -26,12 +28,12 @@ autostyle {
2628 }
2729}
2830
29- tasks.configureEach<KotlinCompile > {
30- kotlinOptions {
31+ tasks.configureEach<KotlinJvmCompile > {
32+ compilerOptions {
3133 if (! name.startsWith(" compileTest" )) {
32- apiVersion = " kotlin.api" .v
34+ apiVersion = KotlinVersion .fromVersion( " kotlin.api" .v)
3335 }
34- freeCompilerArgs + = " -Xjvm-default=all"
36+ freeCompilerArgs.add( " -Xjvm-default=all" )
3537 val jdkRelease = buildParameters.targetJavaVersion.let {
3638 when {
3739 it < 9 -> " 1.8"
@@ -42,8 +44,8 @@ tasks.configureEach<KotlinCompile> {
4244 buildParameters.buildJdkVersion
4345 .takeIf { it > 8 }
4446 ?.let {
45- freeCompilerArgs + = " -Xjdk-release=$jdkRelease "
47+ freeCompilerArgs.add( " -Xjdk-release=$jdkRelease " )
4648 }
47- kotlinOptions. jvmTarget = jdkRelease
49+ jvmTarget = JvmTarget .fromTarget( jdkRelease)
4850 }
4951}
You can’t perform that action at this time.
0 commit comments