forked from jillesvangurp/json-dsl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
117 lines (100 loc) · 2.7 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
@file:OptIn(ExperimentalWasmDsl::class)
import org.jetbrains.kotlin.gradle.dsl.jvm.JvmTargetValidationMode
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
plugins {
kotlin("multiplatform")
kotlin("plugin.serialization")
`maven-publish`
}
repositories {
mavenCentral()
maven(url = "https://jitpack.io") {
content {
includeGroup("com.github.jillesvangurp")
}
}
}
kotlin {
jvm {
// should work for android as well
}
js(IR) {
nodejs {
testTask {
useMocha {
// javascript is a lot slower than Java, we hit the default timeout of 2000
timeout = "60s"
}
}
}
}
linuxX64()
linuxArm64()
mingwX64()
macosX64()
macosArm64()
iosArm64()
iosX64()
iosSimulatorArm64()
wasmJs()
// blocked on kotest assertions wasm release
// wasmWasi()
sourceSets {
commonMain {
dependencies {
implementation(kotlin("stdlib-common"))
}
}
commonTest {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
implementation("io.kotest:kotest-assertions-core:_")
}
}
jvmMain {
dependencies {
implementation(kotlin("stdlib-jdk8"))
}
}
jvmTest {
dependencies {
implementation("com.github.jillesvangurp:kotlin4example:_")
runtimeOnly("org.junit.jupiter:junit-jupiter:_")
implementation(kotlin("test-junit"))
}
}
jsMain {
dependencies {
implementation(kotlin("stdlib-js"))
}
}
jsTest {
dependencies {
implementation(kotlin("test-js"))
}
}
all {
languageSettings.optIn("kotlin.RequiresOptIn")
}
}
}
tasks.withType<KotlinJvmCompile> {
jvmTargetValidationMode.set(JvmTargetValidationMode.WARNING)
kotlinOptions {
// this is the minimum LTS version we support, 8 is no longer supported
jvmTarget = "11"
languageVersion = "1.9"
}
}
publishing {
repositories {
maven {
// GOOGLE_APPLICATION_CREDENTIALS env var must be set for this to work
// public repository is at https://maven.tryformation.com/releases
url = uri("gcs://mvn-public-tryformation/releases")
name = "FormationPublic"
}
}
}