-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
109 lines (94 loc) · 2.41 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
plugins {
kotlin("multiplatform") version "1.6.10"
id("com.android.library") version "7.0.3"
id("convention.publication")
id("binary-compatibility-validator") version "0.8.0"
id("io.gitlab.arturbosch.detekt") version "1.19.0"
}
group = "com.doublesymmetry"
version = "0.0.3"
repositories {
google()
mavenCentral()
}
android {
compileSdk = 32
defaultConfig {
minSdk = 21
targetSdk = 32
}
}
kotlin {
android {
publishAllLibraryVariants()
publishLibraryVariantsGroupedByFlavor = true
}
macosX64()
iosArm32()
iosArm64()
iosX64()
watchosArm32()
watchosArm64()
watchosX86()
watchosX64()
tvosArm64()
tvosX64()
macosArm64()
iosSimulatorArm64()
watchosSimulatorArm64()
tvosSimulatorArm64()
val nativeTargets = listOf(
"macosX64",
"iosArm32",
"iosArm64",
"iosX64",
"watchosArm32",
"watchosArm64",
"watchosX86",
"watchosX64",
"tvosArm64",
"tvosX64",
"macosArm64",
"iosSimulatorArm64",
"watchosSimulatorArm64",
"tvosSimulatorArm64"
)
sourceSets {
val commonMain by getting {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1")
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.1")
}
}
val androidMain by getting {
dependencies {
api("androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1")
}
}
val androidTest by getting
val darwinMain by creating {
dependsOn(commonMain)
dependencies {
implementation("org.jetbrains.kotlinx:atomicfu:0.17.2")
}
}
val darwinTest by creating {
dependsOn(commonTest)
}
with(nativeTargets) {
map { "${it}Main" }.forEach { getByName(it).dependsOn(darwinMain) }
map { "${it}Test" }.forEach { getByName(it).dependsOn(darwinTest) }
}
all {
languageSettings {
optIn("kotlin.RequiresOptIn")
optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
}
}
}
}