I'm trying to add compile dependencies(B.jar and C.jar) to proguard libraryjars.
Running:
println configurations.compile.collect()
I get:
[../B.jar, ../C.jar]
Here's what I've attempted:
task proguard(type: proguard.gradle.ProGuardTask) {
...
libraryjars "${configurations.compile.collect()}"
...
}
For reference, the following works:
task proguard(type: proguard.gradle.ProGuardTask) {
...
libraryjars "../B.jar"
libraryjars "../C.jar"
...
}
This is obviously and example and my real projects has many dependencies. Any ideas?
Ah, it was as simple as:
libraryjars files(configurations.compile.collect())
Since Gradle 3.4+ with the deprecation of "compile" in favor of "implementation" (as described here) this worked:
libraryjars configurations.findByName('runtimeClasspath').getFiles()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With