plugins { kotlin("multiplatform") id("kotlinx-serialization") id("com.android.library") } kotlin { val ktor_version = "1.6.6" val settings_version = "0.8.1" android() listOf( iosX64(), iosArm64(), //iosSimulatorArm64() sure all ios dependencies support this target ).forEach { it.binaries.framework { baseName = "shared" } } sourceSets { val commonMain by getting { dependencies { implementation("io.ktor:ktor-client-core:$ktor_version") implementation("io.ktor:ktor-client-logging:$ktor_version") implementation("io.ktor:ktor-client-serialization:$ktor_version") implementation("io.insert-koin:koin-core:3.1.4") implementation("ch.qos.logback:logback-classic:1.2.6") implementation("com.russhwolf:multiplatform-settings:$settings_version") implementation("com.russhwolf:multiplatform-settings-no-arg:$settings_version") implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.3.1") } } val commonTest by getting { dependencies { implementation(kotlin("test-common")) implementation(kotlin("test-annotations-common")) } } val androidMain by getting { dependencies { implementation("io.ktor:ktor-client-cio:$ktor_version") } } val androidTest by getting { dependencies { implementation(kotlin("test-junit")) implementation("junit:junit:4.13.2") } } 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 { implementation("io.ktor:ktor-client-ios:$ktor_version") } } 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) } } } android { compileSdk = 31 sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml") defaultConfig { minSdk = 21 targetSdk = 31 ndk { abiFilters.clear() abiFilters += listOf("armeabi-v7a", "arm64-v8a") } } }