You should build against both platforms. But K/N d...
# kotlin-native
g
You should build against both platforms. But K/N doesn't support multiplatform projects yet.
a
Thanks for the reply! Just wonder which test lib should I use? There is a
kotlin-test-common
and its
jvm
implementation
kotlin-test-junit
. Any counterparts in the KN world?
i
The Kotlin/Native test library is shipped with the compiler so you don't need to declare additional dependencies. You may use the
kotin.test
package to write your tests and then run the compiler with
-tr
option to produce a test executable. KN Gradle plugin doesn't support testing out of the box yet but you may create a test binary manually passing
-tr
as an extra option:
Copy code
konanArtifacts {
    program('test-binary') {
        ...
        extraOpts '-tr'
    }
}
👍 2