-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
87 lines (81 loc) · 2.36 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
plugins {
kotlin("multiplatform")
id("com.android.library")
kotlin("plugin.serialization")
}
kotlin {
android()
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach {
it.binaries.framework {
baseName = "RssReader"
}
}
sourceSets {
/*
Source sets structure
common
├─ android
├─ ios
├─ iosX64
├─ iosArm64
├─ iosSimulatorArm64
*/
val commonMain by getting {
dependencies {
//Network
implementation(libs.ktor.core)
implementation(libs.ktor.logging)
//Coroutines
implementation(libs.kotlinx.coroutines.core)
//Logger
implementation(libs.napier)
//JSON
implementation(libs.kotlinx.serialization.json)
//Key-Value storage
implementation(libs.multiplatform.settings)
// DI
api(libs.koin.core)
}
}
val androidMain by getting {
dependencies {
//Network
implementation(libs.ktor.client.okhttp)
}
}
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 {
//Network
implementation(libs.ktor.client.ios)
}
}
}
}
android {
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
compileSdk = (findProperty("android.compileSdk") as String).toInt()
defaultConfig {
minSdk = (findProperty("android.minSdk") as String).toInt()
targetSdk = (findProperty("android.targetSdk") as String).toInt()
}
compileOptions {
// Flag to enable support for the new language APIs
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
dependencies {
coreLibraryDesugaring(libs.desugar.jdk.libs)
}
}