From 14af362c1a7b28202944c537af98d6f29aa0a9cf Mon Sep 17 00:00:00 2001 From: Andreas Marek Date: Wed, 11 Mar 2026 09:49:56 +1000 Subject: [PATCH 1/4] Default test task to Java 25 only, require explicit tasks for other JVMs Remove automatic dependencies that made `./gradlew test` run on all JVMs (11, 17, 21, 25) and `check` pull in testng. Now `test` and `check` only run on Java 25 by default. Other JVM versions are still available via explicit tasks (testWithJava11, testWithJava17, etc.) used by CI matrix. Simplifies CI workflow commands by removing all -x exclusion flags. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/master.yml | 6 +++--- .github/workflows/pull_request.yml | 4 ++-- build.gradle | 5 ----- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index f70fec93e..997d1bd04 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: include: - - gradle-argument: 'assemble && ./gradlew check -x test -x testng -x testngWithJava11 -x testngWithJava17 -x testngWithJava21' + - gradle-argument: 'assemble && ./gradlew check' label: 'check' - gradle-argument: 'testWithJava11 testngWithJava11' label: 'java11' @@ -23,7 +23,7 @@ jobs: - gradle-argument: 'testWithJava21 testngWithJava21' label: 'java21' test-results-dirs: 'testWithJava21 testngWithJava21' - - gradle-argument: 'test -x testWithJava11 -x testWithJava17 -x testWithJava21 testng jacocoTestReport' + - gradle-argument: 'test testng jacocoTestReport' label: 'java25' test-results-dirs: 'test testng' - gradle-argument: 'jcstress' @@ -220,4 +220,4 @@ jobs: java-version: '25' distribution: 'corretto' - name: publishToMavenCentral - run: ./gradlew assemble && ./gradlew check -x test -x testng -x testngWithJava11 -x testngWithJava17 -x testngWithJava21 --info && ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -x check --info --stacktrace + run: ./gradlew assemble && ./gradlew check --info && ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -x check --info --stacktrace diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 6b216b047..c2c67bafe 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: include: - - gradle-argument: 'assemble && ./gradlew check -x test -x testng -x testngWithJava11 -x testngWithJava17 -x testngWithJava21' + - gradle-argument: 'assemble && ./gradlew check' label: 'check' - gradle-argument: 'testWithJava11 testngWithJava11' label: 'java11' @@ -31,7 +31,7 @@ jobs: - gradle-argument: 'testWithJava21 testngWithJava21' label: 'java21' test-results-dirs: 'testWithJava21 testngWithJava21' - - gradle-argument: 'test -x testWithJava11 -x testWithJava17 -x testWithJava21 testng jacocoTestReport' + - gradle-argument: 'test testng jacocoTestReport' label: 'java25' test-results-dirs: 'test testng' - gradle-argument: 'jcstress' diff --git a/build.gradle b/build.gradle index e5ae04e9a..c11619a6e 100644 --- a/build.gradle +++ b/build.gradle @@ -406,8 +406,6 @@ task testng(type: Test) { dependsOn tasks.named('testClasses') doLast { verifyTestngSkips(it, expectedTestngSkips) } } -check.dependsOn testng - compileJava { options.compilerArgs += ["-parameters"] source file("build/generated-src"), sourceSets.main.java @@ -563,9 +561,6 @@ tasks.register('testWithJava11', Test) { } } -test.dependsOn testWithJava21 -test.dependsOn testWithJava17 -test.dependsOn testWithJava11 jacoco { toolVersion = "0.8.12" From 6722ba88676dc129c32e8f33cadfe17d38621dcf Mon Sep 17 00:00:00 2001 From: Andreas Marek Date: Wed, 11 Mar 2026 09:56:29 +1000 Subject: [PATCH 2/4] Update AGENTS.md to reflect simplified test execution Co-Authored-By: Claude Opus 4.6 --- AGENTS.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 3ac0eb552..d5e6e5dd6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -14,8 +14,8 @@ ## Test Execution -When running tests, exclude the Java version-specific test tasks to avoid failures: - ```bash -./gradlew test -x testWithJava21 -x testWithJava17 -x testWithJava11 -x testng +./gradlew test ``` + +This runs tests on Java 25 only. Other JVM versions (11, 17, 21) require explicit tasks (e.g. `testWithJava11`). From 5e2f2da1cabe9ab1b4e63f5c47dc04153e4f0115 Mon Sep 17 00:00:00 2001 From: Andreas Marek Date: Wed, 11 Mar 2026 09:57:54 +1000 Subject: [PATCH 3/4] Add CLAUDE.md pointing to AGENTS.md Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 000000000..f4876c26a --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +See [AGENTS.md](AGENTS.md) From 06ff846ec738fba8da5156ea6c0b4ac7f0a8db3a Mon Sep 17 00:00:00 2001 From: Andreas Marek Date: Wed, 11 Mar 2026 10:28:47 +1000 Subject: [PATCH 4/4] Keep -x test -x testng on check entries to avoid JaCoCo failure The check matrix entry runs static checks only (errorprone, etc.). Tests run in separate parallel matrix jobs. The Gradle check lifecycle depends on test, so we still need to exclude test/testng here. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/master.yml | 4 ++-- .github/workflows/pull_request.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 997d1bd04..9713cf4c8 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: include: - - gradle-argument: 'assemble && ./gradlew check' + - gradle-argument: 'assemble && ./gradlew check -x test -x testng' label: 'check' - gradle-argument: 'testWithJava11 testngWithJava11' label: 'java11' @@ -220,4 +220,4 @@ jobs: java-version: '25' distribution: 'corretto' - name: publishToMavenCentral - run: ./gradlew assemble && ./gradlew check --info && ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -x check --info --stacktrace + run: ./gradlew assemble && ./gradlew check -x test -x testng --info && ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -x check --info --stacktrace diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index c2c67bafe..44d756153 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: include: - - gradle-argument: 'assemble && ./gradlew check' + - gradle-argument: 'assemble && ./gradlew check -x test -x testng' label: 'check' - gradle-argument: 'testWithJava11 testngWithJava11' label: 'java11'