I used the application plugin for the first time, and observed that an excluded transitive dependency was included in the lib directory of the zip file created by the distZip task. Excluding via a compile dependency declaration should be enough:
compile('my.group:my-jar-to-include:1.0.0') {
exclude module: 'my-dependent-jar-to-exclude'
}
I also tried other mechanisms for excluding the file:
configurations {
all*.exclude group: 'my.group', module: 'my-dependent-jar-to-exclude'
}
applicationDistribution.exclude("**/my-dependent-jar-to-exclude.jar", "/lib/my-dependent-jar-to-exclude.jar","my-dependent-jar-to-exclude.jar")
my-dependent-jar-to-exclude.jar remains obstinately present in the lib directory of the distributions zip file created by the distZip task.
Any clues for me?