-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
86 lines (79 loc) · 2.48 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
75
76
77
78
79
80
81
82
83
84
85
86
buildscript {
ext {
versions = [
kotlin:'1.4.21',
serialization:'1.0.1',
ktor:'1.5.1',
nodePlugin:'3.0.0-rc7',
carp:'1.0.0-alpha.29',
]
}
dependencies {
// Kotlin plugins.
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath "org.jetbrains.kotlin:kotlin-serialization:${versions.kotlin}"
// JS plugins.
classpath "com.github.node-gradle:gradle-node-plugin:${versions.nodePlugin}"
}
repositories {
jcenter()
gradlePluginPortal()
}
}
group 'dk.cachet.carp.httpclient'
version "${versions.carp}"
repositories {
jcenter()
}
apply plugin: 'kotlin-multiplatform'
apply plugin: 'kotlinx-serialization'
apply plugin: 'com.github.node-gradle.node'
kotlin {
jvm()
js(LEGACY) {
binaries.executable()
browser()
}
sourceSets {
commonMain {
dependencies {
implementation "io.ktor:ktor-client-core:${versions.ktor}"
implementation "io.ktor:ktor-client-json:${versions.ktor}"
implementation "io.ktor:ktor-client-serialization:${versions.ktor}"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-core:${versions.serialization}"
api "dk.cachet.carp.studies:carp.studies.core:${versions.carp}"
}
}
commonTest {
dependencies {
implementation kotlin('test-common')
implementation kotlin('test-annotations-common')
}
}
jvmMain {
dependencies {
implementation "io.ktor:ktor-client-okhttp:${versions.ktor}"
implementation "io.ktor:ktor-client-json-jvm:${versions.ktor}"
implementation "io.ktor:ktor-client-serialization-jvm:${versions.ktor}"
}
}
jvmTest {
dependencies {
implementation kotlin('test')
implementation kotlin('test-junit')
}
}
jsMain {
dependencies {
implementation "io.ktor:ktor-client-js:${versions.ktor}"
implementation "io.ktor:ktor-client-json-js:${versions.ktor}"
implementation "io.ktor:ktor-client-serialization-js:${versions.ktor}"
}
}
jsTest {
dependencies {
implementation kotlin('test-js')
}
}
}
}