I have a project which has the apache-compress
library as a compile time dependency. This library appears to use Maven and has a POM file with a dependency set up as "optional". Here is the relevant section of the POM file:
<dependency>
<groupId>org.tukaani</groupId>
<artifactId>xz</artifactId>
<version>1.5</version>
<optional>true</optional>
</dependency>
Gradle does not seem to include this library in to my project, I'm guessing it is because of the "optional" attribute. Is there some way to tell Gradle to include this dependency without explicitly including the xz library myself?
Here is my Gradle dependency declaration: compile group: 'org.apache.commons', name:'commons-compress', version:'1.8.1'
Optional dependencies aren't considered for transitive dependency resolution, and have to be added explicitly if necessary. (It's the same in Maven.)
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