diff --git a/build.gradle b/build.gradle index 06c6bfe88d63..e2fa767daff7 100644 --- a/build.gradle +++ b/build.gradle @@ -166,10 +166,10 @@ project.ext.compilerOptions = [ project.ext.packaging = [ adoptOpenjdk: [ - featureVersion: 15, + featureVersion: 17, interimVersion: 0, // set to `null` for the first release - updateVersion : 2, // set to `null` for the first release - buildVersion : 7 + updateVersion : 1, // set to `null` for the first release + buildVersion : 12 ] ] diff --git a/buildSrc/src/main/groovy/com/thoughtworks/go/build/AdoptOpenJDKUrlHelper.groovy b/buildSrc/src/main/groovy/com/thoughtworks/go/build/AdoptiumUrlHelper.groovy similarity index 78% rename from buildSrc/src/main/groovy/com/thoughtworks/go/build/AdoptOpenJDKUrlHelper.groovy rename to buildSrc/src/main/groovy/com/thoughtworks/go/build/AdoptiumUrlHelper.groovy index ca97a57d1fbf..6863d4093001 100644 --- a/buildSrc/src/main/groovy/com/thoughtworks/go/build/AdoptOpenJDKUrlHelper.groovy +++ b/buildSrc/src/main/groovy/com/thoughtworks/go/build/AdoptiumUrlHelper.groovy @@ -26,11 +26,12 @@ enum OperatingSystem { } } -class AdoptOpenJDKUrlHelper { +class AdoptiumUrlHelper { static String downloadURL(OperatingSystem operatingSystem, Integer featureVersion, Integer interimVersion, Integer updateVersion, Integer buildVersion) { String versionComponent = [featureVersion, interimVersion, updateVersion].findAll({ it != null }).join('.') + String featureSuffix = updateVersion == null ? '' : 'U' - "https://github.com/AdoptOpenJDK/openjdk${featureVersion}-binaries/releases/download/jdk-${versionComponent}%2B${buildVersion}/OpenJDK${featureVersion}U-jre_x64_${operatingSystem.name()}_hotspot_${versionComponent}_${buildVersion}.${operatingSystem.extension}" + "https://github.com/adoptium/temurin${featureVersion}-binaries/releases/download/jdk-${versionComponent}%2B${buildVersion}/OpenJDK${featureVersion}${featureSuffix}-jre_x64_${operatingSystem.name()}_hotspot_${versionComponent}_${buildVersion}.${operatingSystem.extension}" } static String sha256sumURL(OperatingSystem operatingSystem, Integer featureVersion, Integer interimVersion, Integer updateVersion, Integer buildVersion) { diff --git a/buildSrc/src/main/groovy/com/thoughtworks/go/build/docker/DistroBehavior.groovy b/buildSrc/src/main/groovy/com/thoughtworks/go/build/docker/DistroBehavior.groovy index 2434ad50e058..0ea86568ced4 100644 --- a/buildSrc/src/main/groovy/com/thoughtworks/go/build/docker/DistroBehavior.groovy +++ b/buildSrc/src/main/groovy/com/thoughtworks/go/build/docker/DistroBehavior.groovy @@ -16,7 +16,7 @@ package com.thoughtworks.go.build.docker -import com.thoughtworks.go.build.AdoptOpenJDKUrlHelper +import com.thoughtworks.go.build.AdoptiumUrlHelper import org.gradle.api.Project trait DistroBehavior { @@ -53,7 +53,7 @@ trait DistroBehavior { } List getInstallJavaCommands(Project project) { - def downloadUrl = AdoptOpenJDKUrlHelper.downloadURL( + def downloadUrl = AdoptiumUrlHelper.downloadURL( com.thoughtworks.go.build.OperatingSystem.linux, project.packaging.adoptOpenjdk.featureVersion, project.packaging.adoptOpenjdk.interimVersion, diff --git a/installers/linux.gradle b/installers/linux.gradle index d474f0f4eca3..5e484c909bf9 100644 --- a/installers/linux.gradle +++ b/installers/linux.gradle @@ -15,7 +15,7 @@ */ -import com.thoughtworks.go.build.AdoptOpenJDKUrlHelper +import com.thoughtworks.go.build.AdoptiumUrlHelper import com.thoughtworks.go.build.DownloadFile import com.thoughtworks.go.build.InstallerType import groovy.json.JsonOutput @@ -105,7 +105,7 @@ private File destFile(String url) { } task downloadLinuxJreChecksum(type: DownloadFile) { - def srcUrl = AdoptOpenJDKUrlHelper.sha256sumURL( + def srcUrl = AdoptiumUrlHelper.sha256sumURL( com.thoughtworks.go.build.OperatingSystem.linux, project.packaging.adoptOpenjdk.featureVersion, project.packaging.adoptOpenjdk.interimVersion, @@ -119,7 +119,7 @@ task downloadLinuxJreChecksum(type: DownloadFile) { task downloadLinuxJre(type: DownloadFile) { dependsOn downloadLinuxJreChecksum - def srcUrl = AdoptOpenJDKUrlHelper.downloadURL( + def srcUrl = AdoptiumUrlHelper.downloadURL( com.thoughtworks.go.build.OperatingSystem.linux, project.packaging.adoptOpenjdk.featureVersion, project.packaging.adoptOpenjdk.interimVersion, diff --git a/installers/osx.gradle b/installers/osx.gradle index 29106dd7b6c9..20ac14f6805a 100644 --- a/installers/osx.gradle +++ b/installers/osx.gradle @@ -1,4 +1,4 @@ -import com.thoughtworks.go.build.AdoptOpenJDKUrlHelper +import com.thoughtworks.go.build.AdoptiumUrlHelper import com.thoughtworks.go.build.DownloadFile import com.thoughtworks.go.build.InstallerType import org.apache.commons.codec.digest.DigestUtils @@ -24,7 +24,7 @@ private File destFile(String url) { } task downloadOsxJreChecksum(type: DownloadFile) { - def srcUrl = AdoptOpenJDKUrlHelper.sha256sumURL( + def srcUrl = AdoptiumUrlHelper.sha256sumURL( com.thoughtworks.go.build.OperatingSystem.mac, project.packaging.adoptOpenjdk.featureVersion, project.packaging.adoptOpenjdk.interimVersion, @@ -37,7 +37,7 @@ task downloadOsxJreChecksum(type: DownloadFile) { task downloadOsxJre(type: DownloadFile) { dependsOn downloadOsxJreChecksum - def srcUrl = AdoptOpenJDKUrlHelper.downloadURL( + def srcUrl = AdoptiumUrlHelper.downloadURL( com.thoughtworks.go.build.OperatingSystem.mac, project.packaging.adoptOpenjdk.featureVersion, project.packaging.adoptOpenjdk.interimVersion, diff --git a/installers/windows.gradle b/installers/windows.gradle index 54f607f7e41c..3055a2fb51e7 100644 --- a/installers/windows.gradle +++ b/installers/windows.gradle @@ -15,7 +15,7 @@ */ -import com.thoughtworks.go.build.AdoptOpenJDKUrlHelper +import com.thoughtworks.go.build.AdoptiumUrlHelper import com.thoughtworks.go.build.DownloadFile import com.thoughtworks.go.build.InstallerType import org.apache.commons.codec.digest.DigestUtils @@ -26,7 +26,7 @@ private File destFile(String url) { } task downloadWindowsJreChecksum(type: DownloadFile) { - def srcUrl = AdoptOpenJDKUrlHelper.sha256sumURL( + def srcUrl = AdoptiumUrlHelper.sha256sumURL( com.thoughtworks.go.build.OperatingSystem.windows, project.packaging.adoptOpenjdk.featureVersion, project.packaging.adoptOpenjdk.interimVersion, @@ -39,7 +39,7 @@ task downloadWindowsJreChecksum(type: DownloadFile) { task downloadWindowsJre(type: DownloadFile) { dependsOn downloadWindowsJreChecksum - def srcUrl = AdoptOpenJDKUrlHelper.downloadURL( + def srcUrl = AdoptiumUrlHelper.downloadURL( com.thoughtworks.go.build.OperatingSystem.windows, project.packaging.adoptOpenjdk.featureVersion, project.packaging.adoptOpenjdk.interimVersion,