-
Notifications
You must be signed in to change notification settings - Fork 266
/
build.gradle.kts
124 lines (104 loc) · 3.24 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.android.library)
alias(libs.plugins.kotlinx.serialization)
alias(libs.plugins.sqlDelight)
alias(libs.plugins.ksp)
alias(libs.plugins.jetbrainsCompose)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.skie)
id("io.github.luca992.multiplatform-swiftpackage") version "2.2.3"
}
android {
compileSdk = libs.versions.compileSdk.get().toInt()
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
defaultConfig {
minSdk = libs.versions.minSdk.get().toInt()
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
namespace = "com.surrus.common"
}
kotlin {
jvmToolchain(17)
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach {
it.binaries.framework {
baseName = "common"
}
}
androidTarget()
jvm()
js(IR) {
useCommonJs()
browser()
}
sourceSets {
commonMain.dependencies {
implementation(libs.bundles.ktor.common)
implementation(libs.kotlinx.coroutines)
api(libs.kotlinx.serialization)
implementation(libs.sqldelight.runtime)
implementation(libs.sqldelight.coroutines.extensions)
api(libs.koin.core)
implementation(libs.koin.compose.multiplatform)
implementation(libs.koin.test)
api(libs.kermit)
implementation(compose.ui)
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material3)
implementation(compose.components.resources)
implementation(libs.androidx.lifecycle.compose.kmp)
implementation(libs.androidx.lifecycle.viewmodel.kmp)
}
commonTest.dependencies {
implementation(libs.koin.test)
implementation(libs.kotlinx.coroutines.test)
implementation(kotlin("test"))
}
androidMain.dependencies {
implementation(libs.ktor.client.android)
implementation(libs.sqldelight.android.driver)
implementation(libs.osmdroidAndroid)
implementation(libs.osm.android.compose)
}
jvmMain.dependencies {
implementation(libs.ktor.client.java)
implementation(libs.sqldelight.sqlite.driver)
implementation(libs.slf4j)
}
appleMain.dependencies {
implementation(libs.ktor.client.darwin)
implementation(libs.sqldelight.native.driver)
}
jsMain.dependencies {
implementation(libs.ktor.client.js)
}
}
}
sqldelight {
databases {
create("PeopleInSpaceDatabase") {
packageName.set("com.surrus.peopleinspace.db")
}
}
}
multiplatformSwiftPackage {
packageName("PeopleInSpaceKit")
swiftToolsVersion("5.9")
targetPlatforms {
iOS { v("14") }
}
}
kotlin.sourceSets.all {
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
languageSettings.optIn("kotlin.experimental.ExperimentalObjCName")
}
skie {
features {
enableSwiftUIObservingPreview = true
}
}