Sunday, April 10, 2016

gradle to bundle nested jar dependencies into module output jar

Leave a Comment

How to make gradle to included some dependencies into module resulted jar as jar? i.e. to make jar with nested jar's e.g. in lib folder ?

This is not Android project, and this should be done for many modules in multi-module project, so fatJar, uberJar, shadowJar alike solutions seem not to fit.

1 Answers

Answers 1

You just need to add an additional from directive to include dependencies in your jar:

task jarJar(type: Jar) {     baseName = project.name + '-jarjar'     from { configurations.compile }     with jar } 
If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment