rmyhal
03/02/2021, 12:39 PMios
and iosX64
configurations for running tests for commonTest
and don’t see android?. Project has two targets: android & ios. Thanks.
gradle config:
plugins {
kotlin("multiplatform")
id("com.android.library")
}
kotlin {
android()
ios {
binaries {
framework {
baseName = "shared"
}
}
}
val isiOSDevice = System.getenv("SDK_NAME").orEmpty().startsWith("iphoneos")
if (isiOSDevice) {
iosArm64("ios")
} else {
iosX64("ios")
}
sourceSets {
val commonTest by getting {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
}
}
}
explicitApi()
}
android {
compileSdkVersion(30)
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
defaultConfig {
minSdkVersion(23)
targetSdkVersion(30)
}
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
}
}
Thomas Myrden
03/02/2021, 12:45 PMif (isiOSDevice) {
iosArm64("ios")
} else {
iosX64("ios")
}
russhwolf
03/02/2021, 2:17 PMKris Wong
03/02/2021, 2:37 PMios
block, and once in the block below thatrmyhal
03/03/2021, 10:09 AMandroidUnitTest
and ios