From 686d93d54bf200c36727ca15db726c4d990f2706 Mon Sep 17 00:00:00 2001 From: Jimisola Date: Sun, 22 Nov 2026 09:48:57 +0000 Subject: [PATCH 1/5] ci: use shared build and lint workflows Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01Mt2FAXPoMhrbjtWKhBTwZM Signed-off-by: Jimisola --- .github/workflows/build.yml | 91 ++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 47 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9566937..eb4cf78 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,54 +28,51 @@ permissions: contents: read jobs: + lint: + uses: reqstool/.github/.github/workflows/java-lint.yml@ci/385-shared-python-build # SPIKE: pin to release SHA + with: + build-tool: gradle + build: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - reqstool-source: [pypi, main] - steps: - # Full history and tags: git-dyn-semver derives the version from git state, so a - # shallow clone would build the wrong number rather than fail. - - uses: actions/checkout@v7.0.1 - with: - persist-credentials: false - fetch-depth: 0 - fetch-tags: true - ref: ${{ inputs.ref || github.ref }} - - name: Set up Java - uses: actions/setup-java@v6.3.0 - with: - java-version: "21.0.12+8.0.LTS" - distribution: "temurin" - - name: Build - run: ./gradlew clean build - - name: Self-apply plugin to assemble dataset zip - # True self-application (publishing to mavenLocal and re-applying the plugin - # to its own sources from a separate project) is not yet wired up for Gradle. - # As an interim measure, merge the annotation processor's own main/test output - # (already produced by `./gradlew build` above) the same way the plugin's - # combineOutput() would, so reqstool status has real, non-fabricated data. - run: | - mkdir -p build/reqstool - { - echo "# yaml-language-server: \$schema=https://raw.githubusercontent.com/reqstool/reqstool-client/main/src/reqstool/resources/schemas/v1/annotations.schema.json" - yq eval-all '. as $item ireduce ({}; . * $item )' \ - build/generated/sources/annotationProcessor/java/main/resources/annotations.yml \ - build/generated/sources/annotationProcessor/java/test/resources/annotations.yml | grep -v "^#" - } > build/reqstool/annotations.yml - - name: Install reqstool - uses: reqstool/.github/.github/actions/install-reqstool@6fc8d3e3d4c3fdf7a83cb7b7a274e4761486ca71 # 1.2.1 - with: - reqstool-source: ${{ matrix.reqstool-source }} - - name: Validate reqstool spec completeness - # not yet available in the latest PyPI release - if: matrix.reqstool-source == 'main' - uses: reqstool/.github/.github/actions/validate-reqstool@6fc8d3e3d4c3fdf7a83cb7b7a274e4761486ca71 # 1.2.1 - - name: Run reqstool status - uses: reqstool/.github/.github/actions/reqstool-status@6fc8d3e3d4c3fdf7a83cb7b7a274e4761486ca71 # 1.2.1 - with: - fail-if-incomplete: "true" + needs: lint + uses: reqstool/.github/.github/workflows/java-build-gradle.yml@ci/385-shared-python-build # SPIKE: pin to release SHA + with: + ref: ${{ inputs.ref }} + artifact-name: ${{ inputs.artifact-name || 'dist' }} + post-test-command: | + # Interim: merge the processor's own main/test output the way the plugin's + # combineOutput() would (true self-application is not yet wired for Gradle). + mkdir -p build/reqstool + { + echo "# yaml-language-server: \$schema=https://raw.githubusercontent.com/reqstool/reqstool-client/main/src/reqstool/resources/schemas/v1/annotations.schema.json" + yq eval-all '. as $item ireduce ({}; . * $item )' \ + build/generated/sources/annotationProcessor/java/main/resources/annotations.yml \ + build/generated/sources/annotationProcessor/java/test/resources/annotations.yml | grep -v "^#" + } > build/reqstool/annotations.yml + + reqstool: + needs: build + uses: reqstool/.github/.github/workflows/common-reqstool-verify.yml@ci/385-shared-python-build # SPIKE: pin to release SHA + with: + build-artifact: ${{ inputs.artifact-name || 'dist' }}-build + + smoke: + needs: build + uses: reqstool/.github/.github/workflows/java-smoke.yml@ci/385-shared-python-build # SPIKE: pin to release SHA + with: + command: ./gradlew --console=plain build validate-openspec: uses: reqstool/.github/.github/workflows/common-validate-openspec.yml@6fc8d3e3d4c3fdf7a83cb7b7a274e4761486ca71 # 1.2.1 + + # Single stable required check: survives job renames and matrix changes. + ci: + if: ${{ always() }} + needs: [lint, build, reqstool, smoke, validate-openspec] + runs-on: ubuntu-latest + steps: + - name: Fail unless every needed job succeeded + env: + NEEDS: ${{ toJSON(needs) }} + run: | + echo "$NEEDS" | python3 -c 'import json,sys; r={k:v["result"] for k,v in json.load(sys.stdin).items()}; print(r); sys.exit(0 if all(v=="success" for v in r.values()) else 1)' From e44ae11e97f332ef816b9147d324196399bfa9ff Mon Sep 17 00:00:00 2001 From: Jimisola Date: Sun, 22 Nov 2026 10:09:40 +0000 Subject: [PATCH 2/5] build: compile for Java 25, the latest LTS Compile target now equals the CI JDK. Consumers need Java 25 or newer to run the plugin or processor. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01Mt2FAXPoMhrbjtWKhBTwZM Signed-off-by: Jimisola --- CLAUDE.md | 2 +- CONTRIBUTING.md | 2 +- README.md | 2 +- build.gradle | 4 ++-- docs/modules/ROOT/pages/index.adoc | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index dcbc4bc..5d1817a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -9,7 +9,7 @@ A Gradle plugin (`io.github.reqstool.gradle-plugin`) for `@SVCs` annotations emitted by the reqstool annotation processor during compilation, combines them with a dataset (`requirements.yml`, etc.) and test result XML files, and packages everything into a `--reqstool.zip` artifact that the reqstool CLI -can analyze. Requires Java 21+. +can analyze. Requires Java 25+. See `README.md` for the user-facing configuration reference (extension properties, task behavior, JUnit 5 parameterized test setup) and `CONTRIBUTING.md` for setup/DCO/commit diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c457d84..4bcc5eb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,7 @@ For DCO sign-off, commit conventions, and code review process, see the organizat ## Prerequisites -- Java 21+ +- Java 25+ - Gradle 9.3+ (use the wrapper) - [reqstool](https://github.com/reqstool/reqstool-client) (`pipx install reqstool`) - [OpenSpec](https://github.com/Fission-AI/OpenSpec) (`npm install -g @fission-ai/openspec`) diff --git a/README.md b/README.md index deb0308..795ddc5 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Gradle build plugin for [reqstool](https://github.com/reqstool/reqstool-client) ## Overview -Collects `@Requirements` and `@SVCs` annotations from compiled Java code, combines them with test results, and packages everything into a ZIP artifact for analysis by the reqstool CLI. Supports Java 21+. +Collects `@Requirements` and `@SVCs` annotations from compiled Java code, combines them with test results, and packages everything into a ZIP artifact for analysis by the reqstool CLI. Supports Java 25+. The plugin automatically wires task dependencies: `assembleRequirements` depends on `check` and on all `compileJava` tasks, and `build` depends on `assembleRequirements`. No manual task wiring is needed in most projects. diff --git a/build.gradle b/build.gradle index 8f0f863..7110544 100644 --- a/build.gradle +++ b/build.gradle @@ -13,8 +13,8 @@ plugins { group = 'io.github.reqstool' java { - sourceCompatibility = JavaVersion.VERSION_21 - targetCompatibility = JavaVersion.VERSION_21 + sourceCompatibility = JavaVersion.VERSION_25 + targetCompatibility = JavaVersion.VERSION_25 } repositories { diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/index.adoc index b9e7f1d..bfec0b1 100644 --- a/docs/modules/ROOT/pages/index.adoc +++ b/docs/modules/ROOT/pages/index.adoc @@ -60,7 +60,7 @@ Run `gradle build` and the ZIP artifact will be created automatically. == Prerequisites * Gradle 9.0+ -* Java 21+ +* Java 25+ * A `requirements.yml` file in the dataset directory (default: `reqstool/`) == License From 8840795815bdbd173ec72cc5527f24163178ca1d Mon Sep 17 00:00:00 2001 From: Jimisola Date: Mon, 23 Nov 2026 07:44:07 +0000 Subject: [PATCH 3/5] ci: pin shared workflows to the .github 1.3.0 SHA Pin to 193abb8e7ad36805d5fe7695f8fa5e0a4b6f8da7 (# 1.3.0). The 1.3.0 tag is pending; Renovate resolves it once it exists. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01Mt2FAXPoMhrbjtWKhBTwZM Signed-off-by: Jimisola --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eb4cf78..3eed420 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,13 +29,13 @@ permissions: jobs: lint: - uses: reqstool/.github/.github/workflows/java-lint.yml@ci/385-shared-python-build # SPIKE: pin to release SHA + uses: reqstool/.github/.github/workflows/java-lint.yml@193abb8e7ad36805d5fe7695f8fa5e0a4b6f8da7 # 1.3.0 with: build-tool: gradle build: needs: lint - uses: reqstool/.github/.github/workflows/java-build-gradle.yml@ci/385-shared-python-build # SPIKE: pin to release SHA + uses: reqstool/.github/.github/workflows/java-build-gradle.yml@193abb8e7ad36805d5fe7695f8fa5e0a4b6f8da7 # 1.3.0 with: ref: ${{ inputs.ref }} artifact-name: ${{ inputs.artifact-name || 'dist' }} @@ -52,13 +52,13 @@ jobs: reqstool: needs: build - uses: reqstool/.github/.github/workflows/common-reqstool-verify.yml@ci/385-shared-python-build # SPIKE: pin to release SHA + uses: reqstool/.github/.github/workflows/common-reqstool-verify.yml@193abb8e7ad36805d5fe7695f8fa5e0a4b6f8da7 # 1.3.0 with: build-artifact: ${{ inputs.artifact-name || 'dist' }}-build smoke: needs: build - uses: reqstool/.github/.github/workflows/java-smoke.yml@ci/385-shared-python-build # SPIKE: pin to release SHA + uses: reqstool/.github/.github/workflows/java-smoke.yml@193abb8e7ad36805d5fe7695f8fa5e0a4b6f8da7 # 1.3.0 with: command: ./gradlew --console=plain build From d9a9453b2a437c7c41fa1a7f04152d659ae8ba9a Mon Sep 17 00:00:00 2001 From: Jimisola Date: Mon, 23 Nov 2026 09:06:46 +0000 Subject: [PATCH 4/5] chore: drop explanatory comments The PR description and commits carry the rationale. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01Mt2FAXPoMhrbjtWKhBTwZM Signed-off-by: Jimisola --- .github/workflows/build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3eed420..3d6090b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,8 +40,6 @@ jobs: ref: ${{ inputs.ref }} artifact-name: ${{ inputs.artifact-name || 'dist' }} post-test-command: | - # Interim: merge the processor's own main/test output the way the plugin's - # combineOutput() would (true self-application is not yet wired for Gradle). mkdir -p build/reqstool { echo "# yaml-language-server: \$schema=https://raw.githubusercontent.com/reqstool/reqstool-client/main/src/reqstool/resources/schemas/v1/annotations.schema.json" @@ -65,7 +63,6 @@ jobs: validate-openspec: uses: reqstool/.github/.github/workflows/common-validate-openspec.yml@6fc8d3e3d4c3fdf7a83cb7b7a274e4761486ca71 # 1.2.1 - # Single stable required check: survives job renames and matrix changes. ci: if: ${{ always() }} needs: [lint, build, reqstool, smoke, validate-openspec] From 58bab1c5d9690d869e7347825ff2dc337638402a Mon Sep 17 00:00:00 2001 From: Jimisola Date: Mon, 23 Nov 2026 09:21:12 +0000 Subject: [PATCH 5/5] ci: pin shared workflows to .github 1.2.2 Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01Mt2FAXPoMhrbjtWKhBTwZM Signed-off-by: Jimisola --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3d6090b..39c81fa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,13 +29,13 @@ permissions: jobs: lint: - uses: reqstool/.github/.github/workflows/java-lint.yml@193abb8e7ad36805d5fe7695f8fa5e0a4b6f8da7 # 1.3.0 + uses: reqstool/.github/.github/workflows/java-lint.yml@91cd368066d5458b5d46bdf34c4d8ca483f6633f # 1.2.2 with: build-tool: gradle build: needs: lint - uses: reqstool/.github/.github/workflows/java-build-gradle.yml@193abb8e7ad36805d5fe7695f8fa5e0a4b6f8da7 # 1.3.0 + uses: reqstool/.github/.github/workflows/java-build-gradle.yml@91cd368066d5458b5d46bdf34c4d8ca483f6633f # 1.2.2 with: ref: ${{ inputs.ref }} artifact-name: ${{ inputs.artifact-name || 'dist' }} @@ -50,13 +50,13 @@ jobs: reqstool: needs: build - uses: reqstool/.github/.github/workflows/common-reqstool-verify.yml@193abb8e7ad36805d5fe7695f8fa5e0a4b6f8da7 # 1.3.0 + uses: reqstool/.github/.github/workflows/common-reqstool-verify.yml@91cd368066d5458b5d46bdf34c4d8ca483f6633f # 1.2.2 with: build-artifact: ${{ inputs.artifact-name || 'dist' }}-build smoke: needs: build - uses: reqstool/.github/.github/workflows/java-smoke.yml@193abb8e7ad36805d5fe7695f8fa5e0a4b6f8da7 # 1.3.0 + uses: reqstool/.github/.github/workflows/java-smoke.yml@91cd368066d5458b5d46bdf34c4d8ca483f6633f # 1.2.2 with: command: ./gradlew --console=plain build