Skip to content

fix: restore deprecated svcsAnnotationsFile setter and auto-wire task dependencies#53

Merged
jimisola merged 4 commits intomainfrom
fix/svcs-annotations-file-backwards-compat
Apr 19, 2026
Merged

fix: restore deprecated svcsAnnotationsFile setter and auto-wire task dependencies#53
jimisola merged 4 commits intomainfrom
fix/svcs-annotations-file-backwards-compat

Conversation

@jimisola
Copy link
Copy Markdown
Member

@jimisola jimisola commented Apr 18, 2026

Summary

Fixes #52 and #54.

fix: restore deprecated svcsAnnotationsFile setter (closes #52)

  • Adds a deprecated setSvcsAnnotationsFile(Object) setter to RequirementsToolExtension that delegates to svcsAnnotationsFiles.from() and logs a WARN-level deprecation message
  • Restores compatibility for builds using the 0.1.0 property name after upgrading to 0.1.1+

feat: auto-wire task dependencies (closes #54)

  • assembleRequirements now automatically depends on compileJava and all non-main compileXxxJava tasks (discovered via JavaPlugin in afterEvaluate)
  • build is finalized by assembleRequirements — no manual wiring needed in consuming projects
  • Adds setSvcsAnnotationsFiles(Object...) setter that replaces auto-discovery with explicit files and disables auto-wired test source set compile dependencies
  • Emits a WARN when annotation files are missing at execution time (e.g. when compile was excluded)
  • Removes the manual dependsOn/finalizedBy boilerplate from the fixture build.gradle

docs: complete configuration reference

  • README updated with a full configuration table, dataset directory reference, auto-wiring explanation, deprecation notice, and task reference section
  • Structure aligned with reqstool-java-maven-plugin README

Test plan

  • ./gradlew test passes (10 tests including new testSetSvcsAnnotationsFilesMarksExplicit and testDeprecatedSvcsAnnotationsFileSetter)
  • Build using old svcsAnnotationsFile = ... syntax succeeds and prints the deprecation warning
  • Fresh project with only datasetPath configured: ./gradlew build runs assembleRequirements automatically

…atibility

Adds a deprecated setSvcsAnnotationsFile(Object) setter to
RequirementsToolExtension that delegates to svcsAnnotationsFiles.from()
and emits a WARN-level deprecation message. This restores compatibility
for builds using the 0.1.0 property name after upgrading to 0.1.1+.

Closes #52

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
- Auto-wire assembleRequirements to depend on compileJava (main) and all
  non-main compileXxxJava tasks via JavaPlugin introspection in afterEvaluate
- Wire build.finalizedBy(assembleRequirements) so no manual lifecycle
  configuration is needed in consuming projects
- Add setSvcsAnnotationsFiles(Object...) setter that marks files as
  explicit and disables auto-wired test source set compile dependencies
- Emit WARN when annotation files are missing at execution time
- Remove manual dependsOn/finalizedBy from fixture build.gradle
- Add complete configuration reference table and task documentation
  to README

Closes #54

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
@jimisola jimisola changed the title fix: restore deprecated svcsAnnotationsFile setter for backwards compatibility fix: restore deprecated svcsAnnotationsFile setter and auto-wire task dependencies Apr 18, 2026
…les changes

- Rewrite configuration.adoc with a reference table, dataset directory
  table, auto-wiring explanation, setSvcsAnnotationsFiles override docs,
  and deprecation notice for svcsAnnotationsFile (singular)
- Update usage.adoc with correct task lifecycle (compile deps, not check),
  lifecycle diagram, and task reference
- Update index.adoc to reflect auto-wiring feature and correct defaults

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
- Apply Spring java format to RequirementsToolExtension
- Add missing @param tag to setSvcsAnnotationsFile javadoc
- Add svcsAnnotationsFile (deprecated) row to README configuration table
- Remove redundant Deprecation notice section from README

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
@jimisola jimisola self-assigned this Apr 19, 2026
@jimisola jimisola merged commit 336eb88 into main Apr 19, 2026
13 checks passed
@jimisola jimisola deleted the fix/svcs-annotations-file-backwards-compat branch April 19, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant