feat: support multiple test source sets (e.g. integrationTest suite)#49
Merged
feat: support multiple test source sets (e.g. integrationTest suite)#49
Conversation
Change svcsAnnotationsFile (RegularFileProperty) to svcsAnnotationsFiles (ConfigurableFileCollection) in RequirementsToolExtension and RequirementsToolTask. The default collection lazily auto-discovers all non-main source sets from the Java plugin and adds the annotation processor output path for each, so projects using JvmTestSuite (e.g. integrationTest) have their @svcs annotations picked up automatically. In RequirementsToolTask.execute(), iterate all files in the collection and deep-merge their tests nodes via the new mergeTestNodes helper: for duplicate SVC keys, entry arrays are concatenated; new keys are added. Update the test fixture to add an integrationTest JvmTestSuite with HelloIT annotated @svcs("SVC_002"), and add SVC_002 to software_verification_cases.yml. After assembleRequirements, both SVC_001 (from test) and SVC_002 (from integrationTest) appear in the combined annotations.yml. Closes #48 Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
This was referenced Apr 18, 2026
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.
Summary
Closes #48
svcsAnnotationsFile(RegularFileProperty) →svcsAnnotationsFiles(ConfigurableFileCollection) inRequirementsToolExtensionandRequirementsToolTaskintegrationTest(and any otherJvmTestSuite) are picked up without any configurationexecute(), all files in the collection are iterated and theirtestsnodes deep-merged: duplicate SVC keys have their entry arrays concatenated; new keys are addedmergeTestNodesstatic helper (package-private, directly testable)integrationTestJvmTestSuitewithHelloITannotated@SVCs("SVC_002")and addedSVC_002tosoftware_verification_cases.yml; verified thatbuild/reqstool/annotations.ymlcontains bothSVC_001andSVC_002afterassembleRequirementsTest plan
./gradlew test— all existing tests + newtestMergeTestNodes_mergesTwoFilespasscd tests/fixtures/test_project && gradle assembleRequirements—build/reqstool/annotations.ymlcontains bothSVC_001(fromtest) andSVC_002(fromintegrationTest)testsource set continue to work without any configuration change