This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbuild.gradle
117 lines (96 loc) · 2.46 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
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
115
116
117
apply plugin: 'kotlin-multiplatform'
apply plugin: 'kotlinx-serialization'
apply plugin: 'org.jetbrains.kotlin.native.cocoapods'
apply plugin: 'co.touchlab.kotlinxcodesync'
kotlin {
jvm {
}
js {
browser{
}
compileKotlinJs {
kotlinOptions.metaInfo = true
kotlinOptions.sourceMap = true
kotlinOptions.moduleKind = "commonjs"
kotlinOptions.main = "call"
}
}
sourceSets {
commonRelease {}
commonDebug {}
commonMain {
if (rootProject.hasProperty("debug")) {
dependsOn commonDebug
} else {
dependsOn commonRelease
}
dependencies {
api Libs.kotlinxCoroutinesCoreCommon
api Libs.ktorClientCore
api Libs.ktorClientJson
api Libs.ktorClientLogging
api Libs.ktorClientSerialization
}
}
commonTest {
dependencies {
api Libs.kotlinTestCommon
}
}
iOSMain {
dependencies {
api Libs.ktorClientIos
}
}
jvmMain {
dependencies {
}
}
jvmTest {
dependencies {
api Libs.junit
api Libs.kotlinTestJunit
api Libs.kotlinTest
}
}
jsMain {
dependencies {
}
}
jsTest {
dependencies {
}
}
}
targets {
def buildForDevice = project.findProperty("kotlin.native.cocoapods.target") == "ios_arm"
if (buildForDevice) {
iosArm64("iOS64")
iosArm32("iOS32")
def iOSMain = sourceSets.iOSMain
sourceSets["iOS64Main"].dependsOn(iOSMain)
sourceSets["iOS32Main"].dependsOn(iOSMain)
} else {
iosX64("iOS")
}
}
cocoapods {
summary = "Kotlin Multiplatform Template common module"
homepage = "https://github.com/wiyarmir/kotlin-multiplatform-template"
}
}
configurations {
compileClasspath
}
xcode {
projectPath = "../ios/KotlinMultiplatformTemplate.xcodeproj"
target = "KotlinMultiplatformTemplate"
}
detekt {
input = files(
"src/commonMain/kotlin",
"src/iOSMain/kotlin",
"src/jsMain/kotlin",
"src/jvmMain/kotlin",
)
}