Is Koin not compatible with ```tasks.test { us...
# koin
s
Is Koin not compatible with
Copy code
tasks.test {
    useJUnitPlatform()
}
? I’m getting
Copy code
> Could not resolve all files for configuration ':testCompileClasspath'.
   > Could not resolve org.jetbrains.kotlin:kotlin-test-junit5:1.8.22.
     Required by:
         project : > org.jetbrains.kotlin:kotlin-test:1.8.22
      > Module 'org.jetbrains.kotlin:kotlin-test-junit5' has been rejected:
           Cannot select module with conflict on capability 'org.jetbrains.kotlin:kotlin-test-framework-impl:1.8.22' also provided by [org.jetbrains.kotlin:kotlin-test-junit:1.8.21(junitApi)]
   > Could not resolve org.jetbrains.kotlin:kotlin-test-junit:1.8.21.
     Required by:
         project : > io.insert-koin:koin-test:3.4.1 > io.insert-koin:koin-test-jvm:3.4.1
      > Module 'org.jetbrains.kotlin:kotlin-test-junit' has been rejected:
           Cannot select module with conflict on capability 'org.jetbrains.kotlin:kotlin-test-framework-impl:1.8.21' also provided by [org.jetbrains.kotlin:kotlin-test-junit5:1.8.22(junit5Api)]
with it. Works fine when I remove those lines (looks like it’s falling back to JUnit 4 maybe). Any workarounds for that one?
s
🤦‍♂️ Ofc that’s a thing, for some reason I didn’t put the pieces together even looking at the koin src with the junit5 folder. Thanks!
Nope, still runs through koin-test which introduces the conflict. Just slightly extended dependency graph:
Copy code
> Could not resolve all files for configuration ':testCompileClasspath'.
   > Could not resolve org.jetbrains.kotlin:kotlin-test-junit5:1.8.22.
     Required by:
         project : > org.jetbrains.kotlin:kotlin-test:1.8.22
      > Module 'org.jetbrains.kotlin:kotlin-test-junit5' has been rejected:
           Cannot select module with conflict on capability 'org.jetbrains.kotlin:kotlin-test-framework-impl:1.8.22' also provided by [org.jetbrains.kotlin:kotlin-test-junit:1.8.21(junitApi)]
   > Could not resolve org.jetbrains.kotlin:kotlin-test-junit:1.8.21.
     Required by:
         project : > io.insert-koin:koin-test-junit5:3.4.1 > io.insert-koin:koin-test:3.4.1 > io.insert-koin:koin-test-jvm:3.4.1
      > Module 'org.jetbrains.kotlin:kotlin-test-junit' has been rejected:
           Cannot select module with conflict on capability 'org.jetbrains.kotlin:kotlin-test-framework-impl:1.8.21' also provided by [org.jetbrains.kotlin:kotlin-test-junit5:1.8.22(junit5Api)]
a
Version 3.4.2 should solve that as it has been updated to 1.8.20
j
as far as I understand, there’s no 3.4.2 for koin-test, only for koin-core.
a
ok, I need to bump to 3.4.3. Sonatype refuse to republish a version 😕
thanks for the feedback