phldavies
07/24/2024, 7:02 PMlogback-classic
on the runtimeOnly
and testRuntimeOnly
gradle dependency scopes, however when running tests via the kotest plugin we get an error about no Slf4J impl on the classpath.sam
07/25/2024, 2:21 PMphldavies
07/29/2024, 11:49 AMdependencies {
implementation("io.github.oshai:kotlin-logging:7.0.0") // has no direct dependency on slf4j
implementation("io.ktor:ktor-io:2.2.2") // transitively pulls in slf4j 1.7.36
runtimeOnly("ch.qos.logback:logback-classic:1.5.6") // depends on slf4j 2.0.13
testImplementation("io.kotest:kotest-runner-junit5:5.9.1")
}
It seems that Gradle, when resolving the runtime classpath (and test runtime) will include only slf4j-api:2.0.13
however the IntelliJ module classpath (and resulting invocation) will include both slf4j-api:1.7.36
and slf4j-api:2.0.13
.
So with this, I'm assuming this is not something that is truly a bug in the kotest-intellij-plugin and there's not a lot you can do about it. We can include a compile-time dependency explicitly on slf4j-api:2.0.13
as a workaround.phldavies
07/29/2024, 11:49 AMsam
07/29/2024, 12:08 PM