How to make mockmp work for custom modules? I crea...
# kodein
d
How to make mockmp work for custom modules? I created a separate module in my app as follows:
Copy code
val commonClientMain by creating {
    dependsOn(commonMain)
    dependencies ...
}
val commonClientTest by creating {
    dependsOn(commonTest)
    dependencies {
        implementation(kotlin("test"))
        implementation("org.kodein.mock:mockmp-runtime:1.14.0")
        implementation("org.kodein.mock:mockmp-test-helper:1.14.0")
    }
    kotlin.srcDir("build/generated/ksp/jvm/jvmTest/kotlin")
}
I'm not able to successfully make ksp generate the injectMocks function for my custom module. I've tried it with gradle plugin as well as manual configuration. Also it works on the default commonTest. Any ideas?
i
Do you have a sample project? Where did you create your separated module?
d
I can create one if necessary, but I just added the lines above in
sourceSets { ... }
in build.gradle.kts.
I currently ended up running my commClientMain tests in commonTest