I have a Gradle project, which has plenty of dependencies from different repositories (mavenCentral
, jcenter
). After successful distZip
task execution and inspecting a zip archive, I've found, that certain jars was duplicated in lib
folder:
- bcprov-jdk14-1.38.jar and bcprov-jdk14-138.jar
- bcmail-jdk14-1.38.jar and bcmail-jdk14-138.jar
Jar tuples has the same size and content.
I suppose this was happened because in different repositories those dependencies has different file names.
How can I prevent jars duplication in zip file when performing distZip
task? Could it be a default functionality for distZip task or some option to enable?
As a workaround I believe I can write some kind of distZip
task handler and 'squeeze' dependencies jar tuples (which may have two, three and more copies) to leave just one using some Groovy scripting, but I wanna know is it a default solution?