diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 051f9802c5..dba0ec1d89 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: matrix: kind: [maven, gradle] # Test on the latest Java version once Gradle & Maven support it. - jre: [11, 17, 21, 23] + jre: [11, 17, 21, 24] 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/ErrorShouldRethrowTest.java b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/ErrorShouldRethrowTest.java index e083161a09..ebd4bcbbf2 100644 --- a/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/ErrorShouldRethrowTest.java +++ b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/ErrorShouldRethrowTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 DiffPlug + * Copyright 2016-2025 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ */ package com.diffplug.gradle.spotless; +import static org.junit.jupiter.api.condition.JRE.JAVA_23; + import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; @@ -22,6 +24,7 @@ import org.gradle.testkit.runner.BuildResult; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.EnabledForJreRange; import com.diffplug.selfie.Selfie; import com.diffplug.selfie.StringSelfie; @@ -57,6 +60,7 @@ void passesIfNoException() throws Exception { } @Test + @EnabledForJreRange(max = JAVA_23) // `[Incubating] Problems report is available at` presents in the output from Java 24 or above. void anyExceptionShouldFail() throws Exception { writeBuild( " } // format", @@ -105,6 +109,7 @@ void unlessExemptedByPath() throws Exception { } @Test + @EnabledForJreRange(max = JAVA_23) // `[Incubating] Problems report is available at` presents in the output from Java 24 or above. void failsIfNeitherStepNorFileExempted() throws Exception { writeBuild( " ignoreErrorForStep 'nope'", 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 100bdefc50..21fef4bc27 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 @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 DiffPlug + * Copyright 2016-2025 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,8 +54,11 @@ public enum GradleVersionSupport { GradleVersionSupport(String version) { String minVersionForRunningJRE; switch (Jvm.version()) { - case 24: + case 25: // TODO: https://docs.gradle.org/current/userguide/compatibility.html + case 24: + minVersionForRunningJRE = "8.14"; + break; case 23: minVersionForRunningJRE = "8.10"; break;