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 11import kotlinx.benchmark.gradle.JvmBenchmarkTarget
22import org.gradle.jvm.tasks.Jar
3+ import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
34import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
5+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
46
57plugins {
68 id(" kotlin-multiplatform" )
@@ -10,6 +12,7 @@ plugins {
1012
1113evaluationDependsOn(" :kotlinx-collections-immutable" )
1214
15+ @OptIn(ExperimentalKotlinGradlePluginApi ::class )
1316kotlin {
1417 infra {
1518 target(" macosX64" )
@@ -19,10 +22,8 @@ kotlin {
1922 }
2023
2124 jvm {
22- compilations.all {
23- kotlinOptions {
24- jvmTarget = " 1.8"
25- }
25+ compilerOptions {
26+ jvmTarget.set(JvmTarget .JVM_1_8 )
2627 }
2728 }
2829
Original file line number Diff line number Diff line change 11import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile
2+ import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
23
34buildscript {
45 dependencies {
@@ -44,11 +45,15 @@ allprojects {
4445 }
4546 }
4647
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+ }
5053 if (this is KotlinJsCompile ) {
51- kotlinOptions.freeCompilerArgs + = " -Xwasm-enable-array-range-checks"
54+ compilerOptions {
55+ freeCompilerArgs.add(" -Xwasm-enable-array-range-checks" )
56+ }
5257 }
5358 }
5459}
Original file line number Diff line number Diff line change 11import kotlinx.team.infra.mavenPublicationsPom
2+ import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
23import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
4+ import org.jetbrains.kotlin.gradle.dsl.JsModuleKind
5+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
36
47plugins {
58 id(" kotlin-multiplatform" )
@@ -14,6 +17,7 @@ mavenPublicationsPom {
1417 description = " Kotlin Immutable Collections multiplatform library"
1518}
1619
20+ @OptIn(ExperimentalKotlinGradlePluginApi ::class )
1721kotlin {
1822 applyDefaultHierarchyTemplate()
1923 explicitApi()
@@ -46,10 +50,8 @@ kotlin {
4650 watchosDeviceArm64()
4751
4852 jvm {
49- compilations.all {
50- kotlinOptions {
51- jvmTarget = " 1.8"
52- }
53+ compilerOptions {
54+ jvmTarget.set(JvmTarget .JVM_1_8 )
5355 }
5456 }
5557
@@ -61,12 +63,9 @@ kotlin {
6163 }
6264 }
6365 }
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 )
7069 }
7170 }
7271
You can’t perform that action at this time.
0 commit comments