https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
a

altavir

11/16/2019, 2:29 PM
Does anybody know if current MPP plugin works with JUnit5? I tried it, but did not manage it to work.
s

serebit

11/17/2019, 4:38 PM
Do you mean just working with the JVM target? If so, it's entirely possible. I have it working with both my MPP projects.
a

altavir

11/17/2019, 4:48 PM
Junit should work for JVM. Could you please share the build? I tried it, but it can't find any tests.
s

serebit

11/17/2019, 6:09 PM
You need to tell Gradle to use JUnit Platform.
a

altavir

11/17/2019, 6:11 PM
I tried to use
jvmTest
task for that, but it was not working. Also I see that you explicitely add
junit-jupiter
even if it is used internally in
kotlin-test-junit5
. I will try your solution. Thank you very much.
Yep. Seems to be working properly now. Thank you very much.
s

serebit

11/17/2019, 6:36 PM
No problem :)
r

Robert Wijas

11/20/2020, 11:51 AM
I have the same question but for Kotlin Multiplatform Mobile. I would like to use junit5 in
androidTest
or if possible
commonTest
. Couldn’t find any working example and I’m just starting with Gradle and Android Studio. Any hints? Thx!