-
-
Notifications
You must be signed in to change notification settings - Fork 50
/
build.gradle.kts
190 lines (162 loc) · 5.13 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
import com.mocoding.pokedex.Configuration
import com.mocoding.pokedex.Deps
plugins {
kotlin("multiplatform")
kotlin("native.cocoapods")
kotlin("plugin.serialization")
id("com.android.library")
id("org.jetbrains.compose")
id("kotlin-parcelize")
id("app.cash.sqldelight")
}
@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
kotlin {
jvm("desktop")
androidTarget{
compilations.all {
kotlinOptions {
jvmTarget = "21"
}
}
}
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64(),
).forEach { _ ->
cocoapods {
summary = "Pokedex the Shared Module"
homepage = "Link to the Shared Module homepage"
version = "1.0.0"
ios.deploymentTarget = "14.1"
podfile = project.file("../ios/Podfile")
framework {
baseName = "shared"
isStatic = true
export(Deps.ArkIvanov.Decompose.decompose)
export(Deps.ArkIvanov.Essenty.lifecycle)
}
}
}
sourceSets {
val commonMain by getting {
dependencies {
// Compose
with(compose) {
api(runtime)
api(foundation)
api(material)
api(material3)
api(materialIconsExtended)
}
// Ktor
with(Deps.Io.Ktor) {
api(ktorClientCore)
api(ktorSerializationKotlinxJson)
api(ktorClientContentNegotiation)
api(ktorClientLogging)
}
// Logback for ktor logging
implementation(Deps.Logback.logbackClassic)
// SqlDelight
with(Deps.CashApp.SQLDelight) {
api(coroutinesExtensions)
api(primitiveAdapters)
}
// Koin
with(Deps.Koin) {
api(core)
api(test)
}
// KotlinX Serialization Json
implementation(Deps.Org.JetBrains.Kotlinx.kotlinxSerializationJson)
// Coroutines
implementation(Deps.Org.JetBrains.Kotlinx.coroutinesCore)
// MVIKotlin
with(Deps.ArkIvanov.MVIKotlin) {
api(mvikotlin)
api(mvikotlinMain)
api(mvikotlinExtensionsCoroutines)
}
// Decompose
with(Deps.ArkIvanov.Decompose) {
api(decompose)
api(extensionsCompose)
}
// Image Loading
api(Deps.Github.imageLoader)
implementation(Deps.ArkIvanov.Essenty.lifecycle)
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val androidMain by getting {
dependencies {
// Ktor
implementation(Deps.Io.Ktor.ktorClientAndroid)
// SqlDelight
implementation(Deps.CashApp.SQLDelight.androidDriver)
// Koin
implementation(Deps.Koin.android)
}
}
val androidUnitTest by getting
val desktopMain by getting {
dependsOn(commonMain)
dependencies {
// Ktor
implementation(Deps.Io.Ktor.ktorClientJava)
// SqlDelight
implementation(Deps.CashApp.SQLDelight.sqliteDriver)
}
}
val iosX64Main by getting
val iosArm64Main by getting
val iosSimulatorArm64Main by getting
val iosMain by creating {
dependsOn(commonMain)
iosX64Main.dependsOn(this)
iosArm64Main.dependsOn(this)
iosSimulatorArm64Main.dependsOn(this)
dependencies {
// Ktor
implementation(Deps.Io.Ktor.ktorClientDarwin)
// SqlDelight
implementation(Deps.CashApp.SQLDelight.nativeDriver)
}
}
val iosX64Test by getting
val iosArm64Test by getting
val iosSimulatorArm64Test by getting
val iosTest by creating {
dependsOn(commonTest)
iosX64Test.dependsOn(this)
iosArm64Test.dependsOn(this)
iosSimulatorArm64Test.dependsOn(this)
}
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "21"
}
}
android {
namespace = "com.mocoding.pokedex"
compileSdk = Configuration.compileSdk
defaultConfig {
minSdk = Configuration.minSdk
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
}
sqldelight {
databases {
create("PokemonDatabase") {
packageName.set("com.mocoding.pokedex.core.database")
}
}
}