From 7145a101976a9a8d124b3172e407fc850e1a2d30 Mon Sep 17 00:00:00 2001 From: Goooler Date: Wed, 5 Jun 2024 16:29:14 +0800 Subject: [PATCH] Add Java 22 into test matrix --- .github/workflows/ci.yml | 2 +- .../diffplug/gradle/spotless/GradleIntegrationHarness.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e015ed123..4c9f399035 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: matrix: kind: [maven, gradle] # Test on the latest Java version once Gradle & Maven support it. - jre: [11, 17, 21] + jre: [11, 17, 21, 22] os: [ubuntu-latest] include: # test windows at the diagonals of the above matrix diff --git a/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/GradleIntegrationHarness.java b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/GradleIntegrationHarness.java index 8ef71ec020..0084893274 100644 --- a/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/GradleIntegrationHarness.java +++ b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/GradleIntegrationHarness.java @@ -54,8 +54,11 @@ public enum GradleVersionSupport { GradleVersionSupport(String version) { String minVersionForRunningJRE; switch (Jvm.version()) { - case 22: + case 23: // TODO: https://docs.gradle.org/current/userguide/compatibility.html + case 22: + minVersionForRunningJRE = "8.8"; + break; case 21: minVersionForRunningJRE = "8.5"; break;