File tree Expand file tree Collapse file tree 4 files changed +21
-19
lines changed Expand file tree Collapse file tree 4 files changed +21
-19
lines changed Original file line number Diff line number Diff line change @@ -77,19 +77,19 @@ subprojects {
77
77
val kotlinApiVersion = org.jetbrains.kotlin.gradle.dsl.KotlinVersion .KOTLIN_1_6
78
78
subproject.tasks.withType< org.jetbrains.kotlin.gradle.tasks.KotlinCompile > ().configureEach {
79
79
if (! name.lowercase().contains(" test" )) {
80
- this .kotlinOptions {
81
- jvmTarget = " 11 "
82
- freeCompilerArgs + = listOf (" -Xjvm-default=all-compatibility" , " -Xexpect-actual-classes" )
83
- apiVersion = kotlinApiVersion.version
80
+ this .compilerOptions {
81
+ jvmTarget.set( JvmTarget . JVM_11 )
82
+ freeCompilerArgs.addAll( listOf (" -Xjvm-default=all-compatibility" , " -Xexpect-actual-classes" ) )
83
+ apiVersion.set(kotlinApiVersion)
84
84
}
85
85
}
86
86
}
87
87
subproject.tasks.withType< org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile > ().configureEach {
88
88
if (! name.lowercase().contains(" test" )) {
89
- this .kotlinOptions {
90
- jvmTarget = " 11 "
91
- freeCompilerArgs + = listOf (" -Xjvm-default=all-compatibility" )
92
- apiVersion = kotlinApiVersion.version
89
+ this .compilerOptions {
90
+ jvmTarget.set( JvmTarget . JVM_11 )
91
+ freeCompilerArgs.addAll( listOf (" -Xjvm-default=all-compatibility" ) )
92
+ apiVersion.set(kotlinApiVersion)
93
93
}
94
94
}
95
95
}
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ plugins {
3
3
}
4
4
5
5
kotlin {
6
+ jvmToolchain(11 )
6
7
js(IR ) {
7
8
browser {
8
9
testTask {
@@ -13,7 +14,6 @@ kotlin {
13
14
}
14
15
}
15
16
jvm {
16
- jvmToolchain(11 )
17
17
testRuns[" test" ].executionTask.configure {
18
18
useJUnitPlatform()
19
19
}
Original file line number Diff line number Diff line change
1
+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2
+
1
3
/*
2
4
* Licensed under the Apache License, Version 2.0 (the "License");
3
5
* you may not use this file except in compliance with the License.
@@ -91,13 +93,11 @@ val generateVersionVariable by tasks.registering {
91
93
92
94
tasks.withType< org.jetbrains.kotlin.gradle.tasks.KotlinCompile > ().all {
93
95
dependsOn(generateVersionVariable)
94
- kotlinOptions {
95
- jvmTarget = " 11 "
96
- freeCompilerArgs + = listOf (" -Xjvm-default=all-compatibility" )
96
+ compilerOptions {
97
+ jvmTarget.set( JvmTarget . JVM_11 )
98
+ freeCompilerArgs.add (" -Xjvm-default=all-compatibility" )
97
99
}
98
100
}
99
101
tasks.withType< org.jetbrains.kotlin.gradle.tasks.KotlinCompileCommon > ().all {
100
102
dependsOn(generateVersionVariable)
101
- kotlinOptions {
102
- }
103
103
}
Original file line number Diff line number Diff line change
1
+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2
+
1
3
/*
2
4
* Licensed under the Apache License, Version 2.0 (the "License");
3
5
* you may not use this file except in compliance with the License.
@@ -72,13 +74,13 @@ kotlin {
72
74
}
73
75
74
76
tasks.withType< org.jetbrains.kotlin.gradle.tasks.KotlinCompile > ().all {
75
- kotlinOptions {
76
- jvmTarget = " 11 "
77
- freeCompilerArgs + = listOf (" -Xjvm-default=all-compatibility" , " -Xcontext-receivers" )
77
+ compilerOptions {
78
+ jvmTarget.set( JvmTarget . JVM_11 )
79
+ freeCompilerArgs.addAll (" -Xjvm-default=all-compatibility" , " -Xcontext-receivers" )
78
80
}
79
81
}
80
82
tasks.withType< org.jetbrains.kotlin.gradle.tasks.KotlinCompileCommon > ().all {
81
- kotlinOptions {
82
- freeCompilerArgs + = listOf (" -Xcontext-receivers" )
83
+ compilerOptions {
84
+ freeCompilerArgs.add (" -Xcontext-receivers" )
83
85
}
84
86
}
You can’t perform that action at this time.
0 commit comments