fix(build): drop hand-wired assembleRequirements lifecycle - #120
Merged
Conversation
The plugin wires this itself, and as of 1.0.1 it wires it the other way round: `build dependsOn assembleRequirements dependsOn check`. This file still says `build finalizedBy assembleRequirements`, which asserts the task runs AFTER build while the plugin asserts build needs it first. Gradle rejects the pair at configuration time and nothing compiles -- the mirror image of reqstool/reqstool-java-gradle-plugin#88. Verified against 1.0.1 built from that fix: with these lines the build fails with "Circular dependency between the following tasks: :assembleRequirements"; without them it configures and runs test -> check -> assembleRequirements -> build. Safe to land before the 1.0.1 bump. On the current 0.1.2 the plugin's own `build finalizedBy assembleRequirements` still runs the task, and `build` already runs `test`, so the removed `dependsOn test` was redundant there too. Checked with a real build on 0.1.2: the zip is produced with both test-result XMLs. Refs: reqstool/reqstool-java-gradle-plugin#88 Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What & Why
This repo hand-wires
assembleRequirementsinto the build lifecycle:The plugin does this itself, and as of 1.0.1 it wires it the other way round:
build dependsOn assembleRequirements dependsOn check. This file saysbuild finalizedBy assembleRequirements— the task runs after build — while the plugin says build needs it first. Gradle rejects the contradiction at configuration time and nothing compiles:That is the mirror image of reqstool/reqstool-java-gradle-plugin#88, which was the same collision in the opposite direction. Without this PR, the Renovate bump to 1.0.1 lands red.
Verified, both directions
Against 1.0.1 built from the plugin fix and published to
mavenLocal:build.gradleCircular dependencybuild.gradletest → check → assembleRequirements → buildSafe to land before the 1.0.1 bump. On the current 0.1.2 the plugin's own
build finalizedBy assembleRequirementsstill runs the task, andbuildalready runstest, so the removeddependsOn testwas redundant there too. Confirmed with a real (not dry-run) build on 0.1.2 after removing the lines — the zip is produced intact:So this can merge now and the 1.0.1 bump will be green whenever it arrives; ordering between the two is not load-bearing.
Author checklist
build.gradletouchedTest Plan
gradle buildlocally:assembleRequirementsruns,build/reqstool/*.zipproduced withtest_results/.gradle buildconfigures without a circular-dependency error and orderscheckbeforeassembleRequirements.Refs: reqstool/reqstool-java-gradle-plugin#88