Fix KMP setup for iOS
This commit is contained in:
parent
f155bdfa42
commit
b4c7400a9b
3 changed files with 11 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
|||
buildscript {
|
||||
ext.kotlin_version = '1.4.10'
|
||||
ext.kotlin_version = '1.4.20'
|
||||
ext.coroutines_version = '1.3.2'
|
||||
ext.koin_version = '2.0.1'
|
||||
ext.okhttp_version = '4.2.2'
|
||||
|
@ -9,7 +9,7 @@ buildscript {
|
|||
maven { url "https://kotlin.bintray.com/kotlinx" }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.6.2'
|
||||
classpath 'com.android.tools.build:gradle:4.1.1'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,3 +19,6 @@ android.useAndroidX=true
|
|||
android.enableJetifier=true
|
||||
# Kotlin code style for this project: "official" or "obsolete":
|
||||
kotlin.code.style=official
|
||||
kotlin.incremental.multiplatform=true
|
||||
kotlin.mpp.stability.nowarn=true
|
||||
xcodeproj=../Pi-Helper
|
||||
|
|
|
@ -15,21 +15,21 @@ repositories {
|
|||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
val ktor_version = "+"
|
||||
kotlin {
|
||||
android()
|
||||
ios {
|
||||
binaries {
|
||||
framework {
|
||||
baseName = "shared"
|
||||
baseName = "pihelper"
|
||||
}
|
||||
}
|
||||
}
|
||||
sourceSets {
|
||||
val commonMain by getting {
|
||||
dependencies {
|
||||
implementation("io.ktor:ktor-client-core:$ktor_version")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:+")
|
||||
implementation("io.ktor:ktor-client-core:1.4.2")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.0.1")
|
||||
implementation("io.ktor:ktor-client-serialization:1.4.2")
|
||||
}
|
||||
}
|
||||
val commonTest by getting {
|
||||
|
@ -41,8 +41,7 @@ kotlin {
|
|||
val androidMain by getting {
|
||||
dependencies {
|
||||
implementation("com.google.android.material:material:1.2.0")
|
||||
implementation("io.ktor:ktor-client-serialization-jvm:$ktor_version")
|
||||
api("io.ktor:ktor-client-android:$ktor_version")
|
||||
api("io.ktor:ktor-client-android:1.4.2")
|
||||
}
|
||||
}
|
||||
val androidTest by getting {
|
||||
|
@ -53,8 +52,7 @@ kotlin {
|
|||
}
|
||||
val iosMain by getting {
|
||||
dependencies {
|
||||
implementation("io.ktor:ktor-client-ios:$ktor_version")
|
||||
implementation("io.ktor:ktor-client-serialization-native:$ktor_version")
|
||||
implementation("io.ktor:ktor-client-ios:1.4.2")
|
||||
}
|
||||
}
|
||||
val iosTest by getting
|
||||
|
|
Loading…
Reference in a new issue