-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
86 lines (68 loc) · 1.93 KB
/
build.gradle.kts
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
75
76
77
78
79
80
81
82
83
84
85
86
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("multiplatform") version "2.0.0-RC2"
id("publish") apply false
}
allprojects {
group = "io.github.andreypfau"
version = "0.0.4"
apply(plugin = "kotlin-multiplatform")
repositories {
mavenCentral()
}
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
freeCompilerArgs.add("-Xexpect-actual-classes")
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8)
}
}
kotlin {
explicitApi()
jvm()
iosArm64()
iosSimulatorArm64()
iosX64()
macosArm64()
macosX64()
tvosArm64()
tvosSimulatorArm64()
tvosX64()
watchosArm32()
watchosArm64()
watchosDeviceArm64()
watchosSimulatorArm64()
watchosX64()
mingwX64()
linuxArm64()
linuxX64()
js(IR) {
nodejs()
browser()
}
@OptIn(org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl::class)
wasmJs {
nodejs()
browser()
binaries.executable()
}
sourceSets {
all {
languageSettings.optIn("kotlin.ExperimentalUnsignedTypes")
languageSettings.optIn("kotlin.ExperimentalStdlibApi")
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
all {
if (name.endsWith("Main")) {
kotlin.srcDir("src${if (name.startsWith("common")) "" else "@${name.removeSuffix("Main")}"}")
}
if (name.endsWith("Test")) {
kotlin.srcDir("test${if (name.startsWith("common")) "" else "@${name.removeSuffix("Test")}"}")
}
}
}
}
}