Hello, I added the kotlix.test library to my multi...
# multiplatform
d
Hello, I added the kotlix.test library to my multiplatform project using the
kotlin-multiplatform
plugin. The build passes, however the annotations and the test methods aren’t visible from test classes. I’m using the groovy build.gradle
Copy code
commonTest {
    dependencies {
        implementation "org.jetbrains.kotlin:kotlin-test-common"
        implementation "org.jetbrains.kotlin:kotlin-test-annotations-common"
        implementation "io.mockk:mockk-common:1.9"
    }
}
I started by using
testImplementation
but I received such error
Could not find method testIplementation() for arguments [org.jetbrains.kotlin:kotlin-test-common] on object of type org.jetbrains.kotlin.gradle.plugin.mpp.DefaultKotlinDependencyHandler
, and then moved to
implementation
. Could someone give me a clue? Thanks
d
Yes that’s my case, and that’s why I’m looking for help…
t
Ah. Have you added android plugin?
And Mokk doesn't support at least native as I know
d
Yes I did, I have
com.android.library
Copy code
sourceSets {
    final def ktorVersion = "1.1.2"
    final def coroutinesVersion = "1.1.1"
    final def serializationVersion = "0.10.0"

    commonMain {
        dependencies {
            api "org.jetbrains.kotlin:kotlin-stdlib-common"
            api "org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:$serializationVersion"
            api "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:$coroutinesVersion"
            implementation "io.ktor:ktor-client-core:$ktorVersion"
            implementation "io.ktor:ktor-client-json:$ktorVersion"
        }
    }

    commonTest {
        dependencies {
            implementation "org.jetbrains.kotlin:kotlin-test-common"
            implementation "org.jetbrains.kotlin:kotlin-test-annotations-common"
            implementation "io.mockk:mockk-common:1.9"
        }
    }
...