how do I correctly configure a multiplatform gradl...
# gradle
p
how do I correctly configure a multiplatform gradle project tests? I would like to use junit5 on jvm. Currently I get this error `Execution failed for task ':jvmTest'.
No tests found for given includes: [AmountTest.bla](filter.includeTestsMatching)
In a normal jvm project this is fixed by adding
test { userJUnitPlatform() }
to the build script. However I am having a hard time figuring out how to do it in multiplatfom
I tried gralde 5.2 and 6.1. Using the IntelliJ multiplatform template as a starting point
if I execute the common tests on js platform it works as expected
Copy code
implementation(kotlin("test-junit"))
also works. So it is just down to junit5 and the useJUnitPlatform call
s
Copy code
tasks {
    withType<Test> {
        useJunitPlatform()
    }
}
Does that work for you? iirc
useJunitPlatform()
tells the Test task to use Junit5 by default.
I am using that setup in my multiplatform projects and it's running tests correctly