I'm in the process of migrating a JVM-only Kotlin ...
# multiplatform
s
I'm in the process of migrating a JVM-only Kotlin project to KMP. As part of that, I'd like to keep my tests at targeting the JVM only for now, as they make use of some JVM features. For example, I'm currently using Gradle's
jvm-test-suite
plugin to register functional tests. Does anyone have a working example how to continue using that with the JVM target of a multiplatform project, while also properly associating compilation like here so that functional tests can access ìnternal`objects?
e
can you move the JVM tests to another Java-only module?
Copy code
// library/build.gradle.kts
plugins {
  kotlin("jvm")
  `jvm-test-suite`
}
to
Copy code
// library/build.gradle.kts
plugins {
  kotlin("multiplatform")
}
kotlin {
  jvm()
}
Copy code
// library-test/build.gradle.kts
plugins {
  kotlin("jvm")
  `jvm-test-suite`
}
dependencies {
  implementation(project(":library"))
}
otherwise I think the interaction between kotlin multiplatform sourcesets and java (test suite) sourcesets within the same project will take a lot of work to reconcile
😞 1