File tree Expand file tree Collapse file tree 3 files changed +23
-18
lines changed Expand file tree Collapse file tree 3 files changed +23
-18
lines changed Original file line number Diff line number Diff line change 1
1
import kotlinx.benchmark.gradle.JvmBenchmarkTarget
2
2
import org.gradle.jvm.tasks.Jar
3
+ import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
3
4
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
5
+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
4
6
5
7
plugins {
6
8
id(" kotlin-multiplatform" )
@@ -10,6 +12,7 @@ plugins {
10
12
11
13
evaluationDependsOn(" :kotlinx-collections-immutable" )
12
14
15
+ @OptIn(ExperimentalKotlinGradlePluginApi ::class )
13
16
kotlin {
14
17
infra {
15
18
target(" macosX64" )
@@ -19,10 +22,8 @@ kotlin {
19
22
}
20
23
21
24
jvm {
22
- compilations.all {
23
- kotlinOptions {
24
- jvmTarget = " 1.8"
25
- }
25
+ compilerOptions {
26
+ jvmTarget.set(JvmTarget .JVM_1_8 )
26
27
}
27
28
}
28
29
Original file line number Diff line number Diff line change 1
1
import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile
2
+ import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
2
3
3
4
buildscript {
4
5
dependencies {
@@ -44,11 +45,15 @@ allprojects {
44
45
}
45
46
}
46
47
47
- tasks.withType< org.jetbrains.kotlin.gradle.dsl.KotlinCompile <* >> {
48
- kotlinOptions.allWarningsAsErrors = true
49
- kotlinOptions.freeCompilerArgs + = " -Xexpect-actual-classes"
48
+ tasks.withType(KotlinCompilationTask ::class ).configureEach {
49
+ compilerOptions {
50
+ allWarningsAsErrors = true
51
+ freeCompilerArgs.add(" -Xexpect-actual-classes" )
52
+ }
50
53
if (this is KotlinJsCompile ) {
51
- kotlinOptions.freeCompilerArgs + = " -Xwasm-enable-array-range-checks"
54
+ compilerOptions {
55
+ freeCompilerArgs.add(" -Xwasm-enable-array-range-checks" )
56
+ }
52
57
}
53
58
}
54
59
}
Original file line number Diff line number Diff line change 1
1
import kotlinx.team.infra.mavenPublicationsPom
2
+ import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
2
3
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
4
+ import org.jetbrains.kotlin.gradle.dsl.JsModuleKind
5
+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
3
6
4
7
plugins {
5
8
id(" kotlin-multiplatform" )
@@ -14,6 +17,7 @@ mavenPublicationsPom {
14
17
description = " Kotlin Immutable Collections multiplatform library"
15
18
}
16
19
20
+ @OptIn(ExperimentalKotlinGradlePluginApi ::class )
17
21
kotlin {
18
22
applyDefaultHierarchyTemplate()
19
23
explicitApi()
@@ -46,10 +50,8 @@ kotlin {
46
50
watchosDeviceArm64()
47
51
48
52
jvm {
49
- compilations.all {
50
- kotlinOptions {
51
- jvmTarget = " 1.8"
52
- }
53
+ compilerOptions {
54
+ jvmTarget.set(JvmTarget .JVM_1_8 )
53
55
}
54
56
}
55
57
@@ -61,12 +63,9 @@ kotlin {
61
63
}
62
64
}
63
65
}
64
- compilations.all {
65
- kotlinOptions {
66
- sourceMap = true
67
- moduleKind = " umd"
68
- metaInfo = true
69
- }
66
+ compilerOptions {
67
+ sourceMap = true
68
+ moduleKind.set(JsModuleKind .MODULE_UMD )
70
69
}
71
70
}
72
71
You can’t perform that action at this time.
0 commit comments