-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle.kts
72 lines (69 loc) · 1.83 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
plugins {
`maven-publish`
kotlin("multiplatform")
kotlin("plugin.serialization")
}
description = "API to access models stored in Modelix"
kotlin {
jvm()
js(IR) {
nodejs {
testTask {
useMocha {
timeout = "10s"
}
}
}
useCommonJs()
}
sourceSets {
val commonMain by getting {
dependencies {
api(project(":kotlin-utils"))
implementation(kotlin("stdlib-common"))
implementation(libs.kotlin.logging)
implementation(libs.kotlin.serialization.json)
implementation(libs.kotlin.coroutines.core)
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val jvmMain by getting {
dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(libs.kotlin.coroutines.core)
}
}
val jvmTest by getting {
dependencies {
}
}
val jsMain by getting {
dependencies {
implementation(kotlin("stdlib-js"))
api(npm("@modelix/ts-model-api", rootDir.resolve("ts-model-api")))
implementation(libs.kotlin.coroutines.core)
}
kotlin.srcDir(rootDir.resolve("ts-model-api").resolve("build/dukat"))
}
val jsTest by getting {
dependencies {
}
}
}
}
listOf(
"sourcesJar",
"jsSourcesJar",
"jsPackageJson",
"compileKotlinJs",
"jsProcessResources",
).forEach {
tasks.named(it) {
dependsOn(":ts-model-api:npm_run_build")
dependsOn(":ts-model-api:patchKotlinExternals")
}
}