Improve the dependencies between gradle tasks #1506
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
assemble
is the standard gradle lifecycle task used to build the artifact (i.e. the jar in the case of a classical Java project). Soassemble
now depends onquarkusBuild
, which produces the runner jarclasses
is the standard lifecycle task which produces the classes (and copies the resources). Since that's whatquarkusBuild
andquarkusDev
need as input (as far as I understand), they now depend on theclasses
task, instead of depending on thebuild
taskbuild
task is the standard gradle lifecycle task to run a complete build, including the production of the jar artifact, the compilation and execution of the tests, the static code analysis checks such as PMD, CheckStyle, etc. It's the top-level task, and nothing should normally depend on thebuild
task. ThequarkusDev
andquarkusBuild
tasks which depended onbuild
now don't depend on it anymore, since all they should need is the output of theclasses
task.So now
./gradlew assemble
produces the runner jar as expected by a gradle user. So does./gradlew build
of course, sincebuild
depends onassemble
../gradlew quarkusDev
and./gradlew quarkusBuild
won't compile and run all the tests and static code analysis checks, since that's not what these tasks are supposed to do.fix #1442