Skip to content

Commit 7333d41

Browse files
committed
add support native targets and update js/wasm configurations
1 parent 2f7e21f commit 7333d41

File tree

5 files changed

+43
-24
lines changed

5 files changed

+43
-24
lines changed

buildSrc/src/main/kotlin/mcp.multiplatform.gradle.kts

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,28 +31,13 @@ val generateLibVersion by tasks.registering {
3131

3232
kotlin {
3333
jvm {
34-
compilerOptions {
35-
jvmTarget = JvmTarget.JVM_1_8
36-
}
37-
}
38-
39-
iosArm64()
40-
iosX64()
41-
iosSimulatorArm64()
42-
43-
js(IR) {
44-
nodejs {
45-
testTask {
46-
useMocha {
47-
timeout = "30s"
48-
}
49-
}
50-
}
51-
}
52-
53-
wasmJs {
54-
nodejs()
34+
compilerOptions.jvmTarget = JvmTarget.JVM_1_8
5535
}
36+
macosX64(); macosArm64()
37+
linuxX64(); linuxArm64()
38+
mingwX64()
39+
js { nodejs() }
40+
wasmJs { nodejs() }
5641

5742
explicitApi = ExplicitApiMode.Strict
5843
jvmToolchain(21)

gradle.properties

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
kotlin.code.style=official
21
org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8
32
org.gradle.parallel=true
43
org.gradle.caching=true
5-
4+
# Dokka
65
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
76
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
8-
7+
# Kotlin
8+
kotlin.code.style=official
99
kotlin.daemon.jvmargs=-Xmx4G
10+
# MPP
11+
kotlin.mpp.enableCInteropCommonization=true

kotlin-sdk-client/build.gradle.kts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
@file:OptIn(ExperimentalWasmDsl::class)
2+
3+
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
4+
15
plugins {
26
id("mcp.multiplatform")
37
id("mcp.publishing")
@@ -7,6 +11,18 @@ plugins {
711
}
812

913
kotlin {
14+
iosArm64(); iosX64(); iosSimulatorArm64()
15+
watchosX64(); watchosArm64(); watchosSimulatorArm64()
16+
tvosX64(); tvosArm64(); tvosSimulatorArm64()
17+
js {
18+
browser()
19+
nodejs()
20+
}
21+
wasmJs {
22+
browser()
23+
nodejs()
24+
}
25+
1026
sourceSets {
1127
commonMain {
1228
dependencies {

kotlin-sdk-core/build.gradle.kts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
@file:OptIn(ExperimentalWasmDsl::class)
2+
3+
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
4+
15
plugins {
26
id("mcp.multiplatform")
37
id("mcp.publishing")
@@ -7,6 +11,18 @@ plugins {
711
}
812

913
kotlin {
14+
iosArm64(); iosX64(); iosSimulatorArm64()
15+
watchosX64(); watchosArm64(); watchosSimulatorArm64()
16+
tvosX64(); tvosArm64(); tvosSimulatorArm64()
17+
js {
18+
browser()
19+
nodejs()
20+
}
21+
wasmJs {
22+
browser()
23+
nodejs()
24+
}
25+
1026
sourceSets {
1127
commonMain {
1228
dependencies {

0 commit comments

Comments
 (0)