-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
76 lines (67 loc) · 1.69 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
plugins {
kotlin("multiplatform") version "1.4.20"
id("maven-publish")
}
group = "com.koenichiwa"
version = "0.2.0"
repositories {
mavenLocal()
mavenCentral()
}
kotlin {
jvm()
js()
// macosX64()
// linuxArm64()
sourceSets {
// Common
val commonMain by getting {
dependencies {
implementation(kotlin("stdlib-common"))
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
}
}
// Build Types
// JVM
jvm().compilations["main"].defaultSourceSet {
dependsOn(commonMain)
dependencies {
implementation(kotlin("stdlib-jdk8"))
}
}
jvm().compilations["test"].defaultSourceSet {
dependsOn(commonTest)
dependencies {
implementation(kotlin("test-junit"))
}
}
// Javascript
js().compilations["main"].defaultSourceSet {
dependsOn(commonMain)
dependencies {
implementation(kotlin("stdlib-js"))
}
}
js().compilations["test"].defaultSourceSet {
dependsOn(commonTest)
dependencies {
implementation(kotlin("kotlin-test-js"))
}
}
/*
// Mac
macosX64().compilations["main"].defaultSourceSet {
dependsOn(commonMain)
}
//Linux
linuxX64().compilations["main"].defaultSourceSet {
dependsOn(commonMain)
}
*/
}
}