Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gradle Difference between jar and assemble task

Tags:

gradle

what is the difference between assemble and jar task of java plugin in gradle?

I tried executing them with a sample Hello world project they both seems to do the same job.

like image 474
eatSleepCode Avatar asked Nov 04 '15 04:11

eatSleepCode


1 Answers

Since jar is a single task, which assembles a jar-archive for current project, assemble is, according to documentation:

assemble All archive tasks in the project, including jar. Some plugins add additional archive tasks to the project. Task Assembles all the archives in the project.

It is build-cycle task, which execute all the task of this build-cycle phase. Like a check task, which runs all test and verification task, assemble Runs all task, which essemble some artifacts. And the 'jar' could be not the only such a task in the project, some plugins could add them too.

like image 128
Stanislav Avatar answered Oct 26 '22 00:10

Stanislav