/
build.gradle.kts
67 lines (62 loc) · 1.58 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
/*
* Copyright 2019 Louis Cognault Ayeva Derman. Use of this source code is governed by the Apache 2.0 license.
*/
plugins {
id("com.android.library")
kotlin("multiplatform")
`maven-publish`
}
android {
setDefaults()
buildTypes.getByName("release").consumerProguardFiles("proguard-rules.pro")
}
kotlin {
android()
macos()
ios()
configure(targets) { configureMavenPublication() }
setupSourceSets()
sourceSets {
commonMain.dependencies {
api(splitties("experimental"))
compileOnly(Libs.kotlinX.coroutines.coreCommon)
}
androidMain.dependencies {
api(splitties("appctx"))
api(Libs.kotlin.stdlibJdk7)
compileOnly(Libs.kotlinX.coroutines.android)
}
nativeMain {
dependencies {
api(Libs.kotlinX.coroutines.coreNative)
}
}
appleMain {
dependencies {
implementation(splitties("mainthread"))
}
}
all {
languageSettings.apply {
useExperimentalAnnotation("kotlin.Experimental")
}
}
commonTest {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
}
}
androidTest {
dependsOn(androidMain)
dependencies {
implementation(Libs.kotlin.testJunit)
}
}
}
}
afterEvaluate {
publishing {
setupAllPublications(project)
}
}