thanksforallthefish
08/31/2020, 7:34 AMimplementation
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 secondthanksforallthefish
08/31/2020, 7:36 AMtestImplementation("io.github.classgraph:classgraph:4.8.89")
directly to my gradle file and it is not strictly a kotest issue, I think, unless kotest plugin is somehow involvedLeoColman
08/31/2020, 1:02 PMLeoColman
08/31/2020, 1:02 PMLeoColman
08/31/2020, 1:03 PMsam
08/31/2020, 5:10 PMLeoColman
08/31/2020, 5:11 PMsam
08/31/2020, 5:12 PMthanksforallthefish
08/31/2020, 5:20 PMapi
in kotest should do the trick, but it feels hackish. it means kotest would leak the dependency and applications would have it at available at (test) runtime.
otoh webjars is a maven project and I don't think maven has the same sophistication. you can define runtime and compile dependencies, but it is not the same meaning as in a gradle librarythanksforallthefish
08/31/2020, 5:22 PMsam
08/31/2020, 5:23 PMsam
08/31/2020, 5:23 PMthanksforallthefish
08/31/2020, 5:28 PMthanksforallthefish
09/01/2020, 6:05 AMsam
09/01/2020, 8:55 AMthanksforallthefish
09/01/2020, 8:55 AMsam
09/01/2020, 8:56 AMsam
09/01/2020, 8:57 AMsam
09/01/2020, 8:57 AMthanksforallthefish
09/01/2020, 8:58 AMsam
09/01/2020, 8:59 AMthanksforallthefish
09/01/2020, 9:04 AMsam
09/01/2020, 9:07 AMsam
09/01/2020, 12:20 PM