mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Merge branch '3.1.x'
This commit is contained in:
commit
fe927f0e06
@ -148,5 +148,5 @@ artifacts {
|
||||
}
|
||||
|
||||
toolchain {
|
||||
maximumCompatibleJavaVersion = JavaLanguageVersion.of(18)
|
||||
maximumCompatibleJavaVersion = JavaLanguageVersion.of(20)
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ package org.springframework.boot.testsupport.gradle.testkit;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.gradle.api.JavaVersion;
|
||||
import org.gradle.util.GradleVersion;
|
||||
|
||||
/**
|
||||
@ -31,7 +32,11 @@ public final class GradleVersions {
|
||||
private GradleVersions() {
|
||||
}
|
||||
|
||||
@SuppressWarnings("UnstableApiUsage")
|
||||
public static List<String> allCompatible() {
|
||||
if (isJavaVersion(JavaVersion.VERSION_20)) {
|
||||
return Arrays.asList("8.1.1", "8.2-rc-1");
|
||||
}
|
||||
return Arrays.asList("7.5.1", GradleVersion.current().getVersion(), "8.0.2", "8.1.1", "8.2-rc-1");
|
||||
}
|
||||
|
||||
@ -39,4 +44,8 @@ public final class GradleVersions {
|
||||
return allCompatible().get(0);
|
||||
}
|
||||
|
||||
private static boolean isJavaVersion(JavaVersion version) {
|
||||
return JavaVersion.current().isCompatibleWith(version);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user