Trying to work around the above, is there a way to...
# gradle
r
Trying to work around the above, is there a way to get a runtime classpath of a Kotlin/JVM source set without
withJava()
?
configurations["jvmRuntimeClasspath"]
results in
ClassNotFound
errors
The best I've been able to come up with is
configurations["jvmRuntimeClasspath"] + kotlin.targets["jvm"].compilations["main"].output.allOutputs
, which seems to work, but I suspect there's an easier way
a
this is a bug in gradle 7.0 (see: https://youtrack.jetbrains.com/issue/KT-46165) My Workaround for this is:
Copy code
tasks.withType<Jar> {
    duplicatesStrategy = DuplicatesStrategy.INCLUDE
}