Skip to content

Conversation

jnizet
Copy link
Contributor

@jnizet jnizet commented Mar 15, 2019

  • assemble is the standard gradle lifecycle task used to build the artifact (i.e. the jar in the case of a classical Java project). So assemble now depends on quarkusBuild, which produces the runner jar
  • classes is the standard lifecycle task which produces the classes (and copies the resources). Since that's what quarkusBuild and quarkusDev need as input (as far as I understand), they now depend on the classes task, instead of depending on the build task
  • The build 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 the build task. The quarkusDev and quarkusBuild tasks which depended on build now don't depend on it anymore, since all they should need is the output of the classes task.

So now ./gradlew assemble produces the runner jar as expected by a gradle user. So does ./gradlew build of course, since build depends on assemble.

./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

- `assemble` is the standard gradle lifecycle task used to build the artifact (i.e. the jar in the case of a classical Java project). So `assemble` now depends on `quarkusBuild`, which produces the runner jar
- `classes` is the standard lifecycle task which produces the classes (and copies the resources). Since that's what `quarkusBuild` and `quarkusDev` need as input (as far as I understand), they now depend on the `classes` task, instead of depending on the `build` task
- The `build` 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 the `build` task. The `quarkusDev` and `quarkusBuild` tasks which depended on `build` now don't depend on it anymore, since all they should need is the output of the `classes` task.

So now `./gradlew assemble` produces the runner jar as expected by a gradle user. So does `./gradlew build` of course, since `build` depends on `assemble`.

`./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 quarkusio#1442
@stalep stalep self-requested a review March 15, 2019 12:41
Copy link
Member

@stalep stalep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes looks good, thanks for contributing!

@jnizet
Copy link
Contributor Author

jnizet commented Mar 15, 2019

@stalep I had a look at the gradle-tooling guide, and I didn't notice anything that needed to be changed, but maybe I missed something, or maybe you're thinking about something else.

@stalep
Copy link
Member

stalep commented Mar 15, 2019

ah, ofc that was already updated, forget my stupid comment then :)

@stalep stalep merged commit 4e774cb into quarkusio:master Mar 15, 2019
@gsmet gsmet added this to the 0.12.0 milestone Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gradle plugin should run on build and not require quarkus-build
3 participants