Hello, what could be the problem that I see only `...
# multiplatform
r
Hello, what could be the problem that I see only
ios
and
iosX64
configurations for running tests for
commonTest
and don’t see android?. Project has two targets: android & ios. Thanks. gradle config:
Copy code
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"
    }
}
t
Copy code
if (isiOSDevice) {
        iosArm64("ios")
    } else {
        iosX64("ios")
    }
r
It’s a longstanding bug which is fixed in newer IDEA versions and in the most recent AS canary versions. I don’t think it’s made it to AS stable yet.
👍 1
k
to my knowledge the KMM plugin only supports running tests on iOS devices. also, unrelated, you are declaring your iOS targets twice.
once in the
ios
block, and once in the block below that
so you'll have iosArm64, iosX64, and ios
👍 1
r
thanks! Checked on AS beta 5 and now I see
androidUnitTest
and
ios