orbit-mvi
orbit-mvi copied to clipboard
KMM example (orbit-sample-posts-multiplatform) not compiling
I am using M1 Pro. With org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.20 which give the following error when executing target iosApp with iosSimulatorArm64() profile Here is my common setting info:
plugins {
kotlin("multiplatform")
kotlin("native.cocoapods")
kotlin("kapt")
id("com.android.library")
id("kotlin-parcelize")
kotlin("plugin.serialization") version "1.5.21"
id("org.orbit-mvi.orbit.swift") version "0.1.0"
}
// CocoaPods requires the podspec to have a version.
kotlin {
android()
ios()
iosSimulatorArm64()
cocoapods {
version = "1.0.0"
summary = "test"
homepage = "https://test.com/"
ios.deploymentTarget = "14.1"
podfile = project.file("../iosApp/Podfile")
framework {
baseName = "shared"
}
}
sourceSets {
@Suppress("UnusedPrivateMember")
val commonMain by getting {
dependencies {
api("org.orbit-mvi:orbit-core:4.3.2")
api("dev.icerock.moko:mvvm-core:0.13.0") // only ViewModel, EventsDispatcher, Dispatchers.UI
implementation("dev.icerock.moko:parcelize:0.8.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2")
implementation("io.ktor:ktor-client-core:1.6.8")
implementation("io.ktor:ktor-client-serialization:1.6.8")
implementation("io.insert-koin:koin-core:3.1.6")
}
}
@Suppress("UnusedPrivateMember")
val commonTest by getting {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
}
}
@Suppress("UnusedPrivateMember")
val androidMain by getting {
dependencies {
implementation("io.ktor:ktor-client-android:1.6.8")
implementation("org.orbit-mvi:orbit-viewmodel:4.3.2")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0-alpha03")
// Dependency Injection
implementation("io.insert-koin:koin-android:3.1.2")
}
}
// @Suppress("UnusedPrivateMember")
// val androidTest by getting {
// dependencies {
// implementation(kotlin("test-junit"))
// implementation("junit:junit:4.13.2")
// }
// }
@Suppress("UnusedPrivateMember")
val iosMain by getting {
dependencies {
implementation("io.ktor:ktor-client-ios:1.6.8")
}
}
@Suppress("UnusedPrivateMember")
val iosTest by getting
}
}
android {
compileSdk = 30
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
defaultConfig {
minSdk = 23
targetSdk = 30
}
}
Unfortunately the orbit-swift-gradle-plugin is in a kind of stale state 😞 - Update orbit-swift-gradle-plugin to Kotlin 1.6.10. Until it comes back to life, you can create the boilerplate code by hand, see here how.
@GuilhE Ohhh! Thanks very much. So we will wait when KMM comes to Beta:)