I’m trying to understand the usage of distribution plugin as task dependencies for the plugin doesn’t seem logical for me.
For instance, the execution of
distZip task is done before the
assemble task because it depends on it. As I can understand from the Gradle code, the dependency is done because the distZip/Tar define an archive and assemble tasks depends on that.
So, the execution order looks like this for a
gradle build distZip:
:distTar UP-TO-DATE :distZip UP-TO-DATE :compileJava UP-TO-DATE :processResources UP-TO-DATE :classes UP-TO-DATE :jar :assemble :compileTestJava UP-TO-DATE :processTestResources UP-TO-DATE :testClasses UP-TO-DATE :test UP-TO-DATE :check UP-TO-DATE :build
apply plugin: 'java' apply plugin: 'distribution'
As you can see, the
distZip task is the first to execute and then doesn’t contains any of the build after.
Am I missing something and the
distZip task has to be execute first or is this a bug ?
Thanks in advance for any help,