Skip to content

Commit c456ca0

Browse files
authored
Improve the error message for newer Java versions in tests (#2723)
2 parents 88c83de + 0a38f0c commit c456ca0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugin-gradle/src/test/java/com/diffplug/gradle/spotless/GradleIntegrationHarness.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,12 @@ public enum GradleVersionSupport {
5858
GradleVersionSupport(String version) {
5959
String minVersionForRunningJRE;
6060
switch (Jvm.version()) {
61+
case 26:
62+
throw new IllegalStateException("Gradle does not yet support running on Java 26. " +
63+
"You need to update the case ref to https://docs.gradle.org/current/userguide/compatibility.html.");
6164
case 25:
62-
// TODO: https://docs.gradle.org/current/userguide/compatibility.html
65+
minVersionForRunningJRE = "9.1.0";
66+
break;
6367
case 24:
6468
minVersionForRunningJRE = "8.14";
6569
break;

0 commit comments

Comments
 (0)