mirror of
https://github.com/actions/setup-java.git
synced 2026-07-31 16:12:59 +00:00
Remove legacy Adopt distributions
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -34,7 +34,7 @@ jobs:
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
cache: gradle
|
||||
- name: Create files to cache
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
cache: gradle
|
||||
cache-read-only: true
|
||||
@@ -85,7 +85,7 @@ jobs:
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
cache: maven
|
||||
- name: Create files to cache
|
||||
@@ -111,7 +111,7 @@ jobs:
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
cache: maven
|
||||
cache-read-only: true
|
||||
@@ -138,7 +138,7 @@ jobs:
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
cache: sbt
|
||||
- name: Setup SBT
|
||||
@@ -178,7 +178,7 @@ jobs:
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
cache: sbt
|
||||
cache-read-only: true
|
||||
@@ -207,7 +207,7 @@ jobs:
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
cache: gradle
|
||||
cache-dependency-path: __tests__/cache/gradle1/*.gradle*
|
||||
@@ -236,7 +236,7 @@ jobs:
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
cache: gradle
|
||||
cache-dependency-path: __tests__/cache/gradle1/*.gradle*
|
||||
@@ -260,7 +260,7 @@ jobs:
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
cache: gradle
|
||||
cache-dependency-path: __tests__/cache/gradle2/*.gradle*
|
||||
@@ -281,7 +281,7 @@ jobs:
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
cache: maven
|
||||
cache-dependency-path: __tests__/cache/maven/pom.xml
|
||||
@@ -308,7 +308,7 @@ jobs:
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
cache: maven
|
||||
cache-dependency-path: __tests__/cache/maven/pom.xml
|
||||
@@ -332,7 +332,7 @@ jobs:
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
cache: maven
|
||||
cache-dependency-path: |
|
||||
@@ -359,7 +359,7 @@ jobs:
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
cache: sbt
|
||||
cache-dependency-path: __tests__/cache/sbt/*.sbt
|
||||
@@ -400,7 +400,7 @@ jobs:
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
cache: sbt
|
||||
cache-dependency-path: __tests__/cache/sbt/*.sbt
|
||||
@@ -434,7 +434,7 @@ jobs:
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
cache: sbt
|
||||
cache-dependency-path: __tests__/cache/sbt2/*.sbt
|
||||
@@ -458,7 +458,7 @@ jobs:
|
||||
- name: Run setup-java with a custom Maven cache path
|
||||
uses: ./
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
cache: maven
|
||||
cache-dependency-path: |
|
||||
@@ -483,7 +483,7 @@ jobs:
|
||||
- name: Run setup-java with a custom Maven cache path
|
||||
uses: ./
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
cache: maven
|
||||
cache-dependency-path: |
|
||||
|
||||
@@ -15,47 +15,6 @@ permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
setup-java-local-file-adopt:
|
||||
name: Validate installation from local file Adopt
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Download Adopt OpenJDK file
|
||||
run: |
|
||||
if ($IsLinux) {
|
||||
$downloadUrl = "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_linux_hotspot_11.0.10_9.tar.gz"
|
||||
$localFilename = "java_package.tar.gz"
|
||||
} elseif ($IsMacOS) {
|
||||
$downloadUrl = "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_mac_hotspot_11.0.10_9.tar.gz"
|
||||
$localFilename = "java_package.tar.gz"
|
||||
} elseif ($IsWindows) {
|
||||
$downloadUrl = "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_windows_hotspot_11.0.10_9.zip"
|
||||
$localFilename = "java_package.zip"
|
||||
}
|
||||
echo "LocalFilename=$localFilename" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
(New-Object System.Net.WebClient).DownloadFile($downloadUrl, "$env:RUNNER_TEMP/$localFilename")
|
||||
shell: pwsh
|
||||
- name: setup-java
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: 'jdkfile'
|
||||
jdk-file: ${{ runner.temp }}/${{ env.LocalFilename }}
|
||||
java-version: '11.0.0-ea'
|
||||
architecture: x64
|
||||
- name: Verify Java version
|
||||
env:
|
||||
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||
run: bash __tests__/verify-java.sh "11.0.10" "$JAVA_PATH"
|
||||
shell: bash
|
||||
|
||||
setup-java-local-file-zulu:
|
||||
name: Validate installation from local file Zulu
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
server-id: maven
|
||||
server-username-env-var: MAVEN_USERNAME
|
||||
@@ -90,7 +90,7 @@ jobs:
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
server-id: maven
|
||||
server-username-env-var: MAVEN_USERNAME
|
||||
@@ -128,7 +128,7 @@ jobs:
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
server-id: maven
|
||||
server-username-env-var: MAVEN_USERNAME
|
||||
@@ -161,7 +161,7 @@ jobs:
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
server-id: maven
|
||||
server-username-env-var: MAVEN_USERNAME
|
||||
|
||||
@@ -21,10 +21,9 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||
distribution: [
|
||||
distribution:
|
||||
[
|
||||
'temurin',
|
||||
'adopt',
|
||||
'adopt-openj9',
|
||||
'zulu',
|
||||
'liberica',
|
||||
'microsoft',
|
||||
@@ -35,7 +34,7 @@ jobs:
|
||||
'jetbrains',
|
||||
'kona',
|
||||
'liberica-nik'
|
||||
] # internally 'adopt-hotspot' is the same as 'adopt'
|
||||
]
|
||||
version: ['21', '11', '17']
|
||||
exclude:
|
||||
- distribution: microsoft
|
||||
@@ -581,11 +580,8 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: *default_os
|
||||
distribution: ['adopt', 'adopt-openj9', 'zulu']
|
||||
distribution: ['temurin', 'zulu']
|
||||
java-version-file: ['.java-version', '.tool-versions']
|
||||
exclude:
|
||||
- os: macos-latest
|
||||
distribution: adopt-openj9
|
||||
steps:
|
||||
- *checkout_step
|
||||
- name: Create .java-version file
|
||||
@@ -613,7 +609,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: *default_os
|
||||
distribution: ['adopt', 'zulu', 'liberica']
|
||||
distribution: ['temurin', 'zulu', 'liberica']
|
||||
java-version-file: ['.java-version', '.tool-versions', '.sdkmanrc']
|
||||
steps:
|
||||
- *checkout_step
|
||||
|
||||
@@ -33,6 +33,8 @@ This action allows you to work with Java and Scala projects.
|
||||
|
||||
See [GPG](docs/advanced-usage.md#gpg) for details.
|
||||
|
||||
- **Legacy AdoptOpenJDK distributions were removed.** Replace `adopt` or `adopt-hotspot` with `temurin`, and replace `adopt-openj9` with `semeru`.
|
||||
|
||||
## Breaking changes in V5
|
||||
|
||||
- Upgraded action from node20 to node24
|
||||
@@ -101,7 +103,7 @@ For more details, see the full release notes on the [releases page](https://git
|
||||
|
||||
### Download integrity verification
|
||||
|
||||
When a selected distribution publishes an authoritative checksum for an archive, `setup-java` automatically verifies each downloaded JDK, JRE, or JMOD archive before extraction and caching. No input is required. Automatic checksum verification is currently available for `temurin`, `semeru`, `adopt`, `corretto`, `dragonwell`, `kona`, `sapmachine`, `graalvm`, `graalvm-community`, `zulu`, `oracle`, `oracle-openjdk`, `microsoft`, and `jetbrains`.
|
||||
When a selected distribution publishes an authoritative checksum for an archive, `setup-java` automatically verifies each downloaded JDK, JRE, or JMOD archive before extraction and caching. No input is required. Automatic checksum verification is currently available for `temurin`, `semeru`, `corretto`, `dragonwell`, `kona`, `sapmachine`, `graalvm`, `graalvm-community`, `zulu`, `oracle`, `oracle-openjdk`, `microsoft`, and `jetbrains`.
|
||||
|
||||
Distributions or individual releases without an authoritative checksum continue to install normally, with the omission reported only in debug logs. Archives resolved directly from the runner tool cache are not downloaded again and therefore are not reverified.
|
||||
|
||||
@@ -152,8 +154,6 @@ Currently, the following distributions are supported:
|
||||
|-|-|-|
|
||||
| `temurin` | [Eclipse Temurin](https://adoptium.net/) | [`temurin` license](https://adoptium.net/about.html)
|
||||
| `zulu` | [Azul Zulu OpenJDK](https://www.azul.com/downloads/zulu-community/?package=jdk) | [`zulu` license](https://www.azul.com/products/zulu-and-zulu-enterprise/zulu-terms-of-use/) |
|
||||
| `adopt` or `adopt-hotspot` | [AdoptOpenJDK Hotspot](https://adoptopenjdk.net/) | [`adopt-hotspot` license](https://adoptopenjdk.net/about.html) |
|
||||
| `adopt-openj9` | [AdoptOpenJDK OpenJ9](https://adoptopenjdk.net/) | [`adopt-openj9` license](https://adoptopenjdk.net/about.html) |
|
||||
| `liberica` | [Liberica JDK](https://bell-sw.com/) | [`liberica` license](https://bell-sw.com/liberica_eula/) |
|
||||
| `liberica-nik` | [Liberica Native Image Kit](https://bell-sw.com/pages/downloads/native-image-kit/) | [`liberica-nik` license](https://bell-sw.com/liberica_nik_eula/) |
|
||||
| `microsoft` | [Microsoft Build of OpenJDK](https://www.microsoft.com/openjdk) | [`microsoft` license](https://docs.microsoft.com/java/openjdk/faq)
|
||||
@@ -171,7 +171,6 @@ Currently, the following distributions are supported:
|
||||
|
||||
> [!NOTE]
|
||||
> - The different distributors can provide discrepant list of available versions / supported configurations. Please refer to the official documentation to see the list of supported versions.
|
||||
> - AdoptOpenJDK got moved to Eclipse Temurin and won't be updated anymore. It is highly recommended to migrate workflows from `adopt` and `adopt-openj9`, to `temurin` and `semeru` respectively, to keep receiving software and security updates. See more details in the [Good-bye AdoptOpenJDK post](https://blog.adoptopenjdk.net/2021/08/goodbye-adoptopenjdk-hello-adoptium/).
|
||||
> - Oracle OpenJDK builds are created and hosted by Oracle. After a limited number of releases, Oracle archives these builds and no longer provides security updates. To continue receiving security patches, users must move to Oracle JDK or choose a different vendor.
|
||||
> - For Azul Zulu OpenJDK, architecture `arm64` is mapped to `aarch64` when querying the Azul Metadata API.
|
||||
> - To comply with the GraalVM Free Terms and Conditions (GFTC) license, it is recommended to use GraalVM JDK 17 version 17.0.12, as this is the only version of GraalVM JDK 17 available under the GFTC license. Additionally, it is encouraged to consider upgrading to GraalVM JDK 21, which offers the latest features and improvements.
|
||||
|
||||
@@ -1,909 +0,0 @@
|
||||
[
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"architecture": "x64",
|
||||
"download_count": 74181,
|
||||
"heap_size": "normal",
|
||||
"image_type": "jdk",
|
||||
"jvm_impl": "hotspot",
|
||||
"os": "mac",
|
||||
"package": {
|
||||
"checksum": "09b7e6ab5d5eb4b73813f4caa793a0b616d33794a17988fa6a6b7c972e8f3dd3",
|
||||
"checksum_link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_x64_mac_hotspot_14.0.2_12.tar.gz.sha256.txt",
|
||||
"download_count": 23872,
|
||||
"link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_x64_mac_hotspot_14.0.2_12.tar.gz",
|
||||
"metadata_link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_x64_mac_hotspot_14.0.2_12.tar.gz.json",
|
||||
"name": "OpenJDK14U-jdk_x64_mac_hotspot_14.0.2_12.tar.gz",
|
||||
"size": 195705010
|
||||
},
|
||||
"project": "jdk",
|
||||
"scm_ref": "jdk-14.0.2+12_adopt",
|
||||
"updated_at": "2020-07-16T08:55:45Z"
|
||||
}
|
||||
],
|
||||
"download_count": 477080,
|
||||
"id": "MDc6UmVsZWFzZTI4NjIyMDc4.+ve8KojpqJUpsA==",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/tag/jdk-14.0.2%2B12",
|
||||
"release_name": "jdk-14.0.2+12",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2020-07-16T08:54:16Z",
|
||||
"updated_at": "2020-07-16T08:54:16Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"build": 12,
|
||||
"major": 14,
|
||||
"minor": 0,
|
||||
"openjdk_version": "14.0.2+12",
|
||||
"security": 2,
|
||||
"semver": "14.0.2+12"
|
||||
}
|
||||
},
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"architecture": "x64",
|
||||
"download_count": 58023,
|
||||
"heap_size": "normal",
|
||||
"image_type": "jdk",
|
||||
"jvm_impl": "hotspot",
|
||||
"os": "mac",
|
||||
"package": {
|
||||
"checksum": "b11cb192312530bcd84607631203d0c1727e672af12813078e6b525e3cce862d",
|
||||
"checksum_link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.1%2B7/OpenJDK14U-jdk_x64_mac_hotspot_14.0.1_7.tar.gz.sha256.txt",
|
||||
"download_count": 25276,
|
||||
"link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.1%2B7/OpenJDK14U-jdk_x64_mac_hotspot_14.0.1_7.tar.gz",
|
||||
"metadata_link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.1%2B7/OpenJDK14U-jdk_x64_mac_hotspot_14.0.1_7.tar.gz.json",
|
||||
"name": "OpenJDK14U-jdk_x64_mac_hotspot_14.0.1_7.tar.gz",
|
||||
"size": 195769653
|
||||
},
|
||||
"project": "jdk",
|
||||
"scm_ref": "jdk-14.0.1+7_adopt",
|
||||
"updated_at": "2020-04-20T12:54:23Z"
|
||||
}
|
||||
],
|
||||
"download_count": 198607,
|
||||
"id": "MDc6UmVsZWFzZTI1Njc4MzEw.z3NqYG25PFlG+Q==",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/tag/jdk-14.0.1%2B7",
|
||||
"release_name": "jdk-14.0.1+7",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2020-04-20T12:52:51Z",
|
||||
"updated_at": "2020-04-20T12:52:51Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"adopt_build_number": 1,
|
||||
"build": 7,
|
||||
"major": 14,
|
||||
"minor": 0,
|
||||
"openjdk_version": "14.0.1+7",
|
||||
"security": 1,
|
||||
"semver": "14.0.1+7.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"architecture": "x64",
|
||||
"download_count": 30069,
|
||||
"heap_size": "normal",
|
||||
"image_type": "jdk",
|
||||
"jvm_impl": "hotspot",
|
||||
"os": "mac",
|
||||
"package": {
|
||||
"checksum": "d358a7ff03905282348c6c80562a4da2e04eb377b60ad2152be4c90f8d580b7f",
|
||||
"checksum_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_x64_mac_hotspot_15.0.2_7.tar.gz.sha256.txt",
|
||||
"download_count": 3718,
|
||||
"link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_x64_mac_hotspot_15.0.2_7.tar.gz",
|
||||
"metadata_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_x64_mac_hotspot_15.0.2_7.tar.gz.json",
|
||||
"name": "OpenJDK15U-jdk_x64_mac_hotspot_15.0.2_7.tar.gz",
|
||||
"size": 195232978
|
||||
},
|
||||
"project": "jdk",
|
||||
"scm_ref": "jdk-15.0.2+7_adopt",
|
||||
"updated_at": "2021-01-22T17:33:20Z"
|
||||
}
|
||||
],
|
||||
"download_count": 124226,
|
||||
"id": "MDc6UmVsZWFzZTM2NzgwOTAw.X2+6VqPND3E8CA==",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/tag/jdk-15.0.2%2B7",
|
||||
"release_name": "jdk-15.0.2+7",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2021-01-22T17:31:37Z",
|
||||
"updated_at": "2021-01-22T17:31:37Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"build": 7,
|
||||
"major": 15,
|
||||
"minor": 0,
|
||||
"openjdk_version": "15.0.2+7",
|
||||
"security": 2,
|
||||
"semver": "15.0.2+7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"architecture": "x64",
|
||||
"download_count": 24542,
|
||||
"heap_size": "normal",
|
||||
"image_type": "jdk",
|
||||
"jvm_impl": "hotspot",
|
||||
"os": "mac",
|
||||
"package": {
|
||||
"checksum": "b8c2e2ad31f3d6676ea665d9505b06df15e23741847556612b40e3ee329fc046",
|
||||
"checksum_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.1%2B9.1/OpenJDK15U-jdk_x64_mac_hotspot_15.0.1_9.tar.gz.sha256.txt",
|
||||
"download_count": 3274,
|
||||
"link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.1%2B9.1/OpenJDK15U-jdk_x64_mac_hotspot_15.0.1_9.tar.gz",
|
||||
"metadata_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.1%2B9.1/OpenJDK15U-jdk_x64_mac_hotspot_15.0.1_9.tar.gz.json",
|
||||
"name": "OpenJDK15U-jdk_x64_mac_hotspot_15.0.1_9.tar.gz",
|
||||
"size": 195872839
|
||||
},
|
||||
"project": "jdk",
|
||||
"scm_ref": "jdk-15.0.1+9_adopt",
|
||||
"updated_at": "2020-12-01T16:57:47Z"
|
||||
}
|
||||
],
|
||||
"download_count": 25378,
|
||||
"id": "MDc6UmVsZWFzZTM0NjQ2MDU4.Yj2XZf+VBGAPtw==",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/tag/jdk-15.0.1%2B9.1",
|
||||
"release_name": "jdk-15.0.1+9.1",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2020-12-01T16:57:26Z",
|
||||
"updated_at": "2020-12-01T16:57:26Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"adopt_build_number": 1,
|
||||
"build": 9,
|
||||
"major": 15,
|
||||
"minor": 0,
|
||||
"openjdk_version": "15.0.1+9",
|
||||
"security": 1,
|
||||
"semver": "15.0.1+9.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"architecture": "x64",
|
||||
"download_count": 21675,
|
||||
"heap_size": "normal",
|
||||
"image_type": "jdk",
|
||||
"jvm_impl": "hotspot",
|
||||
"os": "mac",
|
||||
"package": {
|
||||
"checksum": "d32f9429c4992cef7be559a15c542011503d6bc38c89379800cd209a9d7ec539",
|
||||
"checksum_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.1%2B9/OpenJDK15U-jdk_x64_mac_hotspot_15.0.1_9.tar.gz.sha256.txt",
|
||||
"download_count": 11935,
|
||||
"link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.1%2B9/OpenJDK15U-jdk_x64_mac_hotspot_15.0.1_9.tar.gz",
|
||||
"metadata_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.1%2B9/OpenJDK15U-jdk_x64_mac_hotspot_15.0.1_9.tar.gz.json",
|
||||
"name": "OpenJDK15U-jdk_x64_mac_hotspot_15.0.1_9.tar.gz",
|
||||
"size": 195773522
|
||||
},
|
||||
"project": "jdk",
|
||||
"scm_ref": "jdk-15.0.1+9_adopt",
|
||||
"updated_at": "2020-10-23T20:48:09Z"
|
||||
}
|
||||
],
|
||||
"download_count": 308690,
|
||||
"id": "MDc6UmVsZWFzZTMyOTk4MTUx.3oazo3YGfHhF3w==",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/tag/jdk-15.0.1%2B9",
|
||||
"release_name": "jdk-15.0.1+9",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2020-10-23T20:46:22Z",
|
||||
"updated_at": "2020-10-23T20:46:22Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"build": 9,
|
||||
"major": 15,
|
||||
"minor": 0,
|
||||
"openjdk_version": "15.0.1+9",
|
||||
"security": 1,
|
||||
"semver": "15.0.1+9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"architecture": "x64",
|
||||
"download_count": 51254,
|
||||
"heap_size": "normal",
|
||||
"image_type": "jdk",
|
||||
"jvm_impl": "hotspot",
|
||||
"os": "mac",
|
||||
"package": {
|
||||
"checksum": "bd1fc774232e2dfee93056a01f5765bd92ffb19d68dd548c233a82bb5c162be4",
|
||||
"checksum_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15%2B36/OpenJDK15U-jdk_x64_mac_hotspot_15_36.tar.gz.sha256.txt",
|
||||
"download_count": 5325,
|
||||
"link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15%2B36/OpenJDK15U-jdk_x64_mac_hotspot_15_36.tar.gz",
|
||||
"metadata_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15%2B36/OpenJDK15U-jdk_x64_mac_hotspot_15_36.tar.gz.json",
|
||||
"name": "OpenJDK15U-jdk_x64_mac_hotspot_15_36.tar.gz",
|
||||
"size": 195853361
|
||||
},
|
||||
"project": "jdk",
|
||||
"scm_ref": "jdk-15+36_adopt",
|
||||
"updated_at": "2020-09-17T07:43:54Z"
|
||||
}
|
||||
],
|
||||
"download_count": 157313,
|
||||
"id": "MDc6UmVsZWFzZTMxNDUwMjA0.eYpt0EBEjldfEQ==",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/tag/jdk-15%2B36",
|
||||
"release_name": "jdk-15+36",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2020-09-17T07:42:21Z",
|
||||
"updated_at": "2020-09-17T07:42:21Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"build": 36,
|
||||
"major": 15,
|
||||
"minor": 0,
|
||||
"openjdk_version": "15+36",
|
||||
"security": 0,
|
||||
"semver": "15.0.0+36"
|
||||
}
|
||||
},
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"architecture": "x64",
|
||||
"download_count": 27428,
|
||||
"heap_size": "normal",
|
||||
"image_type": "jdk",
|
||||
"jvm_impl": "hotspot",
|
||||
"os": "mac",
|
||||
"package": {
|
||||
"checksum": "aabc3aebb0abf1ba64d9bd5796d0c7eb7239983f6e4c0f015b5b88be5616e4bd",
|
||||
"checksum_link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14%2B36/OpenJDK14U-jdk_x64_mac_hotspot_14_36.tar.gz.sha256.txt",
|
||||
"download_count": 19544,
|
||||
"link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14%2B36/OpenJDK14U-jdk_x64_mac_hotspot_14_36.tar.gz",
|
||||
"metadata_link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14%2B36/OpenJDK14U-jdk_x64_mac_hotspot_14_36.tar.gz.json",
|
||||
"name": "OpenJDK14U-jdk_x64_mac_hotspot_14_36.tar.gz",
|
||||
"size": 201087797
|
||||
},
|
||||
"project": "jdk",
|
||||
"scm_ref": "jdk-14+36_adopt",
|
||||
"updated_at": "2020-03-18T12:13:05Z"
|
||||
}
|
||||
],
|
||||
"download_count": 364816,
|
||||
"id": "MDc6UmVsZWFzZTI0NjMxMDAy.AY7rtvmrnWWlIg==",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/tag/jdk-14%2B36",
|
||||
"release_name": "jdk-14+36",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2020-03-18T12:11:08Z",
|
||||
"updated_at": "2020-03-18T12:11:08Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"adopt_build_number": 1,
|
||||
"build": 36,
|
||||
"major": 14,
|
||||
"minor": 0,
|
||||
"openjdk_version": "14+36",
|
||||
"security": 0,
|
||||
"semver": "14.0.0+36.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"architecture": "x64",
|
||||
"download_count": 63201,
|
||||
"heap_size": "normal",
|
||||
"image_type": "jdk",
|
||||
"jvm_impl": "hotspot",
|
||||
"os": "mac",
|
||||
"package": {
|
||||
"checksum": "0ddb24efdf5aab541898d19b7667b149a1a64a8bd039b708fc58ee0284fa7e07",
|
||||
"checksum_link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jdk_x64_mac_hotspot_13.0.2_8.tar.gz.sha256.txt",
|
||||
"download_count": 32531,
|
||||
"link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jdk_x64_mac_hotspot_13.0.2_8.tar.gz",
|
||||
"metadata_link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jdk_x64_mac_hotspot_13.0.2_8.tar.gz.json",
|
||||
"name": "OpenJDK13U-jdk_x64_mac_hotspot_13.0.2_8.tar.gz",
|
||||
"size": 198206427
|
||||
},
|
||||
"project": "jdk",
|
||||
"scm_ref": "jdk-13.0.2+8_adopt",
|
||||
"updated_at": "2020-01-20T16:46:24Z"
|
||||
}
|
||||
],
|
||||
"download_count": 349677,
|
||||
"id": "MDc6UmVsZWFzZTIyOTgxNTM1.gtZYwGfBgkb3Gg==",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/tag/jdk-13.0.2%2B8",
|
||||
"release_name": "jdk-13.0.2+8",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2020-01-20T16:42:35Z",
|
||||
"updated_at": "2020-01-20T16:42:35Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"adopt_build_number": 1,
|
||||
"build": 8,
|
||||
"major": 13,
|
||||
"minor": 0,
|
||||
"openjdk_version": "13.0.2+8",
|
||||
"security": 2,
|
||||
"semver": "13.0.2+8.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"architecture": "x64",
|
||||
"download_count": 41508,
|
||||
"heap_size": "normal",
|
||||
"image_type": "jdk",
|
||||
"jvm_impl": "hotspot",
|
||||
"os": "mac",
|
||||
"package": {
|
||||
"checksum": "9c82de98ce9bc2353bcf314d85366c9a2c572db034e10a71aa47e804e13748c1",
|
||||
"checksum_link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.1%2B9/OpenJDK13U-jdk_x64_mac_hotspot_13.0.1_9.tar.gz.sha256.txt",
|
||||
"download_count": 32262,
|
||||
"link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.1%2B9/OpenJDK13U-jdk_x64_mac_hotspot_13.0.1_9.tar.gz",
|
||||
"metadata_link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.1%2B9/OpenJDK13U-jdk_x64_mac_hotspot_13.0.1_9.tar.gz.json",
|
||||
"name": "OpenJDK13U-jdk_x64_mac_hotspot_13.0.1_9.tar.gz",
|
||||
"size": 198205689
|
||||
},
|
||||
"project": "jdk",
|
||||
"scm_ref": "jdk-13.0.1+9_adopt",
|
||||
"updated_at": "2019-10-26T14:44:27Z"
|
||||
}
|
||||
],
|
||||
"download_count": 680021,
|
||||
"id": "MDc6UmVsZWFzZTIwOTk4NDA0.srlG2TmLho/j0w==",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/tag/jdk-13.0.1%2B9",
|
||||
"release_name": "jdk-13.0.1+9",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2019-10-26T14:43:52Z",
|
||||
"updated_at": "2019-10-26T14:43:52Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"adopt_build_number": 1,
|
||||
"build": 9,
|
||||
"major": 13,
|
||||
"minor": 0,
|
||||
"openjdk_version": "13.0.1+9",
|
||||
"security": 1,
|
||||
"semver": "13.0.1+9.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"architecture": "x64",
|
||||
"download_count": 37738,
|
||||
"heap_size": "normal",
|
||||
"image_type": "jdk",
|
||||
"jvm_impl": "hotspot",
|
||||
"os": "mac",
|
||||
"package": {
|
||||
"checksum": "f948be96daba250b6695e22cb51372d2ba3060e4d778dd09c89548889783099f",
|
||||
"checksum_link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jdk_x64_mac_hotspot_13_33.tar.gz.sha256.txt",
|
||||
"download_count": 37738,
|
||||
"link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jdk_x64_mac_hotspot_13_33.tar.gz",
|
||||
"metadata_link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jdk_x64_mac_hotspot_13_33.tar.gz.json",
|
||||
"name": "OpenJDK13U-jdk_x64_mac_hotspot_13_33.tar.gz",
|
||||
"size": 198189530
|
||||
},
|
||||
"project": "jdk",
|
||||
"scm_ref": "jdk-13+33_adopt",
|
||||
"updated_at": "2019-09-19T10:20:21Z"
|
||||
}
|
||||
],
|
||||
"download_count": 226200,
|
||||
"id": "MDc6UmVsZWFzZTIwMTA0MTUy.trK7qCbNtlMWFw==",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/tag/jdk-13%2B33",
|
||||
"release_name": "jdk-13+33",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2019-09-19T10:19:58Z",
|
||||
"updated_at": "2019-09-19T10:19:58Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"adopt_build_number": 1,
|
||||
"build": 33,
|
||||
"major": 13,
|
||||
"minor": 0,
|
||||
"openjdk_version": "13+33",
|
||||
"security": 0,
|
||||
"semver": "13.0.0+33.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"architecture": "x64",
|
||||
"download_count": 24493,
|
||||
"heap_size": "normal",
|
||||
"image_type": "jdk",
|
||||
"jvm_impl": "hotspot",
|
||||
"os": "mac",
|
||||
"package": {
|
||||
"checksum": "9919eee037554d40c7d2f219bbd654f2bf119e16a2f4d284d8dedaf525ee59e6",
|
||||
"checksum_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz.sha256.txt",
|
||||
"download_count": 22907,
|
||||
"link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz",
|
||||
"metadata_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz.json",
|
||||
"name": "OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz",
|
||||
"size": 198392994
|
||||
},
|
||||
"project": "jdk",
|
||||
"scm_ref": "jdk-12.0.2+10_adopt",
|
||||
"updated_at": "2019-07-18T20:27:24Z"
|
||||
}
|
||||
],
|
||||
"download_count": 396318,
|
||||
"id": "MDc6UmVsZWFzZTE4NzE2Mzk5.S/VUFSgnrVIv8A==",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/tag/jdk-12.0.2%2B10",
|
||||
"release_name": "jdk-12.0.2+10",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2019-07-18T20:26:29Z",
|
||||
"updated_at": "2019-07-18T20:26:29Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"adopt_build_number": 1,
|
||||
"build": 10,
|
||||
"major": 12,
|
||||
"minor": 0,
|
||||
"openjdk_version": "12.0.2+10",
|
||||
"security": 2,
|
||||
"semver": "12.0.2+10.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"architecture": "x64",
|
||||
"download_count": 5539,
|
||||
"heap_size": "normal",
|
||||
"image_type": "jdk",
|
||||
"jvm_impl": "hotspot",
|
||||
"os": "mac",
|
||||
"package": {
|
||||
"checksum": "7acd697e816491d31b24d0ae1867fd63060aa738cfa388757946ae312a60b4f2",
|
||||
"checksum_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10.3/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz.sha256.txt",
|
||||
"download_count": 5539,
|
||||
"link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10.3/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz",
|
||||
"metadata_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10.3/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz.json",
|
||||
"name": "OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz",
|
||||
"size": 198429049
|
||||
},
|
||||
"project": "jdk",
|
||||
"scm_ref": "jdk-12.0.2+10_adopt",
|
||||
"updated_at": "2019-09-19T17:17:37Z"
|
||||
}
|
||||
],
|
||||
"download_count": 5879,
|
||||
"id": "MDc6UmVsZWFzZTIwMTE2ODQ3.QGQl8Nj1qkma4Q==",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/tag/jdk-12.0.2%2B10.3",
|
||||
"release_name": "jdk-12.0.2+10.3",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2019-09-19T17:17:26Z",
|
||||
"updated_at": "2019-12-06T15:10:37Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"adopt_build_number": 3,
|
||||
"build": 10,
|
||||
"major": 12,
|
||||
"minor": 0,
|
||||
"openjdk_version": "12.0.2+10",
|
||||
"security": 2,
|
||||
"semver": "12.0.2+10.3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"architecture": "x64",
|
||||
"download_count": 22794,
|
||||
"heap_size": "normal",
|
||||
"image_type": "jdk",
|
||||
"jvm_impl": "hotspot",
|
||||
"os": "mac",
|
||||
"package": {
|
||||
"checksum": "2c1a46c0fab6d4bdbc443f23c3f6a313c2de47fbbd9c16b5c1133a88f6c1ab8f",
|
||||
"checksum_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10.2/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz.sha256.txt",
|
||||
"download_count": 637,
|
||||
"link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10.2/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz",
|
||||
"metadata_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10.2/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz.json",
|
||||
"name": "OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz",
|
||||
"size": 198862174
|
||||
},
|
||||
"project": "jdk",
|
||||
"scm_ref": "jdk-12.0.2+10_adopt",
|
||||
"updated_at": "2019-08-06T10:41:10Z"
|
||||
}
|
||||
],
|
||||
"download_count": 23563,
|
||||
"id": "MDc6UmVsZWFzZTE5MTAzMTI3.in65dKG+veAxOg==",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/tag/jdk-12.0.2%2B10.2",
|
||||
"release_name": "jdk-12.0.2+10.2",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2019-08-06T10:40:44Z",
|
||||
"updated_at": "2019-08-06T10:40:44Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"adopt_build_number": 2,
|
||||
"build": 10,
|
||||
"major": 12,
|
||||
"minor": 0,
|
||||
"openjdk_version": "12.0.2+10",
|
||||
"security": 2,
|
||||
"semver": "12.0.2+10.2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"architecture": "x64",
|
||||
"download_count": 24493,
|
||||
"heap_size": "normal",
|
||||
"image_type": "jdk",
|
||||
"jvm_impl": "hotspot",
|
||||
"os": "mac",
|
||||
"package": {
|
||||
"checksum": "9919eee037554d40c7d2f219bbd654f2bf119e16a2f4d284d8dedaf525ee59e6",
|
||||
"checksum_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz.sha256.txt",
|
||||
"download_count": 22907,
|
||||
"link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz",
|
||||
"metadata_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz.json",
|
||||
"name": "OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz",
|
||||
"size": 198392994
|
||||
},
|
||||
"project": "jdk",
|
||||
"scm_ref": "jdk-12.0.2+9_adopt",
|
||||
"updated_at": "2019-07-18T20:27:24Z"
|
||||
}
|
||||
],
|
||||
"download_count": 396318,
|
||||
"id": "MDc6UmVsZWFzZTE4NzE2Mzk5.S/VUFSgnrVIv8A==",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/tag/jdk-12.0.2%2B10",
|
||||
"release_name": "jdk-12.0.2+9",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2019-07-18T20:26:29Z",
|
||||
"updated_at": "2019-07-18T20:26:29Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"adopt_build_number": 1,
|
||||
"build": 10,
|
||||
"major": 12,
|
||||
"minor": 0,
|
||||
"openjdk_version": "12.0.2+9",
|
||||
"security": 2,
|
||||
"semver": "12.0.2+9.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"architecture": "x64",
|
||||
"download_count": 39519,
|
||||
"heap_size": "normal",
|
||||
"image_type": "jdk",
|
||||
"jvm_impl": "hotspot",
|
||||
"os": "mac",
|
||||
"package": {
|
||||
"checksum": "dcb2ab681247298eda018df24166ba01674127083fb02892acf087e6181d8c56",
|
||||
"checksum_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.1%2B12/OpenJDK12U-jdk_x64_mac_hotspot_12.0.1_12.tar.gz.sha256.txt",
|
||||
"download_count": 33306,
|
||||
"link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.1%2B12/OpenJDK12U-jdk_x64_mac_hotspot_12.0.1_12.tar.gz",
|
||||
"name": "OpenJDK12U-jdk_x64_mac_hotspot_12.0.1_12.tar.gz",
|
||||
"size": 198112975
|
||||
},
|
||||
"project": "jdk",
|
||||
"updated_at": "2019-04-21T15:12:34Z"
|
||||
}
|
||||
],
|
||||
"download_count": 1038669,
|
||||
"id": "MDc6UmVsZWFzZTE2ODg3NDU3",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/tag/jdk-12.0.1%2B12",
|
||||
"release_name": "jdk-12.0.1+12",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2019-04-21T15:11:56Z",
|
||||
"updated_at": "2019-04-21T15:11:56Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"build": 12,
|
||||
"major": 12,
|
||||
"minor": 0,
|
||||
"openjdk_version": "12.0.1+12",
|
||||
"security": 1,
|
||||
"semver": "12.0.1+12"
|
||||
}
|
||||
},
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"architecture": "x64",
|
||||
"download_count": 3136,
|
||||
"heap_size": "normal",
|
||||
"image_type": "jdk",
|
||||
"jvm_impl": "hotspot",
|
||||
"os": "mac",
|
||||
"package": {
|
||||
"checksum": "985036459d4ef0867a3fe83b0bf87877d8e66a121c7b9c145bb97bd921aaf3f1",
|
||||
"checksum_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12%2B33/OpenJDK12U-jdk_x64_mac_hotspot_12_33.tar.gz.sha256.txt",
|
||||
"download_count": 1905,
|
||||
"link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12%2B33/OpenJDK12U-jdk_x64_mac_hotspot_12_33.tar.gz",
|
||||
"name": "OpenJDK12U-jdk_x64_mac_hotspot_12_33.tar.gz",
|
||||
"size": 198099074
|
||||
},
|
||||
"project": "jdk",
|
||||
"updated_at": "2019-03-22T12:09:13Z"
|
||||
}
|
||||
],
|
||||
"download_count": 757289,
|
||||
"id": "MDc6UmVsZWFzZTE2MjgyMjM2",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/tag/jdk-12%2B33",
|
||||
"release_name": "jdk-12+33",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2019-03-22T12:08:43Z",
|
||||
"updated_at": "2019-03-22T12:08:43Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"build": 33,
|
||||
"major": 12,
|
||||
"minor": 0,
|
||||
"openjdk_version": "12+33",
|
||||
"security": 0,
|
||||
"semver": "12.0.0+33"
|
||||
}
|
||||
},
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"architecture": "x64",
|
||||
"download_count": 75576,
|
||||
"heap_size": "normal",
|
||||
"image_type": "jdk",
|
||||
"jvm_impl": "hotspot",
|
||||
"os": "mac",
|
||||
"package": {
|
||||
"checksum": "ee7c98c9d79689aca6e717965747b8bf4eec5413e89d5444cc2bd6dbd59e3811",
|
||||
"checksum_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_mac_hotspot_11.0.10_9.tar.gz.sha256.txt",
|
||||
"download_count": 17426,
|
||||
"link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_mac_hotspot_11.0.10_9.tar.gz",
|
||||
"metadata_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_mac_hotspot_11.0.10_9.tar.gz.json",
|
||||
"name": "OpenJDK11U-jdk_x64_mac_hotspot_11.0.10_9.tar.gz",
|
||||
"size": 186160219
|
||||
},
|
||||
"project": "jdk",
|
||||
"scm_ref": "jdk-11.0.10+9_adopt",
|
||||
"updated_at": "2021-01-22T14:16:47Z"
|
||||
}
|
||||
],
|
||||
"download_count": 636180,
|
||||
"id": "MDc6UmVsZWFzZTM2NzcwNDUy.hAVJRiZZTufG+w==",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/tag/jdk-11.0.10%2B9",
|
||||
"release_name": "jdk-11.0.10+9",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2021-01-22T14:15:12Z",
|
||||
"updated_at": "2021-01-22T14:15:12Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"build": 9,
|
||||
"major": 11,
|
||||
"minor": 0,
|
||||
"openjdk_version": "11.0.10+9",
|
||||
"security": 10,
|
||||
"semver": "11.0.10+9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"architecture": "x64",
|
||||
"download_count": 108441,
|
||||
"heap_size": "normal",
|
||||
"image_type": "jdk",
|
||||
"jvm_impl": "hotspot",
|
||||
"os": "mac",
|
||||
"package": {
|
||||
"checksum": "96bc469f9b02a3b84382a0685b0bd7935e1ad1bd82a0aab9befb5b42a17cbd77",
|
||||
"checksum_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9.1%2B1/OpenJDK11U-jdk_x64_mac_hotspot_11.0.9.1_1.tar.gz.sha256.txt",
|
||||
"download_count": 22211,
|
||||
"link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9.1%2B1/OpenJDK11U-jdk_x64_mac_hotspot_11.0.9.1_1.tar.gz",
|
||||
"metadata_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9.1%2B1/OpenJDK11U-jdk_x64_mac_hotspot_11.0.9.1_1.tar.gz.json",
|
||||
"name": "OpenJDK11U-jdk_x64_mac_hotspot_11.0.9.1_1.tar.gz",
|
||||
"size": 185368626
|
||||
},
|
||||
"project": "jdk",
|
||||
"scm_ref": "jdk-11.0.9.1+1_adopt",
|
||||
"updated_at": "2020-11-12T14:10:45Z"
|
||||
}
|
||||
],
|
||||
"download_count": 815676,
|
||||
"id": "MDc6UmVsZWFzZTMzODU4MDE1.94IbKUd3vvhzsA==",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/tag/jdk-11.0.9.1%2B1",
|
||||
"release_name": "jdk-11.0.9.1+1",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2020-11-12T14:08:55Z",
|
||||
"updated_at": "2020-11-12T14:08:55Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"build": 1,
|
||||
"major": 11,
|
||||
"minor": 0,
|
||||
"openjdk_version": "11.0.9.1+1",
|
||||
"patch": 1,
|
||||
"security": 9,
|
||||
"semver": "11.0.9+101"
|
||||
}
|
||||
},
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"architecture": "x64",
|
||||
"download_count": 45450,
|
||||
"heap_size": "normal",
|
||||
"image_type": "jdk",
|
||||
"jvm_impl": "hotspot",
|
||||
"os": "mac",
|
||||
"package": {
|
||||
"checksum": "7b21961ffb2649e572721a0dfad64169b490e987937b661cb4e13a594c21e764",
|
||||
"checksum_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9%2B11.1/OpenJDK11U-jdk_x64_mac_hotspot_11.0.9_11.tar.gz.sha256.txt",
|
||||
"download_count": 11117,
|
||||
"link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9%2B11.1/OpenJDK11U-jdk_x64_mac_hotspot_11.0.9_11.tar.gz",
|
||||
"metadata_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9%2B11.1/OpenJDK11U-jdk_x64_mac_hotspot_11.0.9_11.tar.gz.json",
|
||||
"name": "OpenJDK11U-jdk_x64_mac_hotspot_11.0.9_11.tar.gz",
|
||||
"size": 186006796
|
||||
},
|
||||
"project": "jdk",
|
||||
"scm_ref": "jdk-11.0.9+11_adopt",
|
||||
"updated_at": "2020-10-25T14:43:54Z"
|
||||
}
|
||||
],
|
||||
"download_count": 423635,
|
||||
"id": "MDc6UmVsZWFzZTMzMDI4MDcz.dRvNNRwJCgY3Xw==",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/tag/jdk-11.0.9%2B11.1",
|
||||
"release_name": "jdk-11.0.9+11.1",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2020-10-25T13:31:15Z",
|
||||
"updated_at": "2020-10-25T13:31:15Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"adopt_build_number": 1,
|
||||
"build": 11,
|
||||
"major": 11,
|
||||
"minor": 0,
|
||||
"openjdk_version": "11.0.9+11",
|
||||
"security": 9,
|
||||
"semver": "11.0.9+11.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"architecture": "x64",
|
||||
"download_count": 2456,
|
||||
"heap_size": "normal",
|
||||
"image_type": "jdk",
|
||||
"jvm_impl": "hotspot",
|
||||
"os": "mac",
|
||||
"package": {
|
||||
"checksum": "e84b00d74f08f059829bbf121c8423dc37ff65135968c1fcda5839600be4f542",
|
||||
"checksum_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9%2B11/OpenJDK11U-jdk_x64_mac_hotspot_11.0.9_11.tar.gz.sha256.txt",
|
||||
"download_count": 1046,
|
||||
"link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9%2B11/OpenJDK11U-jdk_x64_mac_hotspot_11.0.9_11.tar.gz",
|
||||
"metadata_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9%2B11/OpenJDK11U-jdk_x64_mac_hotspot_11.0.9_11.tar.gz.json",
|
||||
"name": "OpenJDK11U-jdk_x64_mac_hotspot_11.0.9_11.tar.gz",
|
||||
"size": 185532704
|
||||
},
|
||||
"project": "jdk",
|
||||
"scm_ref": "jdk-11.0.9+11_adopt",
|
||||
"updated_at": "2020-10-25T13:28:33Z"
|
||||
}
|
||||
],
|
||||
"download_count": 359580,
|
||||
"id": "MDc6UmVsZWFzZTMyOTk4MzM5.6h9TT9pzYTK2Kg==",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/tag/jdk-11.0.9%2B11",
|
||||
"release_name": "jdk-11.0.9+11",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2020-10-23T20:52:14Z",
|
||||
"updated_at": "2020-10-23T20:52:14Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"build": 11,
|
||||
"major": 11,
|
||||
"minor": 0,
|
||||
"openjdk_version": "11.0.9+11",
|
||||
"security": 9,
|
||||
"semver": "11.0.9+11"
|
||||
}
|
||||
},
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"architecture": "x64",
|
||||
"download_count": 149393,
|
||||
"heap_size": "normal",
|
||||
"image_type": "jdk",
|
||||
"jvm_impl": "hotspot",
|
||||
"os": "mac",
|
||||
"package": {
|
||||
"checksum": "4a8dadd58cdc32c7e59978971d56aec610be7ee0ddf0dc1d137bb8b78456499f",
|
||||
"checksum_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jdk_x64_mac_hotspot_11.0.8_10.tar.gz.sha256.txt",
|
||||
"download_count": 40158,
|
||||
"link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jdk_x64_mac_hotspot_11.0.8_10.tar.gz",
|
||||
"metadata_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jdk_x64_mac_hotspot_11.0.8_10.tar.gz.json",
|
||||
"name": "OpenJDK11U-jdk_x64_mac_hotspot_11.0.8_10.tar.gz",
|
||||
"size": 185054456
|
||||
},
|
||||
"project": "jdk",
|
||||
"scm_ref": "jdk-11.0.8+10_adopt",
|
||||
"updated_at": "2020-07-15T14:30:51Z"
|
||||
}
|
||||
],
|
||||
"download_count": 1968658,
|
||||
"id": "MDc6UmVsZWFzZTI4NTg5Nzcz.pCNBA7G9E1o7pw==",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/tag/jdk-11.0.8%2B10",
|
||||
"release_name": "jdk-11.0.8+10",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2020-07-15T14:29:27Z",
|
||||
"updated_at": "2020-07-15T14:29:27Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"build": 10,
|
||||
"major": 11,
|
||||
"minor": 0,
|
||||
"openjdk_version": "11.0.8+10",
|
||||
"security": 8,
|
||||
"semver": "11.0.8+10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"binaries": [],
|
||||
"download_count": 1968658,
|
||||
"id": "MDc6UmVsZWFzZTI4NTg5Nzcz.pCNBA7G9E1o7pw==",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/tag/jdk-11.0.8%2B10",
|
||||
"release_name": "jdk-11.0.8+10",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2020-07-15T14:29:27Z",
|
||||
"updated_at": "2020-07-15T14:29:27Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"build": 10,
|
||||
"major": 9,
|
||||
"minor": 0,
|
||||
"openjdk_version": "9.0.8+10",
|
||||
"security": 8,
|
||||
"semver": "9.0.8+10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"architecture": "x64",
|
||||
"download_count": 149393,
|
||||
"heap_size": "normal",
|
||||
"image_type": "jdk",
|
||||
"jvm_impl": "hotspot",
|
||||
"os": "mac",
|
||||
"package": {
|
||||
"checksum": "4a8dadd58cdc32c7e59978971d56aec610be7ee0ddf0dc1d137bb8b78456499f",
|
||||
"checksum_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jdk_x64_mac_hotspot_11.0.8_10.tar.gz.sha256.txt",
|
||||
"download_count": 40158,
|
||||
"link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jdk_x64_mac_hotspot_11.0.8_10.tar.gz",
|
||||
"metadata_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jdk_x64_mac_hotspot_11.0.8_10.tar.gz.json",
|
||||
"name": "OpenJDK11U-jdk_x64_mac_hotspot_11.0.8_10.tar.gz",
|
||||
"size": 185054456
|
||||
},
|
||||
"project": "jdk",
|
||||
"scm_ref": "jdk-11.0.8+10_adopt",
|
||||
"updated_at": "2020-07-15T14:30:51Z"
|
||||
}
|
||||
],
|
||||
"download_count": 1968658,
|
||||
"id": "MDc6UmVsZWFzZTI4NTg5Nzcz.pCNBA7G9E1o7pw==",
|
||||
"release_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/tag/jdk-11.0.8%2B10",
|
||||
"release_name": "jdk-11.0.8+10",
|
||||
"release_type": "ga",
|
||||
"timestamp": "2020-07-15T14:29:27Z",
|
||||
"updated_at": "2020-07-15T14:29:27Z",
|
||||
"vendor": "adoptopenjdk",
|
||||
"version_data": {
|
||||
"build": 10,
|
||||
"major": 9,
|
||||
"minor": 0,
|
||||
"openjdk_version": "9.0.8+10",
|
||||
"security": 8,
|
||||
"semver": "9.0.7+10"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,433 +0,0 @@
|
||||
import {
|
||||
jest,
|
||||
describe,
|
||||
it,
|
||||
expect,
|
||||
beforeEach,
|
||||
afterEach,
|
||||
beforeAll,
|
||||
afterAll
|
||||
} from '@jest/globals';
|
||||
import {HttpClient} from '@actions/http-client';
|
||||
import os from 'os';
|
||||
|
||||
import manifestData from '../data/adopt.json' with {type: 'json'};
|
||||
|
||||
// Mock @actions/core before importing source modules that depend on it
|
||||
jest.unstable_mockModule('@actions/core', () => ({
|
||||
info: jest.fn(),
|
||||
warning: jest.fn(),
|
||||
debug: jest.fn(),
|
||||
error: jest.fn(),
|
||||
notice: jest.fn(),
|
||||
setFailed: jest.fn(),
|
||||
setOutput: jest.fn(),
|
||||
getInput: jest.fn(),
|
||||
getBooleanInput: jest.fn(),
|
||||
getMultilineInput: jest.fn(),
|
||||
addPath: jest.fn(),
|
||||
exportVariable: jest.fn(),
|
||||
saveState: jest.fn(),
|
||||
getState: jest.fn(),
|
||||
setSecret: jest.fn(),
|
||||
isDebug: jest.fn(() => false),
|
||||
startGroup: jest.fn(),
|
||||
endGroup: jest.fn(),
|
||||
group: jest.fn((_name: string, fn: () => Promise<unknown>) => fn()),
|
||||
toPlatformPath: jest.fn((p: string) => p),
|
||||
toWin32Path: jest.fn((p: string) => p),
|
||||
toPosixPath: jest.fn((p: string) => p)
|
||||
}));
|
||||
|
||||
// Dynamic imports after mocking
|
||||
const core = await import('@actions/core');
|
||||
const {AdoptDistribution, AdoptImplementation} =
|
||||
await import('../../src/distributions/adopt/installer.js');
|
||||
const {TemurinDistribution} =
|
||||
await import('../../src/distributions/temurin/installer.js');
|
||||
|
||||
import type {IAdoptAvailableVersions} from '../../src/distributions/adopt/models.js';
|
||||
import type {AdoptImplementation as AdoptImplementationType} from '../../src/distributions/adopt/installer.js';
|
||||
import type {JavaInstallerOptions} from '../../src/distributions/base-models.js';
|
||||
|
||||
describe('getAvailableVersions', () => {
|
||||
let spyHttpClient: any;
|
||||
let spyCoreError: any;
|
||||
let spyCoreWarning: any;
|
||||
|
||||
beforeEach(() => {
|
||||
spyHttpClient = jest.spyOn(HttpClient.prototype, 'getJson');
|
||||
spyHttpClient.mockReturnValue({
|
||||
statusCode: 200,
|
||||
headers: {},
|
||||
result: []
|
||||
});
|
||||
|
||||
// Mock core.error to suppress error logs
|
||||
spyCoreError = core.error as jest.Mock;
|
||||
spyCoreError.mockImplementation(() => {});
|
||||
spyCoreWarning = core.warning as jest.Mock;
|
||||
spyCoreWarning.mockImplementation(() => {});
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
jest.resetAllMocks();
|
||||
jest.clearAllMocks();
|
||||
jest.restoreAllMocks();
|
||||
});
|
||||
|
||||
it.each([
|
||||
[
|
||||
{
|
||||
version: '11',
|
||||
architecture: 'x64',
|
||||
packageType: 'jdk',
|
||||
checkLatest: false
|
||||
},
|
||||
AdoptImplementation.Hotspot,
|
||||
'os=mac&architecture=x64&image_type=jdk&release_type=ga&jvm_impl=hotspot&page_size=20&page=0'
|
||||
],
|
||||
[
|
||||
{
|
||||
version: '11',
|
||||
architecture: 'x86',
|
||||
packageType: 'jdk',
|
||||
checkLatest: false
|
||||
},
|
||||
AdoptImplementation.Hotspot,
|
||||
'os=mac&architecture=x86&image_type=jdk&release_type=ga&jvm_impl=hotspot&page_size=20&page=0'
|
||||
],
|
||||
[
|
||||
{
|
||||
version: '11',
|
||||
architecture: 'x64',
|
||||
packageType: 'jre',
|
||||
checkLatest: false
|
||||
},
|
||||
AdoptImplementation.Hotspot,
|
||||
'os=mac&architecture=x64&image_type=jre&release_type=ga&jvm_impl=hotspot&page_size=20&page=0'
|
||||
],
|
||||
[
|
||||
{
|
||||
version: '11-ea',
|
||||
architecture: 'x64',
|
||||
packageType: 'jdk',
|
||||
checkLatest: false
|
||||
},
|
||||
AdoptImplementation.Hotspot,
|
||||
'os=mac&architecture=x64&image_type=jdk&release_type=ea&jvm_impl=hotspot&page_size=20&page=0'
|
||||
],
|
||||
[
|
||||
{
|
||||
version: '11',
|
||||
architecture: 'x64',
|
||||
packageType: 'jdk',
|
||||
checkLatest: false
|
||||
},
|
||||
AdoptImplementation.OpenJ9,
|
||||
'os=mac&architecture=x64&image_type=jdk&release_type=ga&jvm_impl=openj9&page_size=20&page=0'
|
||||
],
|
||||
[
|
||||
{
|
||||
version: '11',
|
||||
architecture: 'x86',
|
||||
packageType: 'jdk',
|
||||
checkLatest: false
|
||||
},
|
||||
AdoptImplementation.OpenJ9,
|
||||
'os=mac&architecture=x86&image_type=jdk&release_type=ga&jvm_impl=openj9&page_size=20&page=0'
|
||||
],
|
||||
[
|
||||
{
|
||||
version: '11',
|
||||
architecture: 'x64',
|
||||
packageType: 'jre',
|
||||
checkLatest: false
|
||||
},
|
||||
AdoptImplementation.OpenJ9,
|
||||
'os=mac&architecture=x64&image_type=jre&release_type=ga&jvm_impl=openj9&page_size=20&page=0'
|
||||
],
|
||||
[
|
||||
{
|
||||
version: '11-ea',
|
||||
architecture: 'x64',
|
||||
packageType: 'jdk',
|
||||
checkLatest: false
|
||||
},
|
||||
AdoptImplementation.OpenJ9,
|
||||
'os=mac&architecture=x64&image_type=jdk&release_type=ea&jvm_impl=openj9&page_size=20&page=0'
|
||||
]
|
||||
])(
|
||||
'build correct url for %s',
|
||||
async (
|
||||
installerOptions: JavaInstallerOptions,
|
||||
impl: AdoptImplementationType,
|
||||
expectedParameters
|
||||
) => {
|
||||
const distribution = new AdoptDistribution(installerOptions, impl);
|
||||
const baseUrl =
|
||||
'https://api.adoptopenjdk.net/v3/assets/version/%5B1.0,100.0%5D';
|
||||
const expectedUrl = `${baseUrl}?project=jdk&vendor=adoptopenjdk&heap_size=normal&sort_method=DEFAULT&sort_order=DESC&${expectedParameters}`;
|
||||
distribution['getPlatformOption'] = () => 'mac';
|
||||
|
||||
await distribution['getAvailableVersions']();
|
||||
|
||||
expect(spyHttpClient.mock.calls).toHaveLength(1);
|
||||
expect(spyHttpClient.mock.calls[0][0]).toBe(expectedUrl);
|
||||
}
|
||||
);
|
||||
|
||||
it('load available versions', async () => {
|
||||
const nextPageUrl =
|
||||
'https://api.adoptopenjdk.net/v3/assets/version/%5B1.0,100.0%5D?page=1&page_size=20';
|
||||
spyHttpClient = jest.spyOn(HttpClient.prototype, 'getJson');
|
||||
spyHttpClient
|
||||
.mockReturnValueOnce({
|
||||
statusCode: 200,
|
||||
headers: {link: `<${nextPageUrl}>; rel="next"`},
|
||||
result: manifestData as any
|
||||
})
|
||||
.mockReturnValueOnce({
|
||||
statusCode: 200,
|
||||
headers: {},
|
||||
result: manifestData as any
|
||||
});
|
||||
|
||||
const distribution = new AdoptDistribution(
|
||||
{
|
||||
version: '11',
|
||||
architecture: 'x64',
|
||||
packageType: 'jdk',
|
||||
checkLatest: false
|
||||
},
|
||||
AdoptImplementation.Hotspot
|
||||
);
|
||||
const availableVersions = await distribution['getAvailableVersions']();
|
||||
expect(availableVersions).not.toBeNull();
|
||||
expect(availableVersions.length).toBe(manifestData.length * 2);
|
||||
expect(spyHttpClient).toHaveBeenNthCalledWith(2, nextPageUrl);
|
||||
});
|
||||
|
||||
it('stops pagination after 1000 pages as a safeguard', async () => {
|
||||
const nextPageUrl =
|
||||
'https://api.adoptopenjdk.net/v3/assets/version/%5B1.0,100.0%5D?page=2&page_size=20';
|
||||
spyHttpClient.mockReturnValue({
|
||||
statusCode: 200,
|
||||
headers: {link: `<${nextPageUrl}>; rel="next"`},
|
||||
result: [{version_data: {semver: '17.0.1'}, binaries: []}] as any
|
||||
});
|
||||
|
||||
const distribution = new AdoptDistribution(
|
||||
{
|
||||
version: '11',
|
||||
architecture: 'x64',
|
||||
packageType: 'jdk',
|
||||
checkLatest: false
|
||||
},
|
||||
AdoptImplementation.Hotspot
|
||||
);
|
||||
|
||||
await distribution['getAvailableVersions']();
|
||||
|
||||
expect(spyHttpClient).toHaveBeenCalledTimes(1000);
|
||||
expect(spyCoreWarning).toHaveBeenCalledWith(
|
||||
expect.stringContaining('Reached pagination safeguard limit (1000 pages)')
|
||||
);
|
||||
});
|
||||
|
||||
it.each([
|
||||
[AdoptImplementation.Hotspot, 'jdk', 'Java_Adopt_jdk'],
|
||||
[AdoptImplementation.Hotspot, 'jre', 'Java_Adopt_jre'],
|
||||
[AdoptImplementation.OpenJ9, 'jdk', 'Java_Adopt-OpenJ9_jdk'],
|
||||
[AdoptImplementation.OpenJ9, 'jre', 'Java_Adopt-OpenJ9_jre']
|
||||
])(
|
||||
'find right toolchain folder',
|
||||
(impl: AdoptImplementationType, packageType: string, expected: string) => {
|
||||
const distribution = new AdoptDistribution(
|
||||
{
|
||||
version: '11',
|
||||
architecture: 'x64',
|
||||
packageType: packageType,
|
||||
checkLatest: false
|
||||
},
|
||||
impl
|
||||
);
|
||||
|
||||
// @ts-ignore - because it is protected
|
||||
expect(distribution.toolcacheFolderName).toBe(expected);
|
||||
}
|
||||
);
|
||||
|
||||
it.each([
|
||||
['amd64', 'x64'],
|
||||
['arm', 'arm'],
|
||||
['arm64', 'aarch64']
|
||||
])(
|
||||
'defaults to os.arch(): %s mapped to distro arch: %s',
|
||||
async (osArch: string, distroArch: string) => {
|
||||
jest
|
||||
.spyOn(os, 'arch')
|
||||
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
|
||||
|
||||
const installerOptions: JavaInstallerOptions = {
|
||||
version: '17',
|
||||
architecture: '', // to get default value
|
||||
packageType: 'jdk',
|
||||
checkLatest: false
|
||||
};
|
||||
|
||||
const expectedParameters = `os=mac&architecture=${distroArch}&image_type=jdk&release_type=ga&jvm_impl=hotspot&page_size=20&page=0`;
|
||||
|
||||
const distribution = new AdoptDistribution(
|
||||
installerOptions,
|
||||
AdoptImplementation.Hotspot
|
||||
);
|
||||
const baseUrl =
|
||||
'https://api.adoptopenjdk.net/v3/assets/version/%5B1.0,100.0%5D';
|
||||
const expectedUrl = `${baseUrl}?project=jdk&vendor=adoptopenjdk&heap_size=normal&sort_method=DEFAULT&sort_order=DESC&${expectedParameters}`;
|
||||
distribution['getPlatformOption'] = () => 'mac';
|
||||
|
||||
await distribution['getAvailableVersions']();
|
||||
|
||||
expect(spyHttpClient.mock.calls).toHaveLength(1);
|
||||
expect(spyHttpClient.mock.calls[0][0]).toBe(expectedUrl);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
describe('findPackageForDownload', () => {
|
||||
it('returns Temurin result and does not query Adopt API when Temurin succeeds', async () => {
|
||||
const temurinRelease = {
|
||||
version: '11.0.31+11',
|
||||
url: 'https://example.test/temurin-11.tar.gz'
|
||||
};
|
||||
const temurinFindPackageForDownload = jest
|
||||
.fn<any>()
|
||||
.mockResolvedValue(temurinRelease);
|
||||
const temurinDistribution = {
|
||||
findPackageForDownload: temurinFindPackageForDownload
|
||||
} as any;
|
||||
|
||||
const distribution = new AdoptDistribution(
|
||||
{
|
||||
version: '11',
|
||||
architecture: 'x64',
|
||||
packageType: 'jdk',
|
||||
checkLatest: false
|
||||
},
|
||||
AdoptImplementation.Hotspot,
|
||||
temurinDistribution
|
||||
);
|
||||
const adoptLookupSpy = jest.fn<any>();
|
||||
distribution['getAvailableVersions'] = adoptLookupSpy;
|
||||
|
||||
const resolvedVersion = await distribution['findPackageForDownload']('11');
|
||||
|
||||
expect(resolvedVersion).toEqual(temurinRelease);
|
||||
expect(temurinFindPackageForDownload).toHaveBeenCalledWith('11');
|
||||
expect(adoptLookupSpy).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it.each([
|
||||
['9', '9.0.7+10'],
|
||||
['15', '15.0.2+7'],
|
||||
['15.0', '15.0.2+7'],
|
||||
['15.0.2', '15.0.2+7'],
|
||||
['15.0.1', '15.0.1+9.1'],
|
||||
['11.x', '11.0.10+9'],
|
||||
['x', '15.0.2+7'],
|
||||
['12', '12.0.2+10.3'], // make sure that '12.0.2+10.1', '12.0.2+10.3', '12.0.2+10.2' are sorted correctly
|
||||
['12.0.2+10.1', '12.0.2+10.1'],
|
||||
['15.0.1+9', '15.0.1+9'],
|
||||
['15.0.1+9.1', '15.0.1+9.1']
|
||||
])('version is resolved correctly %s -> %s', async (input, expected) => {
|
||||
const distribution = new AdoptDistribution(
|
||||
{
|
||||
version: '11',
|
||||
architecture: 'x64',
|
||||
packageType: 'jdk',
|
||||
checkLatest: false
|
||||
},
|
||||
AdoptImplementation.Hotspot
|
||||
);
|
||||
// Mock Temurin to fail so fallback to AdoptOpenJDK is tested
|
||||
distribution['temurinDistribution']!['findPackageForDownload'] =
|
||||
async () => {
|
||||
throw new Error('No matching version found for SemVer');
|
||||
};
|
||||
distribution['getAvailableVersions'] = async () => manifestData as any;
|
||||
const resolvedVersion = await distribution['findPackageForDownload'](input);
|
||||
expect(resolvedVersion.version).toBe(expected);
|
||||
const vendorPackage = (manifestData as any[]).find(
|
||||
item => item.version_data.semver === expected
|
||||
).binaries[0].package;
|
||||
expect(resolvedVersion.checksum).toEqual({
|
||||
algorithm: 'sha256',
|
||||
value: vendorPackage.checksum,
|
||||
source: vendorPackage.checksum_link
|
||||
});
|
||||
});
|
||||
|
||||
it('version is found but binaries list is empty', async () => {
|
||||
const distribution = new AdoptDistribution(
|
||||
{
|
||||
version: '11',
|
||||
architecture: 'x64',
|
||||
packageType: 'jdk',
|
||||
checkLatest: false
|
||||
},
|
||||
AdoptImplementation.Hotspot
|
||||
);
|
||||
// Mock Temurin to fail so fallback to AdoptOpenJDK is tested
|
||||
distribution['temurinDistribution']!['findPackageForDownload'] =
|
||||
async () => {
|
||||
throw new Error('No matching version found for SemVer');
|
||||
};
|
||||
distribution['getAvailableVersions'] = async () => manifestData as any;
|
||||
await expect(
|
||||
distribution['findPackageForDownload']('9.0.8')
|
||||
).rejects.toThrow(/No matching version found for SemVer */);
|
||||
});
|
||||
|
||||
it('version is not found', async () => {
|
||||
const distribution = new AdoptDistribution(
|
||||
{
|
||||
version: '11',
|
||||
architecture: 'x64',
|
||||
packageType: 'jdk',
|
||||
checkLatest: false
|
||||
},
|
||||
AdoptImplementation.Hotspot
|
||||
);
|
||||
// Mock Temurin to fail so fallback to AdoptOpenJDK is tested
|
||||
distribution['temurinDistribution']!['findPackageForDownload'] =
|
||||
async () => {
|
||||
throw new Error('No matching version found for SemVer');
|
||||
};
|
||||
distribution['getAvailableVersions'] = async () => manifestData as any;
|
||||
await expect(distribution['findPackageForDownload']('7.x')).rejects.toThrow(
|
||||
/No matching version found for SemVer */
|
||||
);
|
||||
});
|
||||
|
||||
it('version list is empty', async () => {
|
||||
const distribution = new AdoptDistribution(
|
||||
{
|
||||
version: '11',
|
||||
architecture: 'x64',
|
||||
packageType: 'jdk',
|
||||
checkLatest: false
|
||||
},
|
||||
AdoptImplementation.Hotspot
|
||||
);
|
||||
// Mock Temurin to fail so fallback to AdoptOpenJDK is tested
|
||||
distribution['temurinDistribution']!['findPackageForDownload'] =
|
||||
async () => {
|
||||
throw new Error('No matching version found for SemVer');
|
||||
};
|
||||
distribution['getAvailableVersions'] = async () => [];
|
||||
await expect(distribution['findPackageForDownload']('11')).rejects.toThrow(
|
||||
/No matching version found for SemVer */
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -117,6 +117,15 @@ describe('getJavaDistribution', () => {
|
||||
).toBeNull();
|
||||
});
|
||||
|
||||
it.each(['adopt', 'adopt-hotspot', 'adopt-openj9'])(
|
||||
'does not support legacy Adopt distribution %s',
|
||||
async distributionName => {
|
||||
expect(
|
||||
await getJavaDistribution(distributionName, installerOptions('jdk'))
|
||||
).toBeNull();
|
||||
}
|
||||
);
|
||||
|
||||
it.each([
|
||||
['amd64', 'x64'],
|
||||
['ia32', 'x86'],
|
||||
|
||||
@@ -61,18 +61,6 @@ describe('Java platform capabilities', () => {
|
||||
}
|
||||
);
|
||||
|
||||
it('keeps Adopt HotSpot aliases aligned with the Temurin-first resolver', () => {
|
||||
expect(validateJavaPlatform('adopt', 'darwin', 'arm64', '21')).toBe(
|
||||
'aarch64'
|
||||
);
|
||||
expect(validateJavaPlatform('adopt-hotspot', 'win32', 'arm64', '21')).toBe(
|
||||
'aarch64'
|
||||
);
|
||||
expect(() =>
|
||||
validateJavaPlatform('adopt-openj9', 'darwin', 'arm64', '16')
|
||||
).toThrow(/does not support operating system 'macos'/);
|
||||
});
|
||||
|
||||
it('allows local archives on any platform and architecture', () => {
|
||||
expect(validateJavaPlatform('jdkfile', 'aix', 'mips64', '21')).toBe(
|
||||
'mips64'
|
||||
|
||||
Vendored
-580
@@ -1,580 +0,0 @@
|
||||
export const id = 874;
|
||||
export const ids = [874,463];
|
||||
export const modules = {
|
||||
|
||||
/***/ 7874:
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ AdoptDistribution: () => (/* binding */ AdoptDistribution),
|
||||
/* harmony export */ AdoptImplementation: () => (/* binding */ AdoptImplementation)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _actions_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3838);
|
||||
/* harmony import */ var _actions_tool_cache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9805);
|
||||
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9896);
|
||||
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_2__);
|
||||
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6928);
|
||||
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__);
|
||||
/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2088);
|
||||
/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(semver__WEBPACK_IMPORTED_MODULE_4__);
|
||||
/* harmony import */ var _base_installer_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6242);
|
||||
/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4527);
|
||||
/* harmony import */ var _temurin_installer_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(463);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var AdoptImplementation;
|
||||
(function (AdoptImplementation) {
|
||||
AdoptImplementation["Hotspot"] = "Hotspot";
|
||||
AdoptImplementation["OpenJ9"] = "OpenJ9";
|
||||
})(AdoptImplementation || (AdoptImplementation = {}));
|
||||
class AdoptDistribution extends _base_installer_js__WEBPACK_IMPORTED_MODULE_5__/* .JavaBase */ .O {
|
||||
jvmImpl;
|
||||
temurinDistribution;
|
||||
constructor(installerOptions, jvmImpl, temurinDistribution = null) {
|
||||
super(`Adopt-${jvmImpl}`, installerOptions);
|
||||
this.jvmImpl = jvmImpl;
|
||||
if (temurinDistribution !== null &&
|
||||
jvmImpl !== AdoptImplementation.Hotspot) {
|
||||
throw new Error('Only Hotspot JVM is supported by Temurin.');
|
||||
}
|
||||
// Only use the temurin repo for Hotspot JVMs
|
||||
this.temurinDistribution =
|
||||
temurinDistribution ??
|
||||
(jvmImpl === AdoptImplementation.Hotspot
|
||||
? new _temurin_installer_js__WEBPACK_IMPORTED_MODULE_7__.TemurinDistribution(installerOptions, _temurin_installer_js__WEBPACK_IMPORTED_MODULE_7__.TemurinImplementation.Hotspot)
|
||||
: null);
|
||||
}
|
||||
async findPackageForDownload(version) {
|
||||
if (this.jvmImpl === AdoptImplementation.Hotspot) {
|
||||
_actions_core__WEBPACK_IMPORTED_MODULE_0__/* .notice */ .lm("AdoptOpenJDK has moved to Eclipse Temurin https://github.com/actions/setup-java#supported-distributions please consider changing to the 'temurin' distribution type in your setup-java configuration.");
|
||||
}
|
||||
if (this.jvmImpl === AdoptImplementation.Hotspot &&
|
||||
this.temurinDistribution !== null) {
|
||||
try {
|
||||
return await this.temurinDistribution.findPackageForDownload(version);
|
||||
}
|
||||
catch (error) {
|
||||
// Log the failure but always fall back to legacy AdoptOpenJDK for resilience
|
||||
const errorMessage = error instanceof Error ? error.message : String(error);
|
||||
if (error instanceof Error && error.name === 'VersionNotFoundError') {
|
||||
_actions_core__WEBPACK_IMPORTED_MODULE_0__/* .notice */ .lm('The JVM you are looking for could not be found in the Temurin repository, this likely indicates ' +
|
||||
'that you are using an out of date version of Java, consider updating and moving to using the Temurin distribution type in setup-java.');
|
||||
}
|
||||
else {
|
||||
// Log other errors for debugging but gracefully fall back
|
||||
_actions_core__WEBPACK_IMPORTED_MODULE_0__/* .debug */ .Yz(`Temurin lookup failed: ${errorMessage}. Falling back to AdoptOpenJDK API.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
// failed to find a Temurin version, so fall back to AdoptOpenJDK
|
||||
return this.findPackageForDownloadOldAdoptOpenJdk(version);
|
||||
}
|
||||
async findPackageForDownloadOldAdoptOpenJdk(version) {
|
||||
const availableVersionsRaw = await this.getAvailableVersions();
|
||||
const availableVersionsWithBinaries = availableVersionsRaw
|
||||
.filter(item => item.binaries.length > 0)
|
||||
.map(item => {
|
||||
return {
|
||||
version: item.version_data.semver,
|
||||
url: item.binaries[0].package.link,
|
||||
checksum: {
|
||||
algorithm: 'sha256',
|
||||
value: item.binaries[0].package.checksum,
|
||||
source: item.binaries[0].package.checksum_link
|
||||
}
|
||||
};
|
||||
});
|
||||
const satisfiedVersions = availableVersionsWithBinaries
|
||||
.filter(item => (0,_util_js__WEBPACK_IMPORTED_MODULE_6__/* .isVersionSatisfies */ .y)(version, item.version))
|
||||
.sort((a, b) => {
|
||||
return -semver__WEBPACK_IMPORTED_MODULE_4___default().compareBuild(a.version, b.version);
|
||||
});
|
||||
const resolvedFullVersion = satisfiedVersions.length > 0 ? satisfiedVersions[0] : null;
|
||||
if (!resolvedFullVersion) {
|
||||
const availableVersionStrings = availableVersionsWithBinaries.map(item => item.version);
|
||||
throw this.createVersionNotFoundError(version, availableVersionStrings);
|
||||
}
|
||||
return resolvedFullVersion;
|
||||
}
|
||||
async downloadTool(javaRelease) {
|
||||
_actions_core__WEBPACK_IMPORTED_MODULE_0__/* .info */ .pq(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`);
|
||||
let javaArchivePath = await this.downloadAndVerify(javaRelease);
|
||||
_actions_core__WEBPACK_IMPORTED_MODULE_0__/* .info */ .pq(`Extracting Java archive...`);
|
||||
const extension = (0,_util_js__WEBPACK_IMPORTED_MODULE_6__/* .getDownloadArchiveExtension */ .ag)();
|
||||
if (process.platform === 'win32') {
|
||||
javaArchivePath = (0,_util_js__WEBPACK_IMPORTED_MODULE_6__/* .renameWinArchive */ .n2)(javaArchivePath);
|
||||
}
|
||||
const extractedJavaPath = await (0,_util_js__WEBPACK_IMPORTED_MODULE_6__/* .extractJdkFile */ .PE)(javaArchivePath, extension);
|
||||
const archiveName = fs__WEBPACK_IMPORTED_MODULE_2___default().readdirSync(extractedJavaPath)[0];
|
||||
const archivePath = path__WEBPACK_IMPORTED_MODULE_3___default().join(extractedJavaPath, archiveName);
|
||||
const version = this.getToolcacheVersionName(javaRelease.version);
|
||||
const javaPath = await _actions_tool_cache__WEBPACK_IMPORTED_MODULE_1__/* .cacheDir */ .e8(archivePath, this.toolcacheFolderName, version, this.architecture);
|
||||
return { version: javaRelease.version, path: javaPath };
|
||||
}
|
||||
get toolcacheFolderName() {
|
||||
if (this.jvmImpl === AdoptImplementation.Hotspot) {
|
||||
// exclude Hotspot postfix from distribution name because Hosted runners have pre-cached Adopt OpenJDK under "Java_Adopt_jdk"
|
||||
// for more information see: https://github.com/actions/setup-java/pull/155#discussion_r610451063
|
||||
return `Java_Adopt_${this.packageType}`;
|
||||
}
|
||||
return super.toolcacheFolderName;
|
||||
}
|
||||
async getAvailableVersions() {
|
||||
const platform = this.getPlatformOption();
|
||||
const arch = this.distributionArchitecture();
|
||||
const imageType = this.packageType;
|
||||
const versionRange = encodeURI('[1.0,100.0]'); // retrieve all available versions
|
||||
const releaseType = this.stable ? 'ga' : 'ea';
|
||||
if (_actions_core__WEBPACK_IMPORTED_MODULE_0__/* .isDebug */ ._o()) {
|
||||
console.time('Retrieving available versions for Adopt took'); // eslint-disable-line no-console
|
||||
}
|
||||
const baseRequestArguments = [
|
||||
`project=jdk`,
|
||||
'vendor=adoptopenjdk',
|
||||
`heap_size=normal`,
|
||||
'sort_method=DEFAULT',
|
||||
'sort_order=DESC',
|
||||
`os=${platform}`,
|
||||
`architecture=${arch}`,
|
||||
`image_type=${imageType}`,
|
||||
`release_type=${releaseType}`,
|
||||
`jvm_impl=${this.jvmImpl.toLowerCase()}`
|
||||
].join('&');
|
||||
const requestArguments = `${baseRequestArguments}&page_size=20&page=0`;
|
||||
let availableVersionsUrl = `https://api.adoptopenjdk.net/v3/assets/version/${versionRange}?${requestArguments}`;
|
||||
const availableVersions = [];
|
||||
let pageCount = 0;
|
||||
if (_actions_core__WEBPACK_IMPORTED_MODULE_0__/* .isDebug */ ._o()) {
|
||||
_actions_core__WEBPACK_IMPORTED_MODULE_0__/* .debug */ .Yz(`Gathering available versions from '${availableVersionsUrl}'`);
|
||||
}
|
||||
while (availableVersionsUrl) {
|
||||
pageCount++;
|
||||
const response = await this.http.getJson(availableVersionsUrl);
|
||||
const paginationPage = response.result;
|
||||
const nextUrl = (0,_util_js__WEBPACK_IMPORTED_MODULE_6__/* .getNextPageUrlFromLinkHeader */ .rC)(response.headers);
|
||||
if (nextUrl &&
|
||||
!(0,_util_js__WEBPACK_IMPORTED_MODULE_6__/* .validatePaginationUrl */ .SA)(nextUrl, 'https://api.adoptopenjdk.net')) {
|
||||
_actions_core__WEBPACK_IMPORTED_MODULE_0__/* .warning */ .$e(`Ignoring pagination link with unexpected origin: ${nextUrl}`);
|
||||
availableVersionsUrl = null;
|
||||
}
|
||||
else {
|
||||
availableVersionsUrl = nextUrl;
|
||||
}
|
||||
if (paginationPage === null || paginationPage.length === 0) {
|
||||
break;
|
||||
}
|
||||
availableVersions.push(...paginationPage);
|
||||
if (pageCount >= _util_js__WEBPACK_IMPORTED_MODULE_6__/* .MAX_PAGINATION_PAGES */ .Tp) {
|
||||
_actions_core__WEBPACK_IMPORTED_MODULE_0__/* .warning */ .$e(`Reached pagination safeguard limit (${_util_js__WEBPACK_IMPORTED_MODULE_6__/* .MAX_PAGINATION_PAGES */ .Tp} pages) while listing Adopt releases.`);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (_actions_core__WEBPACK_IMPORTED_MODULE_0__/* .isDebug */ ._o()) {
|
||||
_actions_core__WEBPACK_IMPORTED_MODULE_0__/* .startGroup */ .Oh('Print information about available versions');
|
||||
console.timeEnd('Retrieving available versions for Adopt took'); // eslint-disable-line no-console
|
||||
_actions_core__WEBPACK_IMPORTED_MODULE_0__/* .debug */ .Yz(`Available versions: [${availableVersions.length}]`);
|
||||
_actions_core__WEBPACK_IMPORTED_MODULE_0__/* .debug */ .Yz(availableVersions.map(item => item.version_data.semver).join(', '));
|
||||
_actions_core__WEBPACK_IMPORTED_MODULE_0__/* .endGroup */ .N4();
|
||||
}
|
||||
return availableVersions;
|
||||
}
|
||||
getPlatformOption() {
|
||||
// Adopt has own platform names so need to map them
|
||||
switch (process.platform) {
|
||||
case 'darwin':
|
||||
return 'mac';
|
||||
case 'win32':
|
||||
return 'windows';
|
||||
default:
|
||||
return process.platform;
|
||||
}
|
||||
}
|
||||
distributionArchitecture() {
|
||||
const architecture = super.distributionArchitecture();
|
||||
return architecture === 'armv7' ? 'arm' : architecture;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 463:
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
TemurinDistribution: () => (/* binding */ TemurinDistribution),
|
||||
TemurinImplementation: () => (/* binding */ TemurinImplementation)
|
||||
});
|
||||
|
||||
// UNUSED EXPORTS: ADOPTIUM_PUBLIC_KEY
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/@actions/core/lib/core.js + 7 modules
|
||||
var core = __webpack_require__(3838);
|
||||
// EXTERNAL MODULE: ./node_modules/@actions/tool-cache/lib/tool-cache.js + 2 modules
|
||||
var tool_cache = __webpack_require__(9805);
|
||||
// EXTERNAL MODULE: external "fs"
|
||||
var external_fs_ = __webpack_require__(9896);
|
||||
var external_fs_default = /*#__PURE__*/__webpack_require__.n(external_fs_);
|
||||
// EXTERNAL MODULE: external "path"
|
||||
var external_path_ = __webpack_require__(6928);
|
||||
var external_path_default = /*#__PURE__*/__webpack_require__.n(external_path_);
|
||||
// EXTERNAL MODULE: ./node_modules/semver/index.js
|
||||
var semver = __webpack_require__(2088);
|
||||
var semver_default = /*#__PURE__*/__webpack_require__.n(semver);
|
||||
// EXTERNAL MODULE: ./src/gpg.ts
|
||||
var gpg = __webpack_require__(8343);
|
||||
;// CONCATENATED MODULE: ./src/distributions/temurin/adoptium-key.ts
|
||||
// Adoptium GPG signing key (fingerprint: 3B04D753C9050D9A5D343F39843C48A565F8F04B)
|
||||
// Retrieved from: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3B04D753C9050D9A5D343F39843C48A565F8F04B
|
||||
const ADOPTIUM_PUBLIC_KEY = `-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
xsBNBGGTvTQBCAC6ey144n7CG8foafF6mwgIBN1fIm1ILZDuGS4tMr0/XI8pgJnT
|
||||
QvsPxZWEvtSm7bEMObzEoZJcXwjBcJl1B0ui8k5kHMTI75gCmZPsoKLFWIEpuRBQ
|
||||
PBocusw80apDmLnNDQLVQvDFtEua5gaNa/fRw9YsmBoXBqvgrjFUIdGyWoQvH5+a
|
||||
9OYlWD9n5VV0gnVMb+aclwVzB/zJw3kHGSgzuMtlAHeQiah7Y8yomQn/UIX8yqDf
|
||||
+11sP3+c87YcjkRqImRTtmKEDcEtGPAIXC6SYA+uEEkbYE0Fy0chkvtnVWJ597fa
|
||||
Epai4rnICU8zoJ6X5z3v1aM2WerhX9oq9X8PABEBAAHNQEFkb3B0aXVtIEdQRyBL
|
||||
ZXkgKERFQi9SUE0gU2lnbmluZyBLZXkpIDx0ZW11cmluLWRldkBlY2xpcHNlLm9y
|
||||
Zz7CwJIEEwEIADwWIQQ7BNdTyQUNml00PzmEPEilZfjwSwUCYZO9NAIbAwULCQgH
|
||||
AgMiAgEGFQoJCAsCBBYCAwECHgcCF4AACgkQhDxIpWX48Et4AggAjjJzYWuKV3nG
|
||||
7ngInngl8G/m9JoHr7BmwgcQXYhdy5hVkMcUx5JLeXz2LMBUH/F2nD595hgjMabk
|
||||
kVib20X8lq9RsNbdfc2hBcWU6qyHKxsIqT4boI2/XDyEzzMyyZWWNGo/27Ci7Xmj
|
||||
pWu31nh0pDdPqdyWDIKojbVVnxlCRY8as8Sm+1ufi709KCi4MuwHNsUlCSwb/fju
|
||||
NKeHkrHbLcHKUUIEcmTSKRWrpMYBzm1HYOGBz4xPuELwUfUp71ehfoyBZlp6RDRf
|
||||
l5TYI1FmCyHuvjNhrJgWv7bOTcf8yObGY+TEUhzc4xQqCrF4ur9d3opvsuPBQsv+
|
||||
Klqi5KSZgs7ATQRhk700AQgAq14okly8cFrpYVenEQPiB75AUZfKRpMduiR6IxAj
|
||||
SKcH7aSoFZ9AubUEBVpZsyT5svxoEPe1i4TdbF+m9FGy42EcOlLa3ArLTj5H8FRl
|
||||
UdGZB9I5mk4GptOzPM+aHMMu92vW/ZwjuS8DvOiQSp+cUmG1EqOMJSM7e/4BM71z
|
||||
E+OKaVJCj79pEzhG3SK/IC/OlxxyETT66NSfYJd7Sw5R6Vr19am/uNU690W0CJ+q
|
||||
VQeFpmDMr7LnfdFRIh+lJe05+PvWXeidkGjox5cbG52wf8aRIR/FgkfcFvqRMN1f
|
||||
B+dVOWueloUeVAnzcUznOKmUEs7LP9ObJhYHHgup4IAU2wARAQABwsB2BBgBCAAg
|
||||
FiEEOwTXU8kFDZpdND85hDxIpWX48EsFAmGTvTQCGwwACgkQhDxIpWX48EvXHQf/
|
||||
Q0nZsGDXnZHiBoojeSdpkO7WBjMIP3w1GdLvRpPQrS8TfOPbZuoevzCNh38Y3gwF
|
||||
yelJspvzDQrBXhgkzAGlucYg8Y7KHa5Ebm7iDgMzc37L1hYSZTYCqwd7aowfgy34
|
||||
hOk3B67LffkJpIh738Oa9CtlwxQ9xcytmBmQ1fBBOwm/9IhAwHPQuydYIs4DxWbj
|
||||
0MGSP4fDntU7e4UjsHNmhudDcYol0FaqdHHIIB9C/G4CzetRwHFOn3b4JwXMU7YU
|
||||
6aJA3mXhi3hggMC3wkT2HHZ/TquuOdNc02fypWOCDOHz0alBBJNqoVUNFNqU3tfJ
|
||||
wI4qF/KKq9BfyfucAs0ykA==
|
||||
=XLag
|
||||
-----END PGP PUBLIC KEY BLOCK-----`;
|
||||
|
||||
// EXTERNAL MODULE: ./src/distributions/base-installer.ts + 2 modules
|
||||
var base_installer = __webpack_require__(6242);
|
||||
// EXTERNAL MODULE: ./src/constants.ts
|
||||
var constants = __webpack_require__(7242);
|
||||
// EXTERNAL MODULE: ./src/util.ts
|
||||
var util = __webpack_require__(4527);
|
||||
;// CONCATENATED MODULE: ./src/distributions/temurin/installer.ts
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var TemurinImplementation;
|
||||
(function (TemurinImplementation) {
|
||||
TemurinImplementation["Hotspot"] = "Hotspot";
|
||||
})(TemurinImplementation || (TemurinImplementation = {}));
|
||||
class TemurinDistribution extends base_installer/* JavaBase */.O {
|
||||
jvmImpl;
|
||||
includeJmods;
|
||||
constructor(installerOptions, jvmImpl) {
|
||||
super(`Temurin-${jvmImpl}`, installerOptions);
|
||||
this.jvmImpl = jvmImpl;
|
||||
this.includeJmods = this.packageType === 'jdk+jmods';
|
||||
}
|
||||
/**
|
||||
* @internal For cross-distribution reuse only. Not intended as a public API.
|
||||
*/
|
||||
async findPackageForDownload(version) {
|
||||
return this.resolvePackage(version, this.includeJmods ? 'jdk' : this.packageType);
|
||||
}
|
||||
async resolvePackage(version, imageType) {
|
||||
const availableVersionsRaw = await this.getAvailableVersions(imageType);
|
||||
const availableVersionsWithBinaries = availableVersionsRaw
|
||||
.filter(item => item.binaries.length > 0)
|
||||
.map(item => {
|
||||
// normalize 17.0.0-beta+33.0.202107301459 to 17.0.0+33.0.202107301459 for earlier access versions
|
||||
const formattedVersion = this.stable
|
||||
? item.version_data.semver
|
||||
: item.version_data.semver.replace('-beta+', '+');
|
||||
return {
|
||||
version: formattedVersion,
|
||||
url: item.binaries[0].package.link,
|
||||
signatureUrl: item.binaries[0].package.signature_link,
|
||||
checksum: {
|
||||
algorithm: 'sha256',
|
||||
value: item.binaries[0].package.checksum,
|
||||
source: item.binaries[0].package.checksum_link
|
||||
}
|
||||
};
|
||||
});
|
||||
const satisfiedVersions = availableVersionsWithBinaries
|
||||
.filter(item => (0,util/* isVersionSatisfies */.y)(version, item.version))
|
||||
.sort((a, b) => {
|
||||
return -semver_default().compareBuild(a.version, b.version);
|
||||
});
|
||||
const resolvedFullVersion = satisfiedVersions.length > 0 ? satisfiedVersions[0] : null;
|
||||
if (!resolvedFullVersion) {
|
||||
const availableVersionStrings = availableVersionsWithBinaries.map(item => item.version);
|
||||
throw this.createVersionNotFoundError(version, availableVersionStrings);
|
||||
}
|
||||
return resolvedFullVersion;
|
||||
}
|
||||
async downloadTool(javaRelease) {
|
||||
core/* info */.pq(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`);
|
||||
let javaArchivePath = await this.downloadPackage(javaRelease);
|
||||
core/* info */.pq(`Extracting Java archive...`);
|
||||
const extension = (0,util/* getDownloadArchiveExtension */.ag)();
|
||||
if (process.platform === 'win32') {
|
||||
javaArchivePath = (0,util/* renameWinArchive */.n2)(javaArchivePath);
|
||||
}
|
||||
const extractedJavaPath = await (0,util/* extractJdkFile */.PE)(javaArchivePath, extension);
|
||||
const archiveName = external_fs_default().readdirSync(extractedJavaPath)[0];
|
||||
const archivePath = external_path_default().join(extractedJavaPath, archiveName);
|
||||
const javaHome = process.platform === 'darwin'
|
||||
? external_path_default().join(archivePath, constants/* MACOS_JAVA_CONTENT_POSTFIX */.PG)
|
||||
: archivePath;
|
||||
if (this.includeJmods && !external_fs_default().existsSync(external_path_default().join(javaHome, 'jmods'))) {
|
||||
await this.installJmods(javaRelease.version, javaHome);
|
||||
}
|
||||
const version = this.getToolcacheVersionName(javaRelease.version);
|
||||
const javaPath = await tool_cache/* cacheDir */.e8(archivePath, this.toolcacheFolderName, version, this.architecture);
|
||||
return { version: javaRelease.version, path: javaPath };
|
||||
}
|
||||
supportsSignatureVerification() {
|
||||
return true;
|
||||
}
|
||||
async downloadPackage(release) {
|
||||
const archivePath = await this.downloadAndVerify(release);
|
||||
if (this.verifySignature) {
|
||||
if (!release.signatureUrl) {
|
||||
throw new Error(`Input 'verify-signature' is enabled, but no signature URL was found for Temurin version ${release.version}.`);
|
||||
}
|
||||
core/* info */.pq(`Verifying Java package signature...`);
|
||||
try {
|
||||
await gpg/* verifyPackageSignature */.Yi(archivePath, release.signatureUrl, this.verifySignaturePublicKey ?? ADOPTIUM_PUBLIC_KEY);
|
||||
}
|
||||
catch (error) {
|
||||
throw new Error(`Failed to verify signature for Temurin version ${release.version} from ${release.signatureUrl}: ${error.message}`, { cause: error });
|
||||
}
|
||||
}
|
||||
return archivePath;
|
||||
}
|
||||
async installJmods(version, javaHome) {
|
||||
const jmodsRelease = await this.resolvePackage(version, 'jmods');
|
||||
core/* info */.pq(`Downloading JMODs ${jmodsRelease.version} (${this.distribution}) from ${jmodsRelease.url} ...`);
|
||||
let jmodsArchivePath = await this.downloadPackage(jmodsRelease);
|
||||
if (process.platform === 'win32') {
|
||||
jmodsArchivePath = (0,util/* renameWinArchive */.n2)(jmodsArchivePath);
|
||||
}
|
||||
const extractedJmodsPath = await (0,util/* extractJdkFile */.PE)(jmodsArchivePath, (0,util/* getDownloadArchiveExtension */.ag)());
|
||||
const jmodsDirectory = external_path_default().join(extractedJmodsPath, external_fs_default().readdirSync(extractedJmodsPath)[0]);
|
||||
external_fs_default().cpSync(jmodsDirectory, external_path_default().join(javaHome, 'jmods'), { recursive: true });
|
||||
}
|
||||
async getAvailableVersions(imageType = this.includeJmods ? 'jdk' : this.packageType) {
|
||||
const platform = this.getPlatformOption();
|
||||
const arch = this.distributionArchitecture();
|
||||
const versionRange = encodeURI('[1.0,100.0]'); // retrieve all available versions
|
||||
const releaseType = this.stable ? 'ga' : 'ea';
|
||||
if (core/* isDebug */._o()) {
|
||||
console.time('Retrieving available versions for Temurin took'); // eslint-disable-line no-console
|
||||
}
|
||||
const baseRequestArguments = [
|
||||
`project=jdk`,
|
||||
'vendor=adoptium',
|
||||
`heap_size=normal`,
|
||||
'sort_method=DEFAULT',
|
||||
'sort_order=DESC',
|
||||
`os=${platform}`,
|
||||
`architecture=${arch}`,
|
||||
`image_type=${imageType}`,
|
||||
`release_type=${releaseType}`,
|
||||
`jvm_impl=${this.jvmImpl.toLowerCase()}`
|
||||
].join('&');
|
||||
const requestArguments = `${baseRequestArguments}&page_size=20&page=0`;
|
||||
let availableVersionsUrl = `https://api.adoptium.net/v3/assets/version/${versionRange}?${requestArguments}`;
|
||||
const availableVersions = [];
|
||||
let pageCount = 0;
|
||||
if (core/* isDebug */._o()) {
|
||||
core/* debug */.Yz(`Gathering available versions from '${availableVersionsUrl}'`);
|
||||
}
|
||||
while (availableVersionsUrl) {
|
||||
pageCount++;
|
||||
const response = await this.http.getJson(availableVersionsUrl);
|
||||
const paginationPage = response.result;
|
||||
const nextUrl = (0,util/* getNextPageUrlFromLinkHeader */.rC)(response.headers);
|
||||
if (nextUrl &&
|
||||
!(0,util/* validatePaginationUrl */.SA)(nextUrl, 'https://api.adoptium.net')) {
|
||||
core/* warning */.$e(`Ignoring pagination link with unexpected origin: ${nextUrl}`);
|
||||
availableVersionsUrl = null;
|
||||
}
|
||||
else {
|
||||
availableVersionsUrl = nextUrl;
|
||||
}
|
||||
if (paginationPage === null || paginationPage.length === 0) {
|
||||
break;
|
||||
}
|
||||
availableVersions.push(...paginationPage);
|
||||
if (pageCount >= util/* MAX_PAGINATION_PAGES */.Tp) {
|
||||
core/* warning */.$e(`Reached pagination safeguard limit (${util/* MAX_PAGINATION_PAGES */.Tp} pages) while listing Temurin releases.`);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (core/* isDebug */._o()) {
|
||||
core/* startGroup */.Oh('Print information about available versions');
|
||||
console.timeEnd('Retrieving available versions for Temurin took'); // eslint-disable-line no-console
|
||||
core/* debug */.Yz(`Available versions: [${availableVersions.length}]`);
|
||||
core/* debug */.Yz(availableVersions.map(item => item.version_data.semver).join(', '));
|
||||
core/* endGroup */.N4();
|
||||
}
|
||||
return availableVersions;
|
||||
}
|
||||
getPlatformOption() {
|
||||
// Adoptium has own platform names so need to map them
|
||||
switch (process.platform) {
|
||||
case 'darwin':
|
||||
return 'mac';
|
||||
case 'win32':
|
||||
return 'windows';
|
||||
case 'linux':
|
||||
if (external_fs_default().existsSync('/etc/alpine-release')) {
|
||||
return 'alpine-linux';
|
||||
}
|
||||
return 'linux';
|
||||
default:
|
||||
return process.platform;
|
||||
}
|
||||
}
|
||||
distributionArchitecture() {
|
||||
const architecture = super.distributionArchitecture();
|
||||
return architecture === 'armv7' ? 'arm' : architecture;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 8343:
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ Fh: () => (/* binding */ importKey),
|
||||
/* harmony export */ Yi: () => (/* binding */ verifyPackageSignature)
|
||||
/* harmony export */ });
|
||||
/* unused harmony exports PRIVATE_KEY_FILE, toGpgPath, deleteKey */
|
||||
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9896);
|
||||
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6928);
|
||||
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _actions_io__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8701);
|
||||
/* harmony import */ var _actions_exec__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5260);
|
||||
/* harmony import */ var _actions_tool_cache__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9805);
|
||||
/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4527);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const PRIVATE_KEY_FILE = path__WEBPACK_IMPORTED_MODULE_1__.join(_util_js__WEBPACK_IMPORTED_MODULE_5__/* .getTempDir */ .G4(), 'private-key.asc');
|
||||
const PRIVATE_KEY_FINGERPRINT_REGEX = /\w{40}/;
|
||||
// Convert a Windows path (D:\a\_temp\...) to a POSIX path (/d/a/_temp/...).
|
||||
// The Git-bundled GPG on Windows (MSYS2-based) uses POSIX path conventions
|
||||
// internally. Passing Windows paths with backslashes can cause fatal GPG errors
|
||||
// (exit code 2), so all paths passed to GPG must be in POSIX format on Windows.
|
||||
function toGpgPath(p) {
|
||||
if (process.platform !== 'win32')
|
||||
return p;
|
||||
return p
|
||||
.replace(/\\/g, '/')
|
||||
.replace(/^([A-Za-z]):\//, (_, drive) => `/${drive.toLowerCase()}/`);
|
||||
}
|
||||
async function importKey(privateKey) {
|
||||
fs__WEBPACK_IMPORTED_MODULE_0__.writeFileSync(PRIVATE_KEY_FILE, privateKey, {
|
||||
encoding: 'utf-8',
|
||||
flag: 'w'
|
||||
});
|
||||
let output = '';
|
||||
const options = {
|
||||
silent: true,
|
||||
listeners: {
|
||||
stdout: (data) => {
|
||||
output += data.toString();
|
||||
}
|
||||
}
|
||||
};
|
||||
await _actions_exec__WEBPACK_IMPORTED_MODULE_3__/* .exec */ .m('gpg', [
|
||||
'--batch',
|
||||
'--import-options',
|
||||
'import-show',
|
||||
'--import',
|
||||
PRIVATE_KEY_FILE
|
||||
], options);
|
||||
await _actions_io__WEBPACK_IMPORTED_MODULE_2__/* .rmRF */ .Yz(PRIVATE_KEY_FILE);
|
||||
const match = output.match(PRIVATE_KEY_FINGERPRINT_REGEX);
|
||||
return match && match[0];
|
||||
}
|
||||
async function deleteKey(keyFingerprint) {
|
||||
await exec.exec('gpg', ['--batch', '--yes', '--delete-secret-and-public-key', keyFingerprint], {
|
||||
silent: true
|
||||
});
|
||||
}
|
||||
async function verifyPackageSignature(archivePath, signatureUrl, publicKeyContent) {
|
||||
const signaturePath = await _actions_tool_cache__WEBPACK_IMPORTED_MODULE_4__/* .downloadTool */ .bq(signatureUrl);
|
||||
let gpgHome;
|
||||
try {
|
||||
gpgHome = fs__WEBPACK_IMPORTED_MODULE_0__.mkdtempSync(path__WEBPACK_IMPORTED_MODULE_1__.join(_util_js__WEBPACK_IMPORTED_MODULE_5__/* .getTempDir */ .G4(), 'verify-signature-gpg-home-'));
|
||||
}
|
||||
catch (error) {
|
||||
try {
|
||||
await _actions_io__WEBPACK_IMPORTED_MODULE_2__/* .rmRF */ .Yz(signaturePath);
|
||||
}
|
||||
catch {
|
||||
// ignore cleanup failures
|
||||
}
|
||||
throw new Error(`Failed to create temporary GPG home directory for signature verification: ${error.message}`, { cause: error });
|
||||
}
|
||||
try {
|
||||
const publicKeyFile = path__WEBPACK_IMPORTED_MODULE_1__.join(gpgHome, 'public-key.asc');
|
||||
fs__WEBPACK_IMPORTED_MODULE_0__.writeFileSync(publicKeyFile, publicKeyContent, { encoding: 'utf-8' });
|
||||
const options = { silent: true };
|
||||
await _actions_exec__WEBPACK_IMPORTED_MODULE_3__/* .exec */ .m('gpg', [
|
||||
'--homedir',
|
||||
toGpgPath(gpgHome),
|
||||
'--batch',
|
||||
'--import',
|
||||
toGpgPath(publicKeyFile)
|
||||
], options);
|
||||
await _actions_exec__WEBPACK_IMPORTED_MODULE_3__/* .exec */ .m('gpg', [
|
||||
'--homedir',
|
||||
toGpgPath(gpgHome),
|
||||
'--batch',
|
||||
'--verify',
|
||||
toGpgPath(signaturePath),
|
||||
toGpgPath(archivePath)
|
||||
], options);
|
||||
}
|
||||
finally {
|
||||
await _actions_io__WEBPACK_IMPORTED_MODULE_2__/* .rmRF */ .Yz(signaturePath);
|
||||
await _actions_io__WEBPACK_IMPORTED_MODULE_2__/* .rmRF */ .Yz(gpgHome);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
};
|
||||
Vendored
+12
-50
@@ -30883,9 +30883,6 @@ const DISTRIBUTIONS_ONLY_MAJOR_VERSION = ['corretto'];
|
||||
|
||||
var JavaDistribution;
|
||||
(function (JavaDistribution) {
|
||||
JavaDistribution["Adopt"] = "adopt";
|
||||
JavaDistribution["AdoptHotspot"] = "adopt-hotspot";
|
||||
JavaDistribution["AdoptOpenJ9"] = "adopt-openj9";
|
||||
JavaDistribution["Temurin"] = "temurin";
|
||||
JavaDistribution["Zulu"] = "zulu";
|
||||
JavaDistribution["Liberica"] = "liberica";
|
||||
@@ -30904,9 +30901,6 @@ var JavaDistribution;
|
||||
JavaDistribution["OracleOpenJdk"] = "oracle-openjdk";
|
||||
})(JavaDistribution || (JavaDistribution = {}));
|
||||
const JAVA_PACKAGE_CAPABILITIES = {
|
||||
[JavaDistribution.Adopt]: ['jdk', 'jre'],
|
||||
[JavaDistribution.AdoptHotspot]: ['jdk', 'jre'],
|
||||
[JavaDistribution.AdoptOpenJ9]: ['jdk', 'jre'],
|
||||
[JavaDistribution.Temurin]: ['jdk', 'jre', 'jdk+jmods'],
|
||||
[JavaDistribution.Zulu]: [
|
||||
'jdk',
|
||||
@@ -31002,30 +30996,8 @@ function createUnsupportedPackageError(distributionName, packageType, supportedP
|
||||
|
||||
|
||||
const X64_ARM64 = ['x64', 'aarch64'];
|
||||
const X64_X86 = ['x64', 'x86'];
|
||||
const STANDARD_LINUX = ['x64', 'x86', 'aarch64', 'ppc64le', 's390x'];
|
||||
const JAVA_PLATFORM_CAPABILITIES = {
|
||||
[_package_types_js__WEBPACK_IMPORTED_MODULE_1__/* .JavaDistribution */ .zS.Adopt]: {
|
||||
platforms: {
|
||||
linux: [...STANDARD_LINUX, { architecture: 'armv7', versionRange: '<18' }],
|
||||
macos: X64_ARM64,
|
||||
windows: ['x64', 'x86', 'aarch64']
|
||||
}
|
||||
},
|
||||
[_package_types_js__WEBPACK_IMPORTED_MODULE_1__/* .JavaDistribution */ .zS.AdoptHotspot]: {
|
||||
platforms: {
|
||||
linux: [...STANDARD_LINUX, { architecture: 'armv7', versionRange: '<18' }],
|
||||
macos: X64_ARM64,
|
||||
windows: ['x64', 'x86', 'aarch64']
|
||||
}
|
||||
},
|
||||
[_package_types_js__WEBPACK_IMPORTED_MODULE_1__/* .JavaDistribution */ .zS.AdoptOpenJ9]: {
|
||||
platforms: {
|
||||
linux: STANDARD_LINUX,
|
||||
macos: ['x64'],
|
||||
windows: X64_X86
|
||||
}
|
||||
},
|
||||
[_package_types_js__WEBPACK_IMPORTED_MODULE_1__/* .JavaDistribution */ .zS.Temurin]: {
|
||||
platforms: {
|
||||
linux: [...STANDARD_LINUX, { architecture: 'armv7', versionRange: '<18' }],
|
||||
@@ -31920,7 +31892,6 @@ __nccwpck_require__.d(__webpack_exports__, {
|
||||
q3: () => (/* binding */ getMultilineInput),
|
||||
pq: () => (/* binding */ info),
|
||||
_o: () => (/* binding */ isDebug),
|
||||
lm: () => (/* binding */ notice),
|
||||
LZ: () => (/* binding */ saveState),
|
||||
C1: () => (/* binding */ setFailed),
|
||||
uH: () => (/* binding */ setOutput),
|
||||
@@ -31929,7 +31900,7 @@ __nccwpck_require__.d(__webpack_exports__, {
|
||||
$e: () => (/* binding */ warning)
|
||||
});
|
||||
|
||||
// UNUSED EXPORTS: ExitCode, getBooleanInput, getIDToken, getState, group, markdownSummary, platform, setCommandEcho, summary, toPlatformPath, toPosixPath, toWin32Path
|
||||
// UNUSED EXPORTS: ExitCode, getBooleanInput, getIDToken, getState, group, markdownSummary, notice, platform, setCommandEcho, summary, toPlatformPath, toPosixPath, toWin32Path
|
||||
|
||||
// EXTERNAL MODULE: external "os"
|
||||
var external_os_ = __nccwpck_require__(857);
|
||||
@@ -31955,7 +31926,7 @@ function toCommandValue(input) {
|
||||
* @returns The command properties to send with the actual annotation command
|
||||
* See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646
|
||||
*/
|
||||
function toCommandProperties(annotationProperties) {
|
||||
function utils_toCommandProperties(annotationProperties) {
|
||||
if (!Object.keys(annotationProperties).length) {
|
||||
return {};
|
||||
}
|
||||
@@ -32005,12 +31976,12 @@ function toCommandProperties(annotationProperties) {
|
||||
* This is an internal utility function that powers the public API functions
|
||||
* such as setSecret, warning, error, and exportVariable.
|
||||
*/
|
||||
function issueCommand(command, properties, message) {
|
||||
function command_issueCommand(command, properties, message) {
|
||||
const cmd = new Command(command, properties, message);
|
||||
process.stdout.write(cmd.toString() + external_os_.EOL);
|
||||
}
|
||||
function command_issue(name, message = '') {
|
||||
issueCommand(name, {}, message);
|
||||
command_issueCommand(name, {}, message);
|
||||
}
|
||||
const CMD_STRING = '::';
|
||||
class Command {
|
||||
@@ -32608,7 +32579,7 @@ function exportVariable(name, val) {
|
||||
if (filePath) {
|
||||
return issueFileCommand('ENV', prepareKeyValueMessage(name, val));
|
||||
}
|
||||
issueCommand('set-env', { name }, convertedVal);
|
||||
command_issueCommand('set-env', { name }, convertedVal);
|
||||
}
|
||||
/**
|
||||
* Registers a secret which will get masked from logs
|
||||
@@ -32640,7 +32611,7 @@ function exportVariable(name, val) {
|
||||
* ```
|
||||
*/
|
||||
function core_setSecret(secret) {
|
||||
issueCommand('add-mask', {}, secret);
|
||||
command_issueCommand('add-mask', {}, secret);
|
||||
}
|
||||
/**
|
||||
* Prepends inputPath to the PATH (for this action and future actions)
|
||||
@@ -32652,7 +32623,7 @@ function addPath(inputPath) {
|
||||
issueFileCommand('PATH', inputPath);
|
||||
}
|
||||
else {
|
||||
issueCommand('add-path', {}, inputPath);
|
||||
command_issueCommand('add-path', {}, inputPath);
|
||||
}
|
||||
process.env['PATH'] = `${inputPath}${external_path_.delimiter}${process.env['PATH']}`;
|
||||
}
|
||||
@@ -32726,7 +32697,7 @@ function setOutput(name, value) {
|
||||
return issueFileCommand('OUTPUT', prepareKeyValueMessage(name, value));
|
||||
}
|
||||
process.stdout.write(external_os_.EOL);
|
||||
issueCommand('set-output', { name }, toCommandValue(value));
|
||||
command_issueCommand('set-output', { name }, toCommandValue(value));
|
||||
}
|
||||
/**
|
||||
* Enables or disables the echoing of commands into stdout for the rest of the step.
|
||||
@@ -32762,7 +32733,7 @@ function isDebug() {
|
||||
* @param message debug message
|
||||
*/
|
||||
function core_debug(message) {
|
||||
issueCommand('debug', {}, message);
|
||||
command_issueCommand('debug', {}, message);
|
||||
}
|
||||
/**
|
||||
* Adds an error issue
|
||||
@@ -32770,7 +32741,7 @@ function core_debug(message) {
|
||||
* @param properties optional properties to add to the annotation.
|
||||
*/
|
||||
function error(message, properties = {}) {
|
||||
issueCommand('error', toCommandProperties(properties), message instanceof Error ? message.toString() : message);
|
||||
command_issueCommand('error', utils_toCommandProperties(properties), message instanceof Error ? message.toString() : message);
|
||||
}
|
||||
/**
|
||||
* Adds a warning issue
|
||||
@@ -32778,7 +32749,7 @@ function error(message, properties = {}) {
|
||||
* @param properties optional properties to add to the annotation.
|
||||
*/
|
||||
function warning(message, properties = {}) {
|
||||
issueCommand('warning', toCommandProperties(properties), message instanceof Error ? message.toString() : message);
|
||||
command_issueCommand('warning', utils_toCommandProperties(properties), message instanceof Error ? message.toString() : message);
|
||||
}
|
||||
/**
|
||||
* Adds a notice issue
|
||||
@@ -32847,7 +32818,7 @@ function saveState(name, value) {
|
||||
if (filePath) {
|
||||
return issueFileCommand('STATE', prepareKeyValueMessage(name, value));
|
||||
}
|
||||
issueCommand('save-state', { name }, toCommandValue(value));
|
||||
command_issueCommand('save-state', { name }, toCommandValue(value));
|
||||
}
|
||||
/**
|
||||
* Gets the value of an state set by this action's main execution.
|
||||
@@ -36050,15 +36021,6 @@ async function getJavaDistribution(distributionName, installerOptions, jdkFile)
|
||||
const { LocalDistribution } = await Promise.all(/* import() */[__nccwpck_require__.e(242), __nccwpck_require__.e(19)]).then(__nccwpck_require__.bind(__nccwpck_require__, 1019));
|
||||
return new LocalDistribution(normalizedInstallerOptions, jdkFile);
|
||||
}
|
||||
case package_types/* JavaDistribution */.zS.Adopt:
|
||||
case package_types/* JavaDistribution */.zS.AdoptHotspot: {
|
||||
const { AdoptDistribution, AdoptImplementation } = await Promise.all(/* import() */[__nccwpck_require__.e(242), __nccwpck_require__.e(874)]).then(__nccwpck_require__.bind(__nccwpck_require__, 7874));
|
||||
return new AdoptDistribution(normalizedInstallerOptions, AdoptImplementation.Hotspot);
|
||||
}
|
||||
case package_types/* JavaDistribution */.zS.AdoptOpenJ9: {
|
||||
const { AdoptDistribution, AdoptImplementation } = await Promise.all(/* import() */[__nccwpck_require__.e(242), __nccwpck_require__.e(874)]).then(__nccwpck_require__.bind(__nccwpck_require__, 7874));
|
||||
return new AdoptDistribution(normalizedInstallerOptions, AdoptImplementation.OpenJ9);
|
||||
}
|
||||
case package_types/* JavaDistribution */.zS.Temurin: {
|
||||
const { TemurinDistribution, TemurinImplementation } = await Promise.all(/* import() */[__nccwpck_require__.e(242), __nccwpck_require__.e(463)]).then(__nccwpck_require__.bind(__nccwpck_require__, 463));
|
||||
return new TemurinDistribution(normalizedInstallerOptions, TemurinImplementation.Hotspot);
|
||||
|
||||
+1
-19
@@ -1,7 +1,6 @@
|
||||
# Usage
|
||||
- [Selecting a Java distribution](#Selecting-a-Java-distribution)
|
||||
- [Eclipse Temurin](#Eclipse-Temurin)
|
||||
- [Adopt](#Adopt)
|
||||
- [Zulu](#Zulu)
|
||||
- [Liberica](#Liberica)
|
||||
- [Liberica Native Image Kit](#Liberica-Native-Image-Kit)
|
||||
@@ -49,19 +48,6 @@ steps:
|
||||
- run: java --version
|
||||
```
|
||||
|
||||
### Adopt
|
||||
**NOTE:** Adopt OpenJDK got moved to Eclipse Temurin and won't be updated anymore. It is highly recommended to migrate workflows from `adopt` to `temurin` to keep receiving software and security updates. See more details in the [Good-bye AdoptOpenJDK post](https://blog.adoptopenjdk.net/2021/08/goodbye-adoptopenjdk-hello-adoptium/).
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- uses: actions/setup-java@v6
|
||||
with:
|
||||
distribution: 'adopt-hotspot'
|
||||
java-version: '11'
|
||||
- run: java --version
|
||||
```
|
||||
|
||||
### Zulu
|
||||
|
||||
```yaml
|
||||
@@ -305,8 +291,6 @@ The package types have these meanings:
|
||||
| Distribution | Supported `java-package` values | Version support and important details |
|
||||
| --- | --- | --- |
|
||||
| `temurin` | `jdk`, `jre`, `jdk+jmods` | `jdk` and `jre` follow the Adoptium catalog. `jdk+jmods` is available for Java 24 and later and resolves both artifacts at the exact same Java version. |
|
||||
| `adopt`, `adopt-hotspot` | `jdk`, `jre` | HotSpot requests check Temurin first, then fall back to the archived AdoptOpenJDK catalog (Java 8 through 16). Migrate to `temurin` for supported releases. |
|
||||
| `adopt-openj9` | `jdk`, `jre` | Uses the archived AdoptOpenJDK OpenJ9 catalog, which ended at Java 16. Migrate to `semeru`. Some historical JRE/platform combinations were not published. |
|
||||
| `zulu` | `jdk`, `jre`, `jdk+fx`, `jre+fx`, `jdk+crac`, `jre+crac` | Standard JDK builds go back to Java 6; JRE and JavaFX bundles start at Java 8. The vendor catalog has gaps among older non-LTS releases. CRaC bundles start at Java 17 and have more limited OS and architecture availability. |
|
||||
| `liberica` | `jdk`, `jre`, `jdk+fx`, `jre+fx` | Standard JDK builds go back to Java 8 in the supported action catalog; JRE and JavaFX "full" bundles also start at Java 8. Exact versions follow BellSoft's catalog for the requested platform. |
|
||||
| `liberica-nik` | `jdk`, `jdk+fx` | `java-version` selects the embedded JDK version, not the NIK/GraalVM release number. BellSoft currently publishes matching standard and JavaFX "full" bundles for JDK 11 and later, with gaps between feature releases. Other values are not meaningful: they resolve to the standard bundle. |
|
||||
@@ -495,8 +479,6 @@ absent from a vendor catalog.
|
||||
| Distribution | Linux | macOS | Windows | Other / version restrictions |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| `temurin` | `x64`, `x86`, `armv7`, `aarch64`, `ppc64le`, `s390x` | `x64`, `aarch64` | `x64`, `x86`, `aarch64` | Linux `armv7` is available through Java 17. |
|
||||
| `adopt`, `adopt-hotspot` | `x64`, `x86`, `armv7`, `aarch64`, `ppc64le`, `s390x` | `x64`, `aarch64` | `x64`, `x86`, `aarch64` | HotSpot requests try Temurin before the archived catalog; Linux `armv7` is available through Java 17. |
|
||||
| `adopt-openj9` | `x64`, `x86`, `aarch64`, `ppc64le`, `s390x` | `x64` | `x64`, `x86` | Uses the archived AdoptOpenJDK OpenJ9 catalog. |
|
||||
| `zulu` | `x64`, `x86`, `armv7`, `aarch64` | `x64`, `aarch64` | `x64`, `x86`, `aarch64` | |
|
||||
| `liberica` | `x64`, `x86`, `armv7`, `aarch64`, `ppc64le` | `x64`, `aarch64` | `x64`, `x86`, `aarch64` | Solaris: `x64`. |
|
||||
| `liberica-nik` | `x64`, `aarch64` | `x64`, `aarch64` | `x64`, `aarch64` | |
|
||||
@@ -566,7 +548,7 @@ If your use-case requires a custom distribution or a version that is not provide
|
||||
```yaml
|
||||
steps:
|
||||
- run: |
|
||||
download_url="https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_linux_hotspot_11.0.10_9.tar.gz"
|
||||
download_url="https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.12%2B7/OpenJDK11U-jdk_x64_linux_hotspot_11.0.12_7.tar.gz"
|
||||
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
|
||||
- uses: actions/setup-java@v6
|
||||
with:
|
||||
|
||||
@@ -1,268 +0,0 @@
|
||||
import * as core from '@actions/core';
|
||||
import * as tc from '@actions/tool-cache';
|
||||
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import semver from 'semver';
|
||||
|
||||
import {JavaBase} from '../base-installer.js';
|
||||
import {IAdoptAvailableVersions} from './models.js';
|
||||
import {
|
||||
JavaDownloadRelease,
|
||||
JavaInstallerOptions,
|
||||
JavaInstallerResults
|
||||
} from '../base-models.js';
|
||||
import {
|
||||
extractJdkFile,
|
||||
getNextPageUrlFromLinkHeader,
|
||||
getDownloadArchiveExtension,
|
||||
isVersionSatisfies,
|
||||
renameWinArchive,
|
||||
MAX_PAGINATION_PAGES,
|
||||
validatePaginationUrl
|
||||
} from '../../util.js';
|
||||
import {
|
||||
TemurinDistribution,
|
||||
TemurinImplementation
|
||||
} from '../temurin/installer.js';
|
||||
|
||||
export enum AdoptImplementation {
|
||||
Hotspot = 'Hotspot',
|
||||
OpenJ9 = 'OpenJ9'
|
||||
}
|
||||
|
||||
export class AdoptDistribution extends JavaBase {
|
||||
private readonly temurinDistribution: TemurinDistribution | null;
|
||||
|
||||
constructor(
|
||||
installerOptions: JavaInstallerOptions,
|
||||
private readonly jvmImpl: AdoptImplementation,
|
||||
temurinDistribution: TemurinDistribution | null = null
|
||||
) {
|
||||
super(`Adopt-${jvmImpl}`, installerOptions);
|
||||
|
||||
if (
|
||||
temurinDistribution !== null &&
|
||||
jvmImpl !== AdoptImplementation.Hotspot
|
||||
) {
|
||||
throw new Error('Only Hotspot JVM is supported by Temurin.');
|
||||
}
|
||||
|
||||
// Only use the temurin repo for Hotspot JVMs
|
||||
this.temurinDistribution =
|
||||
temurinDistribution ??
|
||||
(jvmImpl === AdoptImplementation.Hotspot
|
||||
? new TemurinDistribution(
|
||||
installerOptions,
|
||||
TemurinImplementation.Hotspot
|
||||
)
|
||||
: null);
|
||||
}
|
||||
|
||||
protected async findPackageForDownload(
|
||||
version: string
|
||||
): Promise<JavaDownloadRelease> {
|
||||
if (this.jvmImpl === AdoptImplementation.Hotspot) {
|
||||
core.notice(
|
||||
"AdoptOpenJDK has moved to Eclipse Temurin https://github.com/actions/setup-java#supported-distributions please consider changing to the 'temurin' distribution type in your setup-java configuration."
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
this.jvmImpl === AdoptImplementation.Hotspot &&
|
||||
this.temurinDistribution !== null
|
||||
) {
|
||||
try {
|
||||
return await this.temurinDistribution.findPackageForDownload(version);
|
||||
} catch (error) {
|
||||
// Log the failure but always fall back to legacy AdoptOpenJDK for resilience
|
||||
const errorMessage =
|
||||
error instanceof Error ? error.message : String(error);
|
||||
if (error instanceof Error && error.name === 'VersionNotFoundError') {
|
||||
core.notice(
|
||||
'The JVM you are looking for could not be found in the Temurin repository, this likely indicates ' +
|
||||
'that you are using an out of date version of Java, consider updating and moving to using the Temurin distribution type in setup-java.'
|
||||
);
|
||||
} else {
|
||||
// Log other errors for debugging but gracefully fall back
|
||||
core.debug(
|
||||
`Temurin lookup failed: ${errorMessage}. Falling back to AdoptOpenJDK API.`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// failed to find a Temurin version, so fall back to AdoptOpenJDK
|
||||
return this.findPackageForDownloadOldAdoptOpenJdk(version);
|
||||
}
|
||||
|
||||
private async findPackageForDownloadOldAdoptOpenJdk(
|
||||
version: string
|
||||
): Promise<JavaDownloadRelease> {
|
||||
const availableVersionsRaw = await this.getAvailableVersions();
|
||||
const availableVersionsWithBinaries = availableVersionsRaw
|
||||
.filter(item => item.binaries.length > 0)
|
||||
.map(item => {
|
||||
return {
|
||||
version: item.version_data.semver,
|
||||
url: item.binaries[0].package.link,
|
||||
checksum: {
|
||||
algorithm: 'sha256',
|
||||
value: item.binaries[0].package.checksum,
|
||||
source: item.binaries[0].package.checksum_link
|
||||
}
|
||||
} as JavaDownloadRelease;
|
||||
});
|
||||
|
||||
const satisfiedVersions = availableVersionsWithBinaries
|
||||
.filter(item => isVersionSatisfies(version, item.version))
|
||||
.sort((a, b) => {
|
||||
return -semver.compareBuild(a.version, b.version);
|
||||
});
|
||||
|
||||
const resolvedFullVersion =
|
||||
satisfiedVersions.length > 0 ? satisfiedVersions[0] : null;
|
||||
if (!resolvedFullVersion) {
|
||||
const availableVersionStrings = availableVersionsWithBinaries.map(
|
||||
item => item.version
|
||||
);
|
||||
throw this.createVersionNotFoundError(version, availableVersionStrings);
|
||||
}
|
||||
|
||||
return resolvedFullVersion;
|
||||
}
|
||||
|
||||
protected async downloadTool(
|
||||
javaRelease: JavaDownloadRelease
|
||||
): Promise<JavaInstallerResults> {
|
||||
core.info(
|
||||
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
|
||||
);
|
||||
let javaArchivePath = await this.downloadAndVerify(javaRelease);
|
||||
|
||||
core.info(`Extracting Java archive...`);
|
||||
const extension = getDownloadArchiveExtension();
|
||||
if (process.platform === 'win32') {
|
||||
javaArchivePath = renameWinArchive(javaArchivePath);
|
||||
}
|
||||
const extractedJavaPath = await extractJdkFile(javaArchivePath, extension);
|
||||
|
||||
const archiveName = fs.readdirSync(extractedJavaPath)[0];
|
||||
const archivePath = path.join(extractedJavaPath, archiveName);
|
||||
const version = this.getToolcacheVersionName(javaRelease.version);
|
||||
|
||||
const javaPath = await tc.cacheDir(
|
||||
archivePath,
|
||||
this.toolcacheFolderName,
|
||||
version,
|
||||
this.architecture
|
||||
);
|
||||
|
||||
return {version: javaRelease.version, path: javaPath};
|
||||
}
|
||||
|
||||
protected get toolcacheFolderName(): string {
|
||||
if (this.jvmImpl === AdoptImplementation.Hotspot) {
|
||||
// exclude Hotspot postfix from distribution name because Hosted runners have pre-cached Adopt OpenJDK under "Java_Adopt_jdk"
|
||||
// for more information see: https://github.com/actions/setup-java/pull/155#discussion_r610451063
|
||||
return `Java_Adopt_${this.packageType}`;
|
||||
}
|
||||
return super.toolcacheFolderName;
|
||||
}
|
||||
|
||||
private async getAvailableVersions(): Promise<IAdoptAvailableVersions[]> {
|
||||
const platform = this.getPlatformOption();
|
||||
const arch = this.distributionArchitecture();
|
||||
const imageType = this.packageType;
|
||||
const versionRange = encodeURI('[1.0,100.0]'); // retrieve all available versions
|
||||
const releaseType = this.stable ? 'ga' : 'ea';
|
||||
|
||||
if (core.isDebug()) {
|
||||
console.time('Retrieving available versions for Adopt took'); // eslint-disable-line no-console
|
||||
}
|
||||
|
||||
const baseRequestArguments = [
|
||||
`project=jdk`,
|
||||
'vendor=adoptopenjdk',
|
||||
`heap_size=normal`,
|
||||
'sort_method=DEFAULT',
|
||||
'sort_order=DESC',
|
||||
`os=${platform}`,
|
||||
`architecture=${arch}`,
|
||||
`image_type=${imageType}`,
|
||||
`release_type=${releaseType}`,
|
||||
`jvm_impl=${this.jvmImpl.toLowerCase()}`
|
||||
].join('&');
|
||||
|
||||
const requestArguments = `${baseRequestArguments}&page_size=20&page=0`;
|
||||
let availableVersionsUrl: string | null =
|
||||
`https://api.adoptopenjdk.net/v3/assets/version/${versionRange}?${requestArguments}`;
|
||||
const availableVersions: IAdoptAvailableVersions[] = [];
|
||||
let pageCount = 0;
|
||||
if (core.isDebug()) {
|
||||
core.debug(`Gathering available versions from '${availableVersionsUrl}'`);
|
||||
}
|
||||
|
||||
while (availableVersionsUrl) {
|
||||
pageCount++;
|
||||
const response =
|
||||
await this.http.getJson<IAdoptAvailableVersions[]>(
|
||||
availableVersionsUrl
|
||||
);
|
||||
const paginationPage = response.result;
|
||||
const nextUrl = getNextPageUrlFromLinkHeader(response.headers);
|
||||
if (
|
||||
nextUrl &&
|
||||
!validatePaginationUrl(nextUrl, 'https://api.adoptopenjdk.net')
|
||||
) {
|
||||
core.warning(
|
||||
`Ignoring pagination link with unexpected origin: ${nextUrl}`
|
||||
);
|
||||
availableVersionsUrl = null;
|
||||
} else {
|
||||
availableVersionsUrl = nextUrl;
|
||||
}
|
||||
if (paginationPage === null || paginationPage.length === 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
availableVersions.push(...paginationPage);
|
||||
|
||||
if (pageCount >= MAX_PAGINATION_PAGES) {
|
||||
core.warning(
|
||||
`Reached pagination safeguard limit (${MAX_PAGINATION_PAGES} pages) while listing Adopt releases.`
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (core.isDebug()) {
|
||||
core.startGroup('Print information about available versions');
|
||||
console.timeEnd('Retrieving available versions for Adopt took'); // eslint-disable-line no-console
|
||||
core.debug(`Available versions: [${availableVersions.length}]`);
|
||||
core.debug(
|
||||
availableVersions.map(item => item.version_data.semver).join(', ')
|
||||
);
|
||||
core.endGroup();
|
||||
}
|
||||
|
||||
return availableVersions;
|
||||
}
|
||||
|
||||
private getPlatformOption(): string {
|
||||
// Adopt has own platform names so need to map them
|
||||
switch (process.platform) {
|
||||
case 'darwin':
|
||||
return 'mac';
|
||||
case 'win32':
|
||||
return 'windows';
|
||||
default:
|
||||
return process.platform;
|
||||
}
|
||||
}
|
||||
|
||||
protected distributionArchitecture(): string {
|
||||
const architecture = super.distributionArchitecture();
|
||||
return architecture === 'armv7' ? 'arm' : architecture;
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
// Models from https://api.adoptopenjdk.net/swagger-ui/#/Assets/get_v3_assets_version__version
|
||||
|
||||
export interface IAdoptAvailableVersions {
|
||||
binaries: [
|
||||
{
|
||||
architecture: string;
|
||||
heap_size: string;
|
||||
image_type: string;
|
||||
jvm_impl: string;
|
||||
os: string;
|
||||
package: {
|
||||
checksum: string;
|
||||
checksum_link: string;
|
||||
download_count: number;
|
||||
link: string;
|
||||
metadata_link: string;
|
||||
name: string;
|
||||
size: string;
|
||||
};
|
||||
project: string;
|
||||
scm_ref: string;
|
||||
updated_at: string;
|
||||
}
|
||||
];
|
||||
id: string;
|
||||
release_link: string;
|
||||
release_name: string;
|
||||
release_type: string;
|
||||
vendor: string;
|
||||
version_data: {
|
||||
build: number;
|
||||
major: number;
|
||||
minor: number;
|
||||
openjdk_version: string;
|
||||
security: string;
|
||||
semver: string;
|
||||
};
|
||||
}
|
||||
@@ -30,23 +30,6 @@ export async function getJavaDistribution(
|
||||
const {LocalDistribution} = await import('./local/installer.js');
|
||||
return new LocalDistribution(normalizedInstallerOptions, jdkFile);
|
||||
}
|
||||
case JavaDistribution.Adopt:
|
||||
case JavaDistribution.AdoptHotspot: {
|
||||
const {AdoptDistribution, AdoptImplementation} =
|
||||
await import('./adopt/installer.js');
|
||||
return new AdoptDistribution(
|
||||
normalizedInstallerOptions,
|
||||
AdoptImplementation.Hotspot
|
||||
);
|
||||
}
|
||||
case JavaDistribution.AdoptOpenJ9: {
|
||||
const {AdoptDistribution, AdoptImplementation} =
|
||||
await import('./adopt/installer.js');
|
||||
return new AdoptDistribution(
|
||||
normalizedInstallerOptions,
|
||||
AdoptImplementation.OpenJ9
|
||||
);
|
||||
}
|
||||
case JavaDistribution.Temurin: {
|
||||
const {TemurinDistribution, TemurinImplementation} =
|
||||
await import('./temurin/installer.js');
|
||||
|
||||
@@ -2,9 +2,6 @@ import semver from 'semver';
|
||||
import {convertVersionToSemver} from '../util.js';
|
||||
|
||||
export enum JavaDistribution {
|
||||
Adopt = 'adopt',
|
||||
AdoptHotspot = 'adopt-hotspot',
|
||||
AdoptOpenJ9 = 'adopt-openj9',
|
||||
Temurin = 'temurin',
|
||||
Zulu = 'zulu',
|
||||
Liberica = 'liberica',
|
||||
@@ -24,9 +21,6 @@ export enum JavaDistribution {
|
||||
}
|
||||
|
||||
export const JAVA_PACKAGE_CAPABILITIES = {
|
||||
[JavaDistribution.Adopt]: ['jdk', 'jre'],
|
||||
[JavaDistribution.AdoptHotspot]: ['jdk', 'jre'],
|
||||
[JavaDistribution.AdoptOpenJ9]: ['jdk', 'jre'],
|
||||
[JavaDistribution.Temurin]: ['jdk', 'jre', 'jdk+jmods'],
|
||||
[JavaDistribution.Zulu]: [
|
||||
'jdk',
|
||||
|
||||
@@ -26,34 +26,12 @@ export type JavaPlatformCapability =
|
||||
RestrictedPlatformCapability | UnrestrictedPlatformCapability;
|
||||
|
||||
const X64_ARM64 = ['x64', 'aarch64'] as const;
|
||||
const X64_X86 = ['x64', 'x86'] as const;
|
||||
const STANDARD_LINUX = ['x64', 'x86', 'aarch64', 'ppc64le', 's390x'] as const;
|
||||
|
||||
export const JAVA_PLATFORM_CAPABILITIES: Record<
|
||||
JavaDistribution,
|
||||
JavaPlatformCapability
|
||||
> = {
|
||||
[JavaDistribution.Adopt]: {
|
||||
platforms: {
|
||||
linux: [...STANDARD_LINUX, {architecture: 'armv7', versionRange: '<18'}],
|
||||
macos: X64_ARM64,
|
||||
windows: ['x64', 'x86', 'aarch64']
|
||||
}
|
||||
},
|
||||
[JavaDistribution.AdoptHotspot]: {
|
||||
platforms: {
|
||||
linux: [...STANDARD_LINUX, {architecture: 'armv7', versionRange: '<18'}],
|
||||
macos: X64_ARM64,
|
||||
windows: ['x64', 'x86', 'aarch64']
|
||||
}
|
||||
},
|
||||
[JavaDistribution.AdoptOpenJ9]: {
|
||||
platforms: {
|
||||
linux: STANDARD_LINUX,
|
||||
macos: ['x64'],
|
||||
windows: X64_X86
|
||||
}
|
||||
},
|
||||
[JavaDistribution.Temurin]: {
|
||||
platforms: {
|
||||
linux: [...STANDARD_LINUX, {architecture: 'armv7', versionRange: '<18'}],
|
||||
|
||||
Reference in New Issue
Block a user