-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
build.gradle
74 lines (69 loc) · 2.12 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
plugins {
id 'org.jetbrains.kotlin.multiplatform'
}
repositories {
mavenCentral()
maven { url "https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev" }
// Coroutines from the outer project are published by previous CI buils step
mavenLocal()
}
kotlin {
jvm()
js(IR) {
nodejs()
}
wasmJs() {
nodejs()
}
macosArm64()
macosX64()
linuxArm64()
linuxX64()
mingwX64()
sourceSets {
commonMain {
dependencies {
implementation kotlin('stdlib-common')
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
}
}
commonTest {
dependencies {
implementation kotlin('test-common')
implementation kotlin('test-annotations-common')
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version"
}
}
jsTest {
dependencies {
implementation kotlin('test-js')
}
}
wasmJsTest {
dependencies {
implementation kotlin('test-wasm-js')
}
}
jvmTest {
dependencies {
implementation kotlin('test')
implementation kotlin('test-junit')
}
}
}
targets {
configure([]) {
tasks.getByName(compilations.main.compileKotlinTaskName).kotlinOptions {
jvmTarget = "1.8"
}
}
}
}
// Drop this configuration when the Node.JS version in KGP will support wasm gc milestone 4
// check it here:
// https://github.com/JetBrains/kotlin/blob/master/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsRootExtension.kt
rootProject.extensions.findByType(org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension.class).with {
// canary nodejs that supports recent Wasm GC changes
it.nodeVersion = "21.0.0-v8-canary202309167e82ab1fa2"
it.nodeDownloadBaseUrl = "https://nodejs.org/download/v8-canary"
}