|
|
@ -19,6 +19,7 @@ package org.springframework.boot.testsupport.gradle.testkit;
|
|
|
|
import java.util.Arrays;
|
|
|
|
import java.util.Arrays;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.gradle.api.JavaVersion;
|
|
|
|
import org.gradle.util.GradleVersion;
|
|
|
|
import org.gradle.util.GradleVersion;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -31,7 +32,11 @@ public final class GradleVersions {
|
|
|
|
private GradleVersions() {
|
|
|
|
private GradleVersions() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("UnstableApiUsage")
|
|
|
|
public static List<String> allCompatible() {
|
|
|
|
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");
|
|
|
|
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);
|
|
|
|
return allCompatible().get(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static boolean isJavaVersion(JavaVersion version) {
|
|
|
|
|
|
|
|
return JavaVersion.current().isCompatibleWith(version);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|