https://kotlinlang.org logo
#kotest
Title
# kotest
s

Sam

03/21/2023, 1:20 AM
Has anyone here successfully used Kotest with KMM? For some reason if I add any Kotest deps to
commonTest
Android Studio just... stops acknowledging the existence of sourcesets other than Android. There's no error, syntax highlighting and everything else just... break. Does this look normal?
Copy code
val commonTest by getting {
        dependencies {
            implementation(kotlin("test"))
            implementation("app.cash.turbine:turbine:0.12.1")
            implementation("io.kotest:kotest-assertions-core:$kotestVersion")
            implementation("io.kotest:kotest-framework-engine:$kotestVersion")
            implementation("io.kotest:kotest-property:$kotestVersion")
            implementation("io.mockative:mockative:$mockativeVersion")
            implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutinesVersion")
        }
    }
1
If I comment out the three Kotest lines, everything goes back to normal
(Stuff also still breaks if I comment out everything else)
Oh now it decides to show the error. It just wasn't popping up the error window for some reason...
Copy code
org.gradle.internal.resolve.ArtifactNotFoundException: Could not find kotest-common.klib (io.kotest:kotest-common-iosx64:5.5.5).
Does Kotest just not support iOS?
Oh wow, it looks like an issue deploying to Maven. If I click on Browse, the actual
.klib
file is missing for 5.5.5. It's there for 5.5.4.
Yeah, wow. That was it. Nudging the version down to 5.5.4 fixes the issue.
48 Views