I’m trying to setup a multiplatform test project t...
# multiplatform
e
I’m trying to setup a multiplatform test project that at the moment contains code only in
src/commonTest
and
src/jvmTest
. The CI build fails with the following message:
Copy code
> Task :wire-tests:linkDebugTestLinuxX64 FAILED
e: Could not find "/home/travis/build/square/wire/wire-tests/build/classes/kotlin/linuxX64/main/wire-tests.klib" in [/home/travis/build/square/wire, /home/travis/.konan/klib, /home/travis/.konan/kotlin-native-linux-1.3/klib/common, /home/travis/.konan/kotlin-native-linux-1.3/klib/platform/linux_x64].
Pretty sure it’s a project misconfiguration problem, but I can’t figure it out, any ideas? The Gradle build can be found here: https://github.com/square/wire/blob/egorand/190629/kotlin-test-protos-to-common/wire-tests/build.gradle
a
Hello! This is a known issue, you can check it on the Github here(https://github.com/JetBrains/kotlin-native/issues/2617) Currently, a project with no code in the main part can’t be built. The reason for such an obstacle is that the compiler internally provides a
.klib
to the tests. So, to workaround this, you can just add an empty
.kt
file to your
src/nativeMain/kotlin/
directory. It shouldn’t affect your tests.
e
Got it, thank you!