Added Adoptium JDK8 support and updated DistroTestPlugin JDK version used by Gradle (#3324)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
This commit is contained in:
parent
065e3cb80b
commit
e074395452
|
@ -54,7 +54,7 @@ public class Jdk implements Buildable, Iterable<File> {
|
||||||
Arrays.asList("darwin", "freebsd", "linux", "mac", "windows")
|
Arrays.asList("darwin", "freebsd", "linux", "mac", "windows")
|
||||||
);
|
);
|
||||||
private static final Pattern VERSION_PATTERN = Pattern.compile("(\\d+)(\\.\\d+\\.\\d+)?\\+(\\d+(?:\\.\\d+)?)(@([a-f0-9]{32}))?");
|
private static final Pattern VERSION_PATTERN = Pattern.compile("(\\d+)(\\.\\d+\\.\\d+)?\\+(\\d+(?:\\.\\d+)?)(@([a-f0-9]{32}))?");
|
||||||
private static final Pattern LEGACY_VERSION_PATTERN = Pattern.compile("(\\d)(u\\d+)\\+(b\\d+?)(@([a-f0-9]{32}))?");
|
private static final Pattern LEGACY_VERSION_PATTERN = Pattern.compile("(\\d)(u\\d+)(?:\\+|\\-)(b\\d+?)(@([a-f0-9]{32}))?");
|
||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
private final Configuration configuration;
|
private final Configuration configuration;
|
||||||
|
|
|
@ -110,6 +110,21 @@ public class JdkDownloadPlugin implements Plugin<Project> {
|
||||||
|
|
||||||
if (jdk.getVendor().equals(VENDOR_ADOPTIUM)) {
|
if (jdk.getVendor().equals(VENDOR_ADOPTIUM)) {
|
||||||
repoUrl = "https://github.com/adoptium/temurin" + jdk.getMajor() + "-binaries/releases/download/";
|
repoUrl = "https://github.com/adoptium/temurin" + jdk.getMajor() + "-binaries/releases/download/";
|
||||||
|
|
||||||
|
if (jdk.getMajor().equals("8")) {
|
||||||
|
// JDK-8 updates are always suffixed with 'U' (fe OpenJDK8U).
|
||||||
|
artifactPattern = "jdk"
|
||||||
|
+ jdk.getBaseVersion()
|
||||||
|
+ "-"
|
||||||
|
+ jdk.getBuild()
|
||||||
|
+ "/OpenJDK"
|
||||||
|
+ jdk.getMajor()
|
||||||
|
+ "U"
|
||||||
|
+ "-jdk_[classifier]_[module]_hotspot_"
|
||||||
|
+ jdk.getBaseVersion()
|
||||||
|
+ jdk.getBuild()
|
||||||
|
+ ".[ext]";
|
||||||
|
} else {
|
||||||
// JDK updates are suffixed with 'U' (fe OpenJDK17U), whereas GA releases are not (fe OpenJDK17).
|
// JDK updates are suffixed with 'U' (fe OpenJDK17U), whereas GA releases are not (fe OpenJDK17).
|
||||||
// To distinguish between those, the GA releases have only major version component (fe 17+32),
|
// To distinguish between those, the GA releases have only major version component (fe 17+32),
|
||||||
// the updates always have minor/patch components (fe 17.0.1+12), checking for the presence of
|
// the updates always have minor/patch components (fe 17.0.1+12), checking for the presence of
|
||||||
|
@ -126,6 +141,7 @@ public class JdkDownloadPlugin implements Plugin<Project> {
|
||||||
+ "_"
|
+ "_"
|
||||||
+ jdk.getBuild()
|
+ jdk.getBuild()
|
||||||
+ ".[ext]";
|
+ ".[ext]";
|
||||||
|
}
|
||||||
} else if (jdk.getVendor().equals(VENDOR_ADOPTOPENJDK)) {
|
} else if (jdk.getVendor().equals(VENDOR_ADOPTOPENJDK)) {
|
||||||
repoUrl = "https://api.adoptopenjdk.net/v3/binary/version/";
|
repoUrl = "https://api.adoptopenjdk.net/v3/binary/version/";
|
||||||
if (jdk.getMajor().equals("8")) {
|
if (jdk.getMajor().equals("8")) {
|
||||||
|
|
|
@ -75,8 +75,8 @@ import java.util.function.Supplier;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
public class DistroTestPlugin implements Plugin<Project> {
|
public class DistroTestPlugin implements Plugin<Project> {
|
||||||
private static final String SYSTEM_JDK_VERSION = "8u242+b08";
|
private static final String SYSTEM_JDK_VERSION = "11.0.15+10";
|
||||||
private static final String SYSTEM_JDK_VENDOR = "adoptopenjdk";
|
private static final String SYSTEM_JDK_VENDOR = "adoptium";
|
||||||
private static final String GRADLE_JDK_VERSION = "17.0.3+7";
|
private static final String GRADLE_JDK_VERSION = "17.0.3+7";
|
||||||
private static final String GRADLE_JDK_VENDOR = "adoptium";
|
private static final String GRADLE_JDK_VENDOR = "adoptium";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue