hello, sorry to bother again, how would you handle Intellij importing the wrong dependency? I try to be concise, but this might get long. I created a sample project to show the issue:
https://github.com/ThanksForAllTheFish/classgraph
here it goes (and please, let me know if I get anything wrong):
• kotest framework engine 4.2 relies on classpagraph 4.8.89, but declares the dependency as
implementation
therefore gradle does not add the dependency to the compile classpath, due the java library plugin:
https://github.com/kotest/kotest/blob/master/kotest-framework/kotest-framework-discovery/build.gradle.kts
• springdoc ui is maven project, so not that sophisticated, and relies on webjars, which in turns relies on classgraph 4.8.69:
https://github.com/webjars/webjars-locator-core/blob/master/pom.xml#L57
• in between those 2 releases of classgraph, a new method
rejectPackages
was added and is used by kotest, for instance
https://github.com/kotest/kotest/blob/master/kotest-framework/kotest-framework-engine/src/jvmMain/kotlin/io/kotest/engine/config/detectConfig.kt#L28
• because in kotest the dependency is at runtime only, idea does not see and when running a test from the ide it fails due to a method not found exception and crashes the testframework
it was quite hard to debug, the failure can be seen with a breakpoint
https://github.com/kotest/kotest/blob/master/kotest-framework/kotest-framework-engine/src/jvmMain/kotlin/io/kotest/engine/launcher/execute.kt#L84 but it is not logged anywhere I could find
see pictures, no dep for kotest, 4.8.69 for springdoc in the first one, the error in the second