This is an automated email from the ASF dual-hosted git repository. asf-gitbox-commits pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cayenne.git
commit 766fc414f090fd1d16880a553ff888f238773d93 Author: Andrus Adamchik <[email protected]> AuthorDate: Sat May 9 10:47:33 2026 -0400 Disabling Gradle as needed via an explicit Maven profile ... specific use - CI/CD J25 --- .claude/rules/cayenne-gradle-plugin/build-jdk.md | 10 +++++++--- .github/workflows/verify-deploy-on-push.yml | 2 +- .../src/test/java/org/apache/cayenne/tools/GradlePluginIT.java | 9 +-------- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.claude/rules/cayenne-gradle-plugin/build-jdk.md b/.claude/rules/cayenne-gradle-plugin/build-jdk.md index 2824ec334..fe4458c7b 100644 --- a/.claude/rules/cayenne-gradle-plugin/build-jdk.md +++ b/.claude/rules/cayenne-gradle-plugin/build-jdk.md @@ -5,7 +5,11 @@ description: cayenne-gradle-plugin Gradle version compatibility --- The `cayenne-gradle-plugin` integration tests run Gradle builds via `exec-maven-plugin`. -The Gradle version is selected in `GradlePluginIT.java` based on the running JDK: +Gradle 8.x does not support Java > 21. -- Java >= 25 → Gradle 8.12 -- Java 21 (minimum baseline) → Gradle 8.5 +CI excludes the module on Java 25+ by passing `--projects !cayenne-gradle-plugin` +to Maven (see `verify-deploy-on-push.yml`). No pom changes are needed — Maven's +built-in project exclusion handles it. Releases always use Java 21, so the module +is always included there. + +The IT test (`GradlePluginIT`) tests Gradle 8.5 compatibility and only runs on Java 21. diff --git a/.github/workflows/verify-deploy-on-push.yml b/.github/workflows/verify-deploy-on-push.yml index 278d9e838..9217d8d62 100644 --- a/.github/workflows/verify-deploy-on-push.yml +++ b/.github/workflows/verify-deploy-on-push.yml @@ -47,7 +47,7 @@ jobs: cache: 'maven' - name: mvn verify ${{ matrix.db-profile }} - run: mvn verify -q -DcayenneTestConnection=${{ matrix.db-profile }} -DcayenneLogLevel=ERROR + run: mvn verify -q -DcayenneTestConnection=${{ matrix.db-profile }} -DcayenneLogLevel=ERROR ${{ matrix.jdk != 21 && '--projects !cayenne-gradle-plugin' || '' }} deploy: needs: verify diff --git a/cayenne-gradle-plugin/src/test/java/org/apache/cayenne/tools/GradlePluginIT.java b/cayenne-gradle-plugin/src/test/java/org/apache/cayenne/tools/GradlePluginIT.java index 89fe05363..113b6365e 100644 --- a/cayenne-gradle-plugin/src/test/java/org/apache/cayenne/tools/GradlePluginIT.java +++ b/cayenne-gradle-plugin/src/test/java/org/apache/cayenne/tools/GradlePluginIT.java @@ -51,14 +51,7 @@ public class GradlePluginIT extends BaseTaskIT { @Test public void testGradleVersionsCompatibility() { - String[] versions; - - int javaMajorVersion = getJavaMajorVersion(System.getProperty("java.version")); - if(javaMajorVersion >= 25) { - versions = new String[]{"8.12"}; - } else { - versions = new String[]{"8.5"}; - } + String[] versions = {"8.5"}; List<String> failedVersions = new ArrayList<>(); for(String version : versions) {
