mirror of
https://gh-proxy.com/github.com/actions/setup-java.git
synced 2026-10-02 18:46:08 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9704b39bf2 | ||
|
|
7a445ee88d | ||
|
|
3232623d9c | ||
|
|
c0660d8edc | ||
|
|
2f7af1b9c5 | ||
|
|
16ef37f8dd | ||
|
|
a2374547df | ||
|
|
387ac29b30 | ||
|
|
9eda6b51cc | ||
|
|
78078da0cd | ||
|
|
5caaba646e |
@@ -15,3 +15,5 @@ jobs:
|
|||||||
call-basic-validation:
|
call-basic-validation:
|
||||||
name: Basic validation
|
name: Basic validation
|
||||||
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main
|
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main
|
||||||
|
with:
|
||||||
|
node-version: '20.x'
|
||||||
|
|||||||
@@ -15,3 +15,5 @@ jobs:
|
|||||||
call-check-dist:
|
call-check-dist:
|
||||||
name: Check dist/
|
name: Check dist/
|
||||||
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
|
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
|
||||||
|
with:
|
||||||
|
node-version: '20.x'
|
||||||
|
|||||||
@@ -0,0 +1,93 @@
|
|||||||
|
name: Validate cache with cache-dependency-path option
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/*
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
gradle1-save:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Run setup-java with the cache for gradle
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'adopt'
|
||||||
|
java-version: '11'
|
||||||
|
cache: gradle
|
||||||
|
cache-dependency-path: __tests__/cache/gradle1/*.gradle*
|
||||||
|
- name: Create files to cache
|
||||||
|
# Need to avoid using Gradle daemon to stabilize the save process on Windows
|
||||||
|
# https://github.com/actions/cache/issues/454#issuecomment-840493935
|
||||||
|
run: |
|
||||||
|
gradle downloadDependencies --no-daemon -p __tests__/cache/gradle1
|
||||||
|
if [ ! -d ~/.gradle/caches ]; then
|
||||||
|
echo "::error::The ~/.gradle/caches directory does not exist unexpectedly"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
gradle1-restore:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
|
needs: gradle1-save
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Run setup-java with the cache for gradle
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'adopt'
|
||||||
|
java-version: '11'
|
||||||
|
cache: gradle
|
||||||
|
cache-dependency-path: __tests__/cache/gradle1/*.gradle*
|
||||||
|
- name: Confirm that ~/.gradle/caches directory has been made
|
||||||
|
run: |
|
||||||
|
if [ ! -d ~/.gradle/caches ]; then
|
||||||
|
echo "::error::The ~/.gradle/caches directory does not exist unexpectedly"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ls ~/.gradle/caches/
|
||||||
|
gradle2-restore:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
|
needs: gradle1-save
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Run setup-java with the cache for gradle
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'adopt'
|
||||||
|
java-version: '11'
|
||||||
|
cache: gradle
|
||||||
|
cache-dependency-path: __tests__/cache/gradle2/*.gradle*
|
||||||
|
- name: Confirm that ~/.gradle/caches directory has not been made
|
||||||
|
run: |
|
||||||
|
if [ -d ~/.gradle/caches ]; then
|
||||||
|
echo "::error::The ~/.gradle/caches directory exists unexpectedly"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
@@ -24,7 +24,7 @@ jobs:
|
|||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Run setup-java with the cache for gradle
|
- name: Run setup-java with the cache for gradle
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
@@ -36,7 +36,7 @@ jobs:
|
|||||||
# Need to avoid using Gradle daemon to stabilize the save process on Windows
|
# Need to avoid using Gradle daemon to stabilize the save process on Windows
|
||||||
# https://github.com/actions/cache/issues/454#issuecomment-840493935
|
# https://github.com/actions/cache/issues/454#issuecomment-840493935
|
||||||
run: |
|
run: |
|
||||||
gradle downloadDependencies --no-daemon -p __tests__/cache/gradle
|
gradle downloadDependencies --no-daemon -p __tests__/cache/gradle1
|
||||||
if [ ! -d ~/.gradle/caches ]; then
|
if [ ! -d ~/.gradle/caches ]; then
|
||||||
echo "::error::The ~/.gradle/caches directory does not exist unexpectedly"
|
echo "::error::The ~/.gradle/caches directory does not exist unexpectedly"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -50,7 +50,7 @@ jobs:
|
|||||||
needs: gradle-save
|
needs: gradle-save
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Run setup-java with the cache for gradle
|
- name: Run setup-java with the cache for gradle
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
@@ -73,7 +73,7 @@ jobs:
|
|||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Run setup-java with the cache for maven
|
- name: Run setup-java with the cache for maven
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
@@ -97,7 +97,7 @@ jobs:
|
|||||||
needs: maven-save
|
needs: maven-save
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Run setup-java with the cache for maven
|
- name: Run setup-java with the cache for maven
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
@@ -121,10 +121,10 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-22.04]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Run setup-java with the cache for sbt
|
- name: Run setup-java with the cache for sbt
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
@@ -132,16 +132,11 @@ jobs:
|
|||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
cache: sbt
|
cache: sbt
|
||||||
- name: Setup SBT
|
|
||||||
if: matrix.os == 'macos-13'
|
|
||||||
run: |
|
|
||||||
echo ""Installing SBT...""
|
|
||||||
brew install sbt
|
|
||||||
- name: Create files to cache
|
- name: Create files to cache
|
||||||
run: sbt update
|
run: sbt update
|
||||||
|
|
||||||
- name: Check files to cache on macos-latest
|
- name: Check files to cache on macos-latest
|
||||||
if: matrix.os == 'macos-13'
|
if: matrix.os == 'macos-latest'
|
||||||
run: |
|
run: |
|
||||||
if [ ! -d ~/Library/Caches/Coursier ]; then
|
if [ ! -d ~/Library/Caches/Coursier ]; then
|
||||||
echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
|
echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
|
||||||
@@ -177,7 +172,7 @@ jobs:
|
|||||||
needs: sbt-save
|
needs: sbt-save
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Run setup-java with the cache for sbt
|
- name: Run setup-java with the cache for sbt
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ jobs:
|
|||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Download Adopt OpenJDK file
|
- name: Download Adopt OpenJDK file
|
||||||
run: |
|
run: |
|
||||||
if ($IsLinux) {
|
if ($IsLinux) {
|
||||||
@@ -58,7 +58,7 @@ jobs:
|
|||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Download Zulu OpenJDK file
|
- name: Download Zulu OpenJDK file
|
||||||
run: |
|
run: |
|
||||||
if ($IsLinux) {
|
if ($IsLinux) {
|
||||||
@@ -95,7 +95,7 @@ jobs:
|
|||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Download Eclipse Temurin file
|
- name: Download Eclipse Temurin file
|
||||||
run: |
|
run: |
|
||||||
if ($IsLinux) {
|
if ($IsLinux) {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ jobs:
|
|||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
@@ -60,7 +60,7 @@ jobs:
|
|||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Create fake settings.xml
|
- name: Create fake settings.xml
|
||||||
run: |
|
run: |
|
||||||
$xmlDirectory = Join-Path $HOME ".m2"
|
$xmlDirectory = Join-Path $HOME ".m2"
|
||||||
@@ -96,7 +96,7 @@ jobs:
|
|||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Create fake settings.xml
|
- name: Create fake settings.xml
|
||||||
run: |
|
run: |
|
||||||
$xmlDirectory = Join-Path $HOME ".m2"
|
$xmlDirectory = Join-Path $HOME ".m2"
|
||||||
@@ -133,7 +133,7 @@ jobs:
|
|||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-2022, ubuntu-22.04]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
distribution: [
|
distribution: [
|
||||||
'temurin',
|
'temurin',
|
||||||
'adopt',
|
'adopt',
|
||||||
@@ -37,10 +37,10 @@ jobs:
|
|||||||
- distribution: microsoft
|
- distribution: microsoft
|
||||||
version: 8
|
version: 8
|
||||||
- distribution: dragonwell
|
- distribution: dragonwell
|
||||||
os: macos-13
|
os: macos-latest
|
||||||
include:
|
include:
|
||||||
- distribution: oracle
|
- distribution: oracle
|
||||||
os: macos-13
|
os: macos-latest
|
||||||
version: 17
|
version: 17
|
||||||
- distribution: oracle
|
- distribution: oracle
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
@@ -51,7 +51,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
@@ -69,7 +69,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
distribution: ['temurin', 'zulu', 'liberica']
|
distribution: ['temurin', 'zulu', 'liberica']
|
||||||
version:
|
version:
|
||||||
- '11.0'
|
- '11.0'
|
||||||
@@ -87,7 +87,7 @@ jobs:
|
|||||||
version: '11.0.13+9'
|
version: '11.0.13+9'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
@@ -112,7 +112,7 @@ jobs:
|
|||||||
os: macos-latest
|
os: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
@@ -138,7 +138,7 @@ jobs:
|
|||||||
os: macos-latest
|
os: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
@@ -171,11 +171,11 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
version: ['17-ea', '15.0.0-ea.14']
|
version: ['17-ea', '15.0.0-ea.14']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
@@ -197,7 +197,7 @@ jobs:
|
|||||||
version: ['17-ea']
|
version: ['17-ea']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
@@ -215,7 +215,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
distribution: ['temurin', 'zulu', 'liberica', 'semeru']
|
distribution: ['temurin', 'zulu', 'liberica', 'semeru']
|
||||||
java-package: ['jre']
|
java-package: ['jre']
|
||||||
version: ['17.0']
|
version: ['17.0']
|
||||||
@@ -242,7 +242,7 @@ jobs:
|
|||||||
os: windows-latest
|
os: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
@@ -263,12 +263,12 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# x86 is not supported on macOS
|
# x86 is not supported on macOS
|
||||||
os: [windows-latest, ubuntu-22.04]
|
os: [windows-latest, ubuntu-latest]
|
||||||
distribution: ['liberica', 'zulu', 'corretto']
|
distribution: ['liberica', 'zulu', 'corretto']
|
||||||
version: ['11']
|
version: ['11']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
@@ -290,7 +290,7 @@ jobs:
|
|||||||
distribution: ['temurin', 'microsoft', 'corretto']
|
distribution: ['temurin', 'microsoft', 'corretto']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Create .java-version file
|
- name: Create .java-version file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "8" > .java-version
|
run: echo "8" > .java-version
|
||||||
@@ -311,11 +311,11 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
distribution: ['temurin', 'zulu', 'liberica', 'microsoft', 'corretto']
|
distribution: ['temurin', 'zulu', 'liberica', 'microsoft', 'corretto']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Create .java-version file
|
- name: Create .java-version file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "11" > .java-version
|
run: echo "11" > .java-version
|
||||||
@@ -335,11 +335,11 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
distribution: ['adopt', 'adopt-openj9', 'zulu']
|
distribution: ['adopt', 'adopt-openj9', 'zulu']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Create .java-version file
|
- name: Create .java-version file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "11.0.2" > .java-version
|
run: echo "11.0.2" > .java-version
|
||||||
@@ -359,11 +359,11 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
distribution: ['adopt', 'zulu', 'liberica']
|
distribution: ['adopt', 'zulu', 'liberica']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Create .java-version file
|
- name: Create .java-version file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "openjdk64-11.0.2" > .java-version
|
run: echo "openjdk64-11.0.2" > .java-version
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
name: 'Publish Immutable Action Version'
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checking out
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Publish
|
|
||||||
id: publish
|
|
||||||
uses: actions/publish-immutable-action@v0.0.4
|
|
||||||
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
@@ -41,6 +41,8 @@ This action allows you to work with Java and Scala projects.
|
|||||||
|
|
||||||
- `cache`: Quick [setup caching](#caching-packages-dependencies) for the dependencies managed through one of the predefined package managers. It can be one of "maven", "gradle" or "sbt".
|
- `cache`: Quick [setup caching](#caching-packages-dependencies) for the dependencies managed through one of the predefined package managers. It can be one of "maven", "gradle" or "sbt".
|
||||||
|
|
||||||
|
- `cache-dependency-path`: The path to a dependency file: pom.xml, build.gradle, build.sbt, etc. This option can be used with the `cache` option. If this option is omitted, the action searches for the dependency file in the entire repository. This option supports wildcards and a list of file names for caching multiple dependencies.
|
||||||
|
|
||||||
#### Maven options
|
#### Maven options
|
||||||
The action has a bunch of inputs to generate maven's [settings.xml](https://maven.apache.org/settings.html) on the fly and pass the values to Apache Maven GPG Plugin as well as Apache Maven Toolchains. See [advanced usage](docs/advanced-usage.md) for more.
|
The action has a bunch of inputs to generate maven's [settings.xml](https://maven.apache.org/settings.html) on the fly and pass the values to Apache Maven GPG Plugin as well as Apache Maven Toolchains. See [advanced usage](docs/advanced-usage.md) for more.
|
||||||
|
|
||||||
@@ -67,28 +69,28 @@ This action allows you to work with Java and Scala projects.
|
|||||||
#### Eclipse Temurin
|
#### Eclipse Temurin
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin' # See 'Supported distributions' for available options
|
distribution: 'temurin' # See 'Supported distributions' for available options
|
||||||
java-version: '17'
|
java-version: '21'
|
||||||
- run: java HelloWorldApp.java
|
- run: java HelloWorldApp.java
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Azul Zulu OpenJDK
|
#### Azul Zulu OpenJDK
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu' # See 'Supported distributions' for available options
|
distribution: 'zulu' # See 'Supported distributions' for available options
|
||||||
java-version: '17'
|
java-version: '21'
|
||||||
- run: java HelloWorldApp.java
|
- run: java HelloWorldApp.java
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Supported version syntax
|
#### Supported version syntax
|
||||||
The `java-version` input supports an exact version or a version range using [SemVer](https://semver.org/) notation:
|
The `java-version` input supports an exact version or a version range using [SemVer](https://semver.org/) notation:
|
||||||
- major versions: `8`, `11`, `16`, `17`
|
- major versions: `8`, `11`, `16`, `17`, `21`
|
||||||
- more specific versions: `17.0`, `11.0`, `11.0.4`, `8.0.232`, `8.0.282+8`
|
- more specific versions: `17.0`, `11.0`, `11.0.4`, `8.0.232`, `8.0.282+8`
|
||||||
- early access (EA) versions: `15-ea`, `15.0.0-ea`, `15.0.0-ea.2`, `15.0.0+2-ea`
|
- early access (EA) versions: `15-ea`, `15.0.0-ea`, `15.0.0-ea.2`, `15.0.0+2-ea`
|
||||||
|
|
||||||
@@ -115,10 +117,13 @@ Currently, the following distributions are supported:
|
|||||||
|
|
||||||
### Caching packages dependencies
|
### Caching packages dependencies
|
||||||
The action has a built-in functionality for caching and restoring dependencies. It uses [toolkit/cache](https://github.com/actions/toolkit/tree/main/packages/cache) under hood for caching dependencies but requires less configuration settings. Supported package managers are gradle, maven and sbt. The format of the used cache key is `setup-java-${{ platform }}-${{ packageManager }}-${{ fileHash }}`, where the hash is based on the following files:
|
The action has a built-in functionality for caching and restoring dependencies. It uses [toolkit/cache](https://github.com/actions/toolkit/tree/main/packages/cache) under hood for caching dependencies but requires less configuration settings. Supported package managers are gradle, maven and sbt. The format of the used cache key is `setup-java-${{ platform }}-${{ packageManager }}-${{ fileHash }}`, where the hash is based on the following files:
|
||||||
|
|
||||||
- gradle: `**/*.gradle*`, `**/gradle-wrapper.properties`, `buildSrc/**/Versions.kt`, `buildSrc/**/Dependencies.kt`, `gradle/*.versions.toml`, and `**/versions.properties`
|
- gradle: `**/*.gradle*`, `**/gradle-wrapper.properties`, `buildSrc/**/Versions.kt`, `buildSrc/**/Dependencies.kt`, `gradle/*.versions.toml`, and `**/versions.properties`
|
||||||
- maven: `**/pom.xml`
|
- maven: `**/pom.xml`
|
||||||
- sbt: all sbt build definition files `**/*.sbt`, `**/project/build.properties`, `**/project/**.scala`, `**/project/**.sbt`
|
- sbt: all sbt build definition files `**/*.sbt`, `**/project/build.properties`, `**/project/**.scala`, `**/project/**.sbt`
|
||||||
|
|
||||||
|
When the option `cache-dependency-path` is specified, the hash is based on the matching file. This option supports wildcards and a list of file names, and is especially useful for monorepos.
|
||||||
|
|
||||||
The workflow output `cache-hit` is set to indicate if an exact match was found for the key [as actions/cache does](https://github.com/actions/cache/tree/main#outputs).
|
The workflow output `cache-hit` is set to indicate if an exact match was found for the key [as actions/cache does](https://github.com/actions/cache/tree/main#outputs).
|
||||||
|
|
||||||
The cache input is optional, and caching is turned off by default.
|
The cache input is optional, and caching is turned off by default.
|
||||||
@@ -126,24 +131,28 @@ The cache input is optional, and caching is turned off by default.
|
|||||||
#### Caching gradle dependencies
|
#### Caching gradle dependencies
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: '17'
|
java-version: '21'
|
||||||
cache: 'gradle'
|
cache: 'gradle'
|
||||||
|
cache-dependency-path: | # optional
|
||||||
|
sub-project/*.gradle*
|
||||||
|
sub-project/**/gradle-wrapper.properties
|
||||||
- run: ./gradlew build --no-daemon
|
- run: ./gradlew build --no-daemon
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Caching maven dependencies
|
#### Caching maven dependencies
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: '17'
|
java-version: '21'
|
||||||
cache: 'maven'
|
cache: 'maven'
|
||||||
|
cache-dependency-path: 'sub-project/pom.xml' # optional
|
||||||
- name: Build with Maven
|
- name: Build with Maven
|
||||||
run: mvn -B package --file pom.xml
|
run: mvn -B package --file pom.xml
|
||||||
```
|
```
|
||||||
@@ -151,16 +160,35 @@ steps:
|
|||||||
#### Caching sbt dependencies
|
#### Caching sbt dependencies
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: '17'
|
java-version: '21'
|
||||||
cache: 'sbt'
|
cache: 'sbt'
|
||||||
|
cache-dependency-path: | # optional
|
||||||
|
sub-project/build.sbt
|
||||||
|
sub-project/project/build.properties
|
||||||
- name: Build with SBT
|
- name: Build with SBT
|
||||||
run: sbt package
|
run: sbt package
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Cache segment restore timeout
|
||||||
|
Usually, cache gets downloaded in multiple segments of fixed sizes. Sometimes, a segment download gets stuck, which causes the workflow job to be stuck. The cache segment download timeout [was introduced](https://github.com/actions/toolkit/tree/main/packages/cache#cache-segment-restore-timeout) to solve this issue as it allows the segment download to get aborted and hence allows the job to proceed with a cache miss. The default value of the cache segment download timeout is set to 10 minutes and can be customized by specifying an environment variable named `SEGMENT_DOWNLOAD_TIMEOUT_MINS` with a timeout value in minutes.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
env:
|
||||||
|
SEGMENT_DOWNLOAD_TIMEOUT_MINS: '5'
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '21'
|
||||||
|
cache: 'gradle'
|
||||||
|
- run: ./gradlew build --no-daemon
|
||||||
|
```
|
||||||
|
|
||||||
### Check latest
|
### Check latest
|
||||||
|
|
||||||
In the basic examples above, the `check-latest` flag defaults to `false`. When set to `false`, the action tries to first resolve a version of Java from the local tool cache on the runner. If unable to find a specific version in the cache, the action will download a version of Java. Use the default or set `check-latest` to `false` if you prefer a faster more consistent setup experience that prioritizes trying to use the cached versions at the expense of newer versions sometimes being available for download.
|
In the basic examples above, the `check-latest` flag defaults to `false`. When set to `false`, the action tries to first resolve a version of Java from the local tool cache on the runner. If unable to find a specific version in the cache, the action will download a version of Java. Use the default or set `check-latest` to `false` if you prefer a faster more consistent setup experience that prioritizes trying to use the cached versions at the expense of newer versions sometimes being available for download.
|
||||||
@@ -172,11 +200,11 @@ For Java distributions that are not cached on Hosted images, `check-latest` alwa
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: '17'
|
java-version: '21'
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- run: java HelloWorldApp.java
|
- run: java HelloWorldApp.java
|
||||||
```
|
```
|
||||||
@@ -188,12 +216,12 @@ jobs:
|
|||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
java: [ '8', '11', '17' ]
|
java: [ '8', '11', '17', '21' ]
|
||||||
name: Java ${{ matrix.Java }} sample
|
name: Java ${{ matrix.Java }} sample
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Setup java
|
- name: Setup java
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: '<distribution>'
|
distribution: '<distribution>'
|
||||||
java-version: ${{ matrix.java }}
|
java-version: ${{ matrix.java }}
|
||||||
@@ -206,7 +234,7 @@ All versions are added to the PATH. The last version will be used and available
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: '<distribution>'
|
distribution: '<distribution>'
|
||||||
java-version: |
|
java-version: |
|
||||||
|
|||||||
+88
-22
@@ -6,6 +6,7 @@ import * as fs from 'fs';
|
|||||||
import * as os from 'os';
|
import * as os from 'os';
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as cache from '@actions/cache';
|
import * as cache from '@actions/cache';
|
||||||
|
import * as glob from '@actions/glob';
|
||||||
|
|
||||||
describe('dependency cache', () => {
|
describe('dependency cache', () => {
|
||||||
const ORIGINAL_RUNNER_OS = process.env['RUNNER_OS'];
|
const ORIGINAL_RUNNER_OS = process.env['RUNNER_OS'];
|
||||||
@@ -64,6 +65,10 @@ describe('dependency cache', () => {
|
|||||||
ReturnType<typeof cache.restoreCache>,
|
ReturnType<typeof cache.restoreCache>,
|
||||||
Parameters<typeof cache.restoreCache>
|
Parameters<typeof cache.restoreCache>
|
||||||
>;
|
>;
|
||||||
|
let spyGlobHashFiles: jest.SpyInstance<
|
||||||
|
ReturnType<typeof glob.hashFiles>,
|
||||||
|
Parameters<typeof glob.hashFiles>
|
||||||
|
>;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
spyCacheRestore = jest
|
spyCacheRestore = jest
|
||||||
@@ -71,18 +76,19 @@ describe('dependency cache', () => {
|
|||||||
.mockImplementation((paths: string[], primaryKey: string) =>
|
.mockImplementation((paths: string[], primaryKey: string) =>
|
||||||
Promise.resolve(undefined)
|
Promise.resolve(undefined)
|
||||||
);
|
);
|
||||||
|
spyGlobHashFiles = jest.spyOn(glob, 'hashFiles');
|
||||||
spyWarning.mockImplementation(() => null);
|
spyWarning.mockImplementation(() => null);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('throws error if unsupported package manager specified', () => {
|
it('throws error if unsupported package manager specified', () => {
|
||||||
return expect(restore('ant')).rejects.toThrow(
|
return expect(restore('ant', '')).rejects.toThrow(
|
||||||
'unknown package manager specified: ant'
|
'unknown package manager specified: ant'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('for maven', () => {
|
describe('for maven', () => {
|
||||||
it('throws error if no pom.xml found', async () => {
|
it('throws error if no pom.xml found', async () => {
|
||||||
await expect(restore('maven')).rejects.toThrow(
|
await expect(restore('maven', '')).rejects.toThrow(
|
||||||
`No file in ${projectRoot(
|
`No file in ${projectRoot(
|
||||||
workspace
|
workspace
|
||||||
)} matched to [**/pom.xml], make sure you have checked out the target repository`
|
)} matched to [**/pom.xml], make sure you have checked out the target repository`
|
||||||
@@ -91,15 +97,16 @@ describe('dependency cache', () => {
|
|||||||
it('downloads cache', async () => {
|
it('downloads cache', async () => {
|
||||||
createFile(join(workspace, 'pom.xml'));
|
createFile(join(workspace, 'pom.xml'));
|
||||||
|
|
||||||
await restore('maven');
|
await restore('maven', '');
|
||||||
expect(spyCacheRestore).toHaveBeenCalled();
|
expect(spyCacheRestore).toHaveBeenCalled();
|
||||||
|
expect(spyGlobHashFiles).toHaveBeenCalledWith('**/pom.xml');
|
||||||
expect(spyWarning).not.toHaveBeenCalled();
|
expect(spyWarning).not.toHaveBeenCalled();
|
||||||
expect(spyInfo).toHaveBeenCalledWith('maven cache is not found');
|
expect(spyInfo).toHaveBeenCalledWith('maven cache is not found');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
describe('for gradle', () => {
|
describe('for gradle', () => {
|
||||||
it('throws error if no build.gradle found', async () => {
|
it('throws error if no build.gradle found', async () => {
|
||||||
await expect(restore('gradle')).rejects.toThrow(
|
await expect(restore('gradle', '')).rejects.toThrow(
|
||||||
`No file in ${projectRoot(
|
`No file in ${projectRoot(
|
||||||
workspace
|
workspace
|
||||||
)} matched to [**/*.gradle*,**/gradle-wrapper.properties,buildSrc/**/Versions.kt,buildSrc/**/Dependencies.kt,gradle/*.versions.toml,**/versions.properties], make sure you have checked out the target repository`
|
)} matched to [**/*.gradle*,**/gradle-wrapper.properties,buildSrc/**/Versions.kt,buildSrc/**/Dependencies.kt,gradle/*.versions.toml,**/versions.properties], make sure you have checked out the target repository`
|
||||||
@@ -108,16 +115,22 @@ describe('dependency cache', () => {
|
|||||||
it('downloads cache based on build.gradle', async () => {
|
it('downloads cache based on build.gradle', async () => {
|
||||||
createFile(join(workspace, 'build.gradle'));
|
createFile(join(workspace, 'build.gradle'));
|
||||||
|
|
||||||
await restore('gradle');
|
await restore('gradle', '');
|
||||||
expect(spyCacheRestore).toHaveBeenCalled();
|
expect(spyCacheRestore).toHaveBeenCalled();
|
||||||
|
expect(spyGlobHashFiles).toHaveBeenCalledWith(
|
||||||
|
'**/*.gradle*\n**/gradle-wrapper.properties\nbuildSrc/**/Versions.kt\nbuildSrc/**/Dependencies.kt\ngradle/*.versions.toml\n**/versions.properties'
|
||||||
|
);
|
||||||
expect(spyWarning).not.toHaveBeenCalled();
|
expect(spyWarning).not.toHaveBeenCalled();
|
||||||
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
|
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
|
||||||
});
|
});
|
||||||
it('downloads cache based on build.gradle.kts', async () => {
|
it('downloads cache based on build.gradle.kts', async () => {
|
||||||
createFile(join(workspace, 'build.gradle.kts'));
|
createFile(join(workspace, 'build.gradle.kts'));
|
||||||
|
|
||||||
await restore('gradle');
|
await restore('gradle', '');
|
||||||
expect(spyCacheRestore).toHaveBeenCalled();
|
expect(spyCacheRestore).toHaveBeenCalled();
|
||||||
|
expect(spyGlobHashFiles).toHaveBeenCalledWith(
|
||||||
|
'**/*.gradle*\n**/gradle-wrapper.properties\nbuildSrc/**/Versions.kt\nbuildSrc/**/Dependencies.kt\ngradle/*.versions.toml\n**/versions.properties'
|
||||||
|
);
|
||||||
expect(spyWarning).not.toHaveBeenCalled();
|
expect(spyWarning).not.toHaveBeenCalled();
|
||||||
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
|
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
|
||||||
});
|
});
|
||||||
@@ -125,24 +138,30 @@ describe('dependency cache', () => {
|
|||||||
createDirectory(join(workspace, 'gradle'));
|
createDirectory(join(workspace, 'gradle'));
|
||||||
createFile(join(workspace, 'gradle', 'libs.versions.toml'));
|
createFile(join(workspace, 'gradle', 'libs.versions.toml'));
|
||||||
|
|
||||||
await restore('gradle');
|
await restore('gradle', '');
|
||||||
expect(spyCacheRestore).toHaveBeenCalled();
|
expect(spyCacheRestore).toHaveBeenCalled();
|
||||||
|
expect(spyGlobHashFiles).toHaveBeenCalledWith(
|
||||||
|
'**/*.gradle*\n**/gradle-wrapper.properties\nbuildSrc/**/Versions.kt\nbuildSrc/**/Dependencies.kt\ngradle/*.versions.toml\n**/versions.properties'
|
||||||
|
);
|
||||||
|
expect(spyWarning).not.toHaveBeenCalled();
|
||||||
|
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
|
||||||
|
});
|
||||||
|
it('downloads cache based on buildSrc/Versions.kt', async () => {
|
||||||
|
createDirectory(join(workspace, 'buildSrc'));
|
||||||
|
createFile(join(workspace, 'buildSrc', 'Versions.kt'));
|
||||||
|
|
||||||
|
await restore('gradle', '');
|
||||||
|
expect(spyCacheRestore).toHaveBeenCalled();
|
||||||
|
expect(spyGlobHashFiles).toHaveBeenCalledWith(
|
||||||
|
'**/*.gradle*\n**/gradle-wrapper.properties\nbuildSrc/**/Versions.kt\nbuildSrc/**/Dependencies.kt\ngradle/*.versions.toml\n**/versions.properties'
|
||||||
|
);
|
||||||
expect(spyWarning).not.toHaveBeenCalled();
|
expect(spyWarning).not.toHaveBeenCalled();
|
||||||
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
|
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('downloads cache based on buildSrc/Versions.kt', async () => {
|
|
||||||
createDirectory(join(workspace, 'buildSrc'));
|
|
||||||
createFile(join(workspace, 'buildSrc', 'Versions.kt'));
|
|
||||||
|
|
||||||
await restore('gradle');
|
|
||||||
expect(spyCacheRestore).toHaveBeenCalled();
|
|
||||||
expect(spyWarning).not.toHaveBeenCalled();
|
|
||||||
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
|
|
||||||
});
|
|
||||||
describe('for sbt', () => {
|
describe('for sbt', () => {
|
||||||
it('throws error if no build.sbt found', async () => {
|
it('throws error if no build.sbt found', async () => {
|
||||||
await expect(restore('sbt')).rejects.toThrow(
|
await expect(restore('sbt', '')).rejects.toThrow(
|
||||||
`No file in ${projectRoot(
|
`No file in ${projectRoot(
|
||||||
workspace
|
workspace
|
||||||
)} matched to [**/*.sbt,**/project/build.properties,**/project/**.scala,**/project/**.sbt], make sure you have checked out the target repository`
|
)} matched to [**/*.sbt,**/project/build.properties,**/project/**.scala,**/project/**.sbt], make sure you have checked out the target repository`
|
||||||
@@ -151,8 +170,11 @@ describe('dependency cache', () => {
|
|||||||
it('downloads cache', async () => {
|
it('downloads cache', async () => {
|
||||||
createFile(join(workspace, 'build.sbt'));
|
createFile(join(workspace, 'build.sbt'));
|
||||||
|
|
||||||
await restore('sbt');
|
await restore('sbt', '');
|
||||||
expect(spyCacheRestore).toHaveBeenCalled();
|
expect(spyCacheRestore).toHaveBeenCalled();
|
||||||
|
expect(spyGlobHashFiles).toHaveBeenCalledWith(
|
||||||
|
'**/*.sbt\n**/project/build.properties\n**/project/**.scala\n**/project/**.sbt'
|
||||||
|
);
|
||||||
expect(spyWarning).not.toHaveBeenCalled();
|
expect(spyWarning).not.toHaveBeenCalled();
|
||||||
expect(spyInfo).toHaveBeenCalledWith('sbt cache is not found');
|
expect(spyInfo).toHaveBeenCalledWith('sbt cache is not found');
|
||||||
});
|
});
|
||||||
@@ -161,11 +183,11 @@ describe('dependency cache', () => {
|
|||||||
createDirectory(join(workspace, 'project'));
|
createDirectory(join(workspace, 'project'));
|
||||||
createFile(join(workspace, 'project/DependenciesV1.scala'));
|
createFile(join(workspace, 'project/DependenciesV1.scala'));
|
||||||
|
|
||||||
await restore('sbt');
|
await restore('sbt', '');
|
||||||
const firstCall = spySaveState.mock.calls.toString();
|
const firstCall = spySaveState.mock.calls.toString();
|
||||||
|
|
||||||
spySaveState.mockClear();
|
spySaveState.mockClear();
|
||||||
await restore('sbt');
|
await restore('sbt', '');
|
||||||
const secondCall = spySaveState.mock.calls.toString();
|
const secondCall = spySaveState.mock.calls.toString();
|
||||||
|
|
||||||
// Make sure multiple restores produce the same cache
|
// Make sure multiple restores produce the same cache
|
||||||
@@ -173,7 +195,7 @@ describe('dependency cache', () => {
|
|||||||
|
|
||||||
spySaveState.mockClear();
|
spySaveState.mockClear();
|
||||||
createFile(join(workspace, 'project/DependenciesV2.scala'));
|
createFile(join(workspace, 'project/DependenciesV2.scala'));
|
||||||
await restore('sbt');
|
await restore('sbt', '');
|
||||||
const thirdCall = spySaveState.mock.calls.toString();
|
const thirdCall = spySaveState.mock.calls.toString();
|
||||||
|
|
||||||
expect(firstCall).not.toBe(thirdCall);
|
expect(firstCall).not.toBe(thirdCall);
|
||||||
@@ -182,11 +204,55 @@ describe('dependency cache', () => {
|
|||||||
it('downloads cache based on versions.properties', async () => {
|
it('downloads cache based on versions.properties', async () => {
|
||||||
createFile(join(workspace, 'versions.properties'));
|
createFile(join(workspace, 'versions.properties'));
|
||||||
|
|
||||||
await restore('gradle');
|
await restore('gradle', '');
|
||||||
expect(spyCacheRestore).toHaveBeenCalled();
|
expect(spyCacheRestore).toHaveBeenCalled();
|
||||||
|
expect(spyGlobHashFiles).toHaveBeenCalledWith(
|
||||||
|
'**/*.gradle*\n**/gradle-wrapper.properties\nbuildSrc/**/Versions.kt\nbuildSrc/**/Dependencies.kt\ngradle/*.versions.toml\n**/versions.properties'
|
||||||
|
);
|
||||||
expect(spyWarning).not.toHaveBeenCalled();
|
expect(spyWarning).not.toHaveBeenCalled();
|
||||||
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
|
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
|
||||||
});
|
});
|
||||||
|
describe('cache-dependency-path', () => {
|
||||||
|
it('throws error if no matching dependency file found', async () => {
|
||||||
|
createFile(join(workspace, 'build.gradle.kts'));
|
||||||
|
await expect(
|
||||||
|
restore('gradle', 'sub-project/**/build.gradle.kts')
|
||||||
|
).rejects.toThrow(
|
||||||
|
`No file in ${projectRoot(
|
||||||
|
workspace
|
||||||
|
)} matched to [sub-project/**/build.gradle.kts], make sure you have checked out the target repository`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
it('downloads cache based on the specified pattern', async () => {
|
||||||
|
createFile(join(workspace, 'build.gradle.kts'));
|
||||||
|
createDirectory(join(workspace, 'sub-project1'));
|
||||||
|
createFile(join(workspace, 'sub-project1', 'build.gradle.kts'));
|
||||||
|
createDirectory(join(workspace, 'sub-project2'));
|
||||||
|
createFile(join(workspace, 'sub-project2', 'build.gradle.kts'));
|
||||||
|
|
||||||
|
await restore('gradle', 'build.gradle.kts');
|
||||||
|
expect(spyCacheRestore).toHaveBeenCalled();
|
||||||
|
expect(spyGlobHashFiles).toHaveBeenCalledWith('build.gradle.kts');
|
||||||
|
expect(spyWarning).not.toHaveBeenCalled();
|
||||||
|
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
|
||||||
|
|
||||||
|
await restore('gradle', 'sub-project1/**/*.gradle*\n');
|
||||||
|
expect(spyCacheRestore).toHaveBeenCalled();
|
||||||
|
expect(spyGlobHashFiles).toHaveBeenCalledWith(
|
||||||
|
'sub-project1/**/*.gradle*'
|
||||||
|
);
|
||||||
|
expect(spyWarning).not.toHaveBeenCalled();
|
||||||
|
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
|
||||||
|
|
||||||
|
await restore('gradle', '*.gradle*\nsub-project2/**/*.gradle*\n');
|
||||||
|
expect(spyCacheRestore).toHaveBeenCalled();
|
||||||
|
expect(spyGlobHashFiles).toHaveBeenCalledWith(
|
||||||
|
'*.gradle*\nsub-project2/**/*.gradle*'
|
||||||
|
);
|
||||||
|
expect(spyWarning).not.toHaveBeenCalled();
|
||||||
|
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
describe('save', () => {
|
describe('save', () => {
|
||||||
let spyCacheSave: jest.SpyInstance<
|
let spyCacheSave: jest.SpyInstance<
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
.gradle
|
||||||
|
**/build/
|
||||||
|
!src/**/build/
|
||||||
|
|
||||||
|
# Ignore Gradle GUI config
|
||||||
|
gradle-app.setting
|
||||||
|
|
||||||
|
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||||
|
!gradle-wrapper.jar
|
||||||
|
|
||||||
|
# Cache of project
|
||||||
|
.gradletasknamecache
|
||||||
Vendored
+17
@@ -0,0 +1,17 @@
|
|||||||
|
plugins {
|
||||||
|
id 'java'
|
||||||
|
}
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
implementation 'org.junit.jupiter:junit-jupiter-api:5.7.2'
|
||||||
|
}
|
||||||
|
tasks.register('downloadDependencies') {
|
||||||
|
doLast {
|
||||||
|
def total = configurations.compileClasspath.inject (0) { sum, file ->
|
||||||
|
sum + file.length()
|
||||||
|
}
|
||||||
|
println total
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,443 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"buildVersion": 36,
|
||||||
|
"updateVersion": 0,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/14+36/bellsoft-jdk14+36-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "14+36",
|
||||||
|
"featureVersion": 14
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 9,
|
||||||
|
"updateVersion": 11,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.11+9/bellsoft-jdk11.0.11+9-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.11+9",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 8,
|
||||||
|
"updateVersion": 1,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/14.0.1+8/bellsoft-jdk14.0.1+8-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "14.0.1+8",
|
||||||
|
"featureVersion": 14
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 262,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u262+10/bellsoft-jdk8u262+10-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u262+10",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 1,
|
||||||
|
"updateVersion": 275,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u275+1/bellsoft-jdk8u275+1-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u275+1",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 1,
|
||||||
|
"updateVersion": 9,
|
||||||
|
"patchVersion": 1,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.9.1+1/bellsoft-jdk11.0.9.1+1-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.9.1+1",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 8,
|
||||||
|
"updateVersion": 202,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u202/bellsoft-jdk8u202-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u202+8",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 33,
|
||||||
|
"updateVersion": 0,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/12/bellsoft-jdk12-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "12+33",
|
||||||
|
"featureVersion": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 8,
|
||||||
|
"updateVersion": 282,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u282+8/bellsoft-jdk8u282+8-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u282+8",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 11,
|
||||||
|
"updateVersion": 9,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.9+11/bellsoft-jdk11.0.9+11-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.9+11",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 33,
|
||||||
|
"updateVersion": 0,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/13/bellsoft-jdk13-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "13+33",
|
||||||
|
"featureVersion": 13
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 12,
|
||||||
|
"updateVersion": 9,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.9+12/bellsoft-jdk11.0.9+12-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.9+12",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 7,
|
||||||
|
"updateVersion": 242,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u242+7/bellsoft-jdk8u242+7-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u242+7",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 9,
|
||||||
|
"updateVersion": 2,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/13.0.2+9/bellsoft-jdk13.0.2+9-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "13.0.2+9",
|
||||||
|
"featureVersion": 13
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 9,
|
||||||
|
"updateVersion": 1,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/13.0.1/bellsoft-jdk13.0.1-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "13.0.1+9",
|
||||||
|
"featureVersion": 13
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 1,
|
||||||
|
"updateVersion": 265,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u265+1/bellsoft-jdk8u265+1-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u265+1",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 9,
|
||||||
|
"updateVersion": 1,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/15.0.1+9/bellsoft-jdk15.0.1+9-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "15.0.1+9",
|
||||||
|
"featureVersion": 15
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 272,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u272+10/bellsoft-jdk8u272+10-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u272+10",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 7,
|
||||||
|
"updateVersion": 2,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/16.0.2+7/bellsoft-jdk16.0.2+7-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "16.0.2+7",
|
||||||
|
"featureVersion": 16
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 6,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.6+10/bellsoft-jdk11.0.6+10-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.6+10",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 9,
|
||||||
|
"updateVersion": 252,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u252+9/bellsoft-jdk8u252+9-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u252+9",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 12,
|
||||||
|
"updateVersion": 212,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u212/bellsoft-jdk8u212-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u212+12",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 2,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/15.0.2+10/bellsoft-jdk15.0.2+10-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "15.0.2+10",
|
||||||
|
"featureVersion": 15
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 9,
|
||||||
|
"updateVersion": 10,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.10+9/bellsoft-jdk11.0.10+9-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.10+9",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 0,
|
||||||
|
"updateVersion": 1,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.1/bellsoft-jdk11.0.1-linux-amd64.tar.gz",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.1+0",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 7,
|
||||||
|
"updateVersion": 12,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.12+7/bellsoft-jdk11.0.12+7-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.12+7",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 36,
|
||||||
|
"updateVersion": 0,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/16+36/bellsoft-jdk16+36-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "16+36",
|
||||||
|
"featureVersion": 16
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 12,
|
||||||
|
"updateVersion": 3,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.3/bellsoft-jdk11.0.3-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.3+12",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 8,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.8+10/bellsoft-jdk11.0.8+10-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.8+10",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 7,
|
||||||
|
"updateVersion": 2,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.2/bellsoft-jdk11.0.2-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.2+7",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 5,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.5/bellsoft-jdk11.0.5-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.5+10",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 4,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.4/bellsoft-jdk11.0.4-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.4+10",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 2,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/12.0.2/bellsoft-jdk12.0.2-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "12.0.2+10",
|
||||||
|
"featureVersion": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 12,
|
||||||
|
"updateVersion": 1,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/12.0.1/bellsoft-jdk12.0.1-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "12.0.1+12",
|
||||||
|
"featureVersion": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 1,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/13.0.1+10/bellsoft-jdk13.0.1+10-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "13.0.1+10",
|
||||||
|
"featureVersion": 13
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 11,
|
||||||
|
"updateVersion": 5,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.5+11/bellsoft-jdk11.0.5+11-linux-amd64.tar.gz",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.5+11",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 11,
|
||||||
|
"updateVersion": 5,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.5+11/bellsoft-jdk11.0.5+11-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.5+11",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 292,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u292+10/bellsoft-jdk8u292+10-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u292+10",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 11,
|
||||||
|
"updateVersion": 222,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u222/bellsoft-jdk8u222-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u222+11",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 36,
|
||||||
|
"updateVersion": 0,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/15+36/bellsoft-jdk15+36-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "15+36",
|
||||||
|
"featureVersion": 15
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 7,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.7+10/bellsoft-jdk11.0.7+10-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.7+10",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 232,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u232+10/bellsoft-jdk8u232+10-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u232+10",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 8,
|
||||||
|
"updateVersion": 2,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/15.0.2+8/bellsoft-jdk15.0.2+8-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "15.0.2+8",
|
||||||
|
"featureVersion": 15
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 8,
|
||||||
|
"updateVersion": 302,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u302+8/bellsoft-jdk8u302+8-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u302+8",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 12,
|
||||||
|
"updateVersion": 192,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u192.all/bellsoft-jdk1.8.0-linux-amd64.tar.gz",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u192+12",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 13,
|
||||||
|
"updateVersion": 2,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/14.0.2+13/bellsoft-jdk14.0.2+13-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "14.0.2+13",
|
||||||
|
"featureVersion": 14
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 9,
|
||||||
|
"updateVersion": 1,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/16.0.1+9/bellsoft-jdk16.0.1+9-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "16.0.1+9",
|
||||||
|
"featureVersion": 16
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 9,
|
||||||
|
"updateVersion": 232,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u232/bellsoft-jdk8u232-linux-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u232+9",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 13,
|
||||||
|
"updateVersion": 10,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl":"https://download.bell-sw.com/java/17.0.10+13/bellsoft-jdk17.0.10+13-linux-amd64.tar.gz",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "17.0.10+13",
|
||||||
|
"featureVersion": 17
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,452 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"buildVersion": 36,
|
||||||
|
"updateVersion": 0,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/14+36/bellsoft-jdk14+36-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "14+36",
|
||||||
|
"featureVersion": 14
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 9,
|
||||||
|
"updateVersion": 11,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.11+9/bellsoft-jdk11.0.11+9-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.11+9",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 8,
|
||||||
|
"updateVersion": 1,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/14.0.1+8/bellsoft-jdk14.0.1+8-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "14.0.1+8",
|
||||||
|
"featureVersion": 14
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 262,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u262+10/bellsoft-jdk8u262+10-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u262+10",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 1,
|
||||||
|
"updateVersion": 275,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u275+1/bellsoft-jdk8u275+1-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u275+1",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 1,
|
||||||
|
"updateVersion": 9,
|
||||||
|
"patchVersion": 1,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.9.1+1/bellsoft-jdk11.0.9.1+1-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.9.1+1",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 8,
|
||||||
|
"updateVersion": 202,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u202/bellsoft-jdk8u202-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u202+8",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 33,
|
||||||
|
"updateVersion": 0,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/12/bellsoft-jdk12-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "12+33",
|
||||||
|
"featureVersion": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 8,
|
||||||
|
"updateVersion": 282,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u282+8/bellsoft-jdk8u282+8-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u282+8",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 11,
|
||||||
|
"updateVersion": 9,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.9+11/bellsoft-jdk11.0.9+11-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.9+11",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 33,
|
||||||
|
"updateVersion": 0,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/13/bellsoft-jdk13-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "13+33",
|
||||||
|
"featureVersion": 13
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 12,
|
||||||
|
"updateVersion": 9,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.9+12/bellsoft-jdk11.0.9+12-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.9+12",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 7,
|
||||||
|
"updateVersion": 242,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u242+7/bellsoft-jdk8u242+7-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u242+7",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 9,
|
||||||
|
"updateVersion": 2,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/13.0.2+9/bellsoft-jdk13.0.2+9-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "13.0.2+9",
|
||||||
|
"featureVersion": 13
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 9,
|
||||||
|
"updateVersion": 1,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/13.0.1/bellsoft-jdk13.0.1-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "13.0.1+9",
|
||||||
|
"featureVersion": 13
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 1,
|
||||||
|
"updateVersion": 265,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u265+1/bellsoft-jdk8u265+1-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u265+1",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 9,
|
||||||
|
"updateVersion": 1,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/15.0.1+9/bellsoft-jdk15.0.1+9-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "15.0.1+9",
|
||||||
|
"featureVersion": 15
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 272,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u272+10/bellsoft-jdk8u272+10-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u272+10",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 7,
|
||||||
|
"updateVersion": 2,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/16.0.2+7/bellsoft-jdk16.0.2+7-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "16.0.2+7",
|
||||||
|
"featureVersion": 16
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 6,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.6+10/bellsoft-jdk11.0.6+10-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.6+10",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 9,
|
||||||
|
"updateVersion": 252,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u252+9/bellsoft-jdk8u252+9-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u252+9",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 12,
|
||||||
|
"updateVersion": 212,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u212/bellsoft-jdk8u212-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u212+12",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 2,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/15.0.2+10/bellsoft-jdk15.0.2+10-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "15.0.2+10",
|
||||||
|
"featureVersion": 15
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 9,
|
||||||
|
"updateVersion": 10,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.10+9/bellsoft-jdk11.0.10+9-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.10+9",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 0,
|
||||||
|
"updateVersion": 1,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.1/bellsoft-jdk11.0.1-windows-amd64.tar.gz",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.1+0",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 7,
|
||||||
|
"updateVersion": 12,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.12+7/bellsoft-jdk11.0.12+7-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.12+7",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 36,
|
||||||
|
"updateVersion": 0,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/16+36/bellsoft-jdk16+36-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "16+36",
|
||||||
|
"featureVersion": 16
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 12,
|
||||||
|
"updateVersion": 3,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.3/bellsoft-jdk11.0.3-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.3+12",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 8,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.8+10/bellsoft-jdk11.0.8+10-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.8+10",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 7,
|
||||||
|
"updateVersion": 2,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.2/bellsoft-jdk11.0.2-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.2+7",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 5,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.5/bellsoft-jdk11.0.5-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.5+10",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 4,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.4/bellsoft-jdk11.0.4-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.4+10",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 2,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/12.0.2/bellsoft-jdk12.0.2-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "12.0.2+10",
|
||||||
|
"featureVersion": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 12,
|
||||||
|
"updateVersion": 1,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/12.0.1/bellsoft-jdk12.0.1-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "12.0.1+12",
|
||||||
|
"featureVersion": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 1,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/13.0.1+10/bellsoft-jdk13.0.1+10-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "13.0.1+10",
|
||||||
|
"featureVersion": 13
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 11,
|
||||||
|
"updateVersion": 5,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.5+11/bellsoft-jdk11.0.5+11-windows-amd64.tar.gz",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.5+11",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 11,
|
||||||
|
"updateVersion": 5,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.5+11/bellsoft-jdk11.0.5+11-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.5+11",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 292,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u292+10/bellsoft-jdk8u292+10-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u292+10",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 11,
|
||||||
|
"updateVersion": 222,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u222/bellsoft-jdk8u222-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u222+11",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 36,
|
||||||
|
"updateVersion": 0,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/15+36/bellsoft-jdk15+36-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "15+36",
|
||||||
|
"featureVersion": 15
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 7,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/11.0.7+10/bellsoft-jdk11.0.7+10-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "11.0.7+10",
|
||||||
|
"featureVersion": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 10,
|
||||||
|
"updateVersion": 232,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u232+10/bellsoft-jdk8u232+10-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u232+10",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 8,
|
||||||
|
"updateVersion": 2,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/15.0.2+8/bellsoft-jdk15.0.2+8-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "15.0.2+8",
|
||||||
|
"featureVersion": 15
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 8,
|
||||||
|
"updateVersion": 302,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u302+8/bellsoft-jdk8u302+8-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u302+8",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 12,
|
||||||
|
"updateVersion": 192,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u192.all/bellsoft-jdk1.8.0-windows-amd64.tar.gz",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u192+12",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 13,
|
||||||
|
"updateVersion": 2,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/14.0.2+13/bellsoft-jdk14.0.2+13-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "14.0.2+13",
|
||||||
|
"featureVersion": 14
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 9,
|
||||||
|
"updateVersion": 1,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/16.0.1+9/bellsoft-jdk16.0.1+9-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "16.0.1+9",
|
||||||
|
"featureVersion": 16
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 9,
|
||||||
|
"updateVersion": 232,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://github.com/bell-sw/Liberica/releases/download/8u232/bellsoft-jdk8u232-windows-amd64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "8u232+9",
|
||||||
|
"featureVersion": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 14,
|
||||||
|
"updateVersion": 2,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://download.bell-sw.com/java/21.0.2+14/bellsoft-jdk21.0.2+14-windows-aarch64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "21.0.2+14",
|
||||||
|
"featureVersion": 21
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buildVersion": 13,
|
||||||
|
"updateVersion": 10,
|
||||||
|
"patchVersion": 0,
|
||||||
|
"downloadUrl": "https://download.bell-sw.com/java/17.0.10+13/bellsoft-jdk17.0.10+13-windows-aarch64.zip",
|
||||||
|
"interimVersion": 0,
|
||||||
|
"version": "17.0.10+13",
|
||||||
|
"featureVersion": 17
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -1,4 +1,41 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "21.0.0",
|
||||||
|
"stable": true,
|
||||||
|
"release_url": "https://aka.ms/download-jdk",
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"filename": "microsoft-jdk-21.0.0-macos-x64.tar.gz",
|
||||||
|
"arch": "x64",
|
||||||
|
"platform": "darwin",
|
||||||
|
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.0-macos-x64.tar.gz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "microsoft-jdk-21.0.0-linux-x64.tar.gz",
|
||||||
|
"arch": "x64",
|
||||||
|
"platform": "linux",
|
||||||
|
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.0-linux-x64.tar.gz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "microsoft-jdk-21.0.0-windows-x64.zip",
|
||||||
|
"arch": "x64",
|
||||||
|
"platform": "win32",
|
||||||
|
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.0-windows-x64.zip"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "microsoft-jdk-21.0.0-macos-aarch64.tar.gz",
|
||||||
|
"arch": "aarch64",
|
||||||
|
"platform": "darwin",
|
||||||
|
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.0-macos-aarch64.tar.gz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "microsoft-jdk-21.0.0-linux-aarch64.tar.gz",
|
||||||
|
"arch": "aarch64",
|
||||||
|
"platform": "linux",
|
||||||
|
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.0-linux-aarch64.tar.gz"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "17.0.7",
|
"version": "17.0.7",
|
||||||
"stable": true,
|
"stable": true,
|
||||||
@@ -33,6 +70,12 @@
|
|||||||
"arch": "aarch64",
|
"arch": "aarch64",
|
||||||
"platform": "linux",
|
"platform": "linux",
|
||||||
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-linux-aarch64.tar.gz"
|
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-linux-aarch64.tar.gz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "microsoft-jdk-17.0.7-windows-aarch64.zip",
|
||||||
|
"arch": "aarch64",
|
||||||
|
"platform": "win32",
|
||||||
|
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-windows-aarch64.zip"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,254 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 10996,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu1.8.0_05-8.1.0.10-linux.tar.gz",
|
||||||
|
"name": "zulu1.8.0_05-8.1.0.10-linux.tar.gz",
|
||||||
|
"zulu_version": [8, 1, 0, 10],
|
||||||
|
"jdk_version": [8, 0, 5, 13]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10997,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu1.8.0_11-8.2.0.1-linux.tar.gz",
|
||||||
|
"name": "zulu1.8.0_11-8.2.0.1-linux.tar.gz",
|
||||||
|
"zulu_version": [8, 2, 0, 1],
|
||||||
|
"jdk_version": [8, 0, 11, 12]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10346,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu8.21.0.1-jdk8.0.131-linux_x64.tar.gz",
|
||||||
|
"name": "zulu8.21.0.1-jdk8.0.131-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [8, 21, 0, 1],
|
||||||
|
"jdk_version": [8, 0, 131, 11]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10362,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu8.23.0.3-jdk8.0.144-linux_x64.tar.gz",
|
||||||
|
"name": "zulu8.23.0.3-jdk8.0.144-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [8, 23, 0, 3],
|
||||||
|
"jdk_version": [8, 0, 144, 1]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10399,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu8.25.0.1-jdk8.0.152-linux_x64.tar.gz",
|
||||||
|
"name": "zulu8.25.0.1-jdk8.0.152-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [8, 25, 0, 1],
|
||||||
|
"jdk_version": [8, 0, 152, 16]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11355,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu8.46.0.19-ca-jdk8.0.252-linux_x64.tar.gz",
|
||||||
|
"name": "zulu8.46.0.19-ca-jdk8.0.252-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [8, 46, 0, 19],
|
||||||
|
"jdk_version": [8, 0, 252, 14]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11481,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu8.48.0.47-ca-jdk8.0.262-linux_x64.tar.gz",
|
||||||
|
"name": "zulu8.48.0.47-ca-jdk8.0.262-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [8, 48, 0, 47],
|
||||||
|
"jdk_version": [8, 0, 262, 17]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11622,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu8.48.0.51-ca-jdk8.0.262-linux_x64.tar.gz",
|
||||||
|
"name": "zulu8.48.0.51-ca-jdk8.0.262-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [8, 48, 0, 51],
|
||||||
|
"jdk_version": [8, 0, 262, 19]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11535,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu8.48.0.49-ca-jdk8.0.262-linux_x64.tar.gz",
|
||||||
|
"name": "zulu8.48.0.49-ca-jdk8.0.262-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [8, 48, 0, 49],
|
||||||
|
"jdk_version": [8, 0, 262, 18]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 12424,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu8.52.0.23-ca-jdk8.0.282-linux_x64.tar.gz",
|
||||||
|
"name": "zulu8.52.0.23-ca-jdk8.0.282-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [8, 52, 0, 23],
|
||||||
|
"jdk_version": [8, 0, 282, 8]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10383,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu9.0.0.15-jdk9.0.0-linux_x64.tar.gz",
|
||||||
|
"name": "zulu9.0.0.15-jdk9.0.0-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [9, 0, 0, 15],
|
||||||
|
"jdk_version": [9, 0, 0, 0]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10413,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu9.0.1.3-jdk9.0.1-linux_x64.tar.gz",
|
||||||
|
"name": "zulu9.0.1.3-jdk9.0.1-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [9, 0, 1, 3],
|
||||||
|
"jdk_version": [9, 0, 1, 0]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10503,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu10.2+3-jdk10.0.1-linux_x64.tar.gz",
|
||||||
|
"name": "zulu10.2+3-jdk10.0.1-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [10, 2, 3, 0],
|
||||||
|
"jdk_version": [10, 0, 1, 9]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10541,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu10.3+5-jdk10.0.2-linux_x64.tar.gz",
|
||||||
|
"name": "zulu10.3+5-jdk10.0.2-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [10, 3, 5, 0],
|
||||||
|
"jdk_version": [10, 0, 2, 13]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10576,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu11.2.3-jdk11.0.1-linux_x64.tar.gz",
|
||||||
|
"name": "zulu11.2.3-jdk11.0.1-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [11, 2, 3, 0],
|
||||||
|
"jdk_version": [11, 0, 1, 13]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10604,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu11.29.3-ca-jdk11.0.2-linux_x64.tar.gz",
|
||||||
|
"name": "zulu11.29.3-ca-jdk11.0.2-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [11, 29, 3, 0],
|
||||||
|
"jdk_version": [11, 0, 2, 7]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10687,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu11.31.11-ca-jdk11.0.3-linux_x64.tar.gz",
|
||||||
|
"name": "zulu11.31.11-ca-jdk11.0.3-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [11, 31, 11, 0],
|
||||||
|
"jdk_version": [11, 0, 3, 7]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10856,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu11.35.13-ca-jdk11.0.5-linux_x64.tar.gz",
|
||||||
|
"name": "zulu11.35.13-ca-jdk11.0.5-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [11, 35, 13, 0],
|
||||||
|
"jdk_version": [11, 0, 5, 10]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10933,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu11.35.15-ca-jdk11.0.5-linux_x64.tar.gz",
|
||||||
|
"name": "zulu11.35.15-ca-jdk11.0.5-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [11, 35, 15, 0],
|
||||||
|
"jdk_version": [11, 0, 5, 10]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10933,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu11.35.11-ca-jdk11.0.5-linux_x64.tar.gz",
|
||||||
|
"name": "zulu11.35.15-ca-jdk11.0.5-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [11, 35, 11, 0],
|
||||||
|
"jdk_version": [11, 0, 5, 10]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 12397,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-linux_x64.tar.gz",
|
||||||
|
"name": "zulu11.45.27-ca-jdk11.0.10-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [11, 45, 27, 0],
|
||||||
|
"jdk_version": [11, 0, 10, 9]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10667,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu12.1.3-ca-jdk12.0.0-linux_x64.tar.gz",
|
||||||
|
"name": "zulu12.1.3-ca-jdk12.0.0-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [12, 1, 3, 0],
|
||||||
|
"jdk_version": [12, 0, 0, 33]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10710,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu12.2.3-ca-jdk12.0.1-linux_x64.tar.gz",
|
||||||
|
"name": "zulu12.2.3-ca-jdk12.0.1-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [12, 2, 3, 0],
|
||||||
|
"jdk_version": [12, 0, 1, 12]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10780,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu12.3.11-ca-jdk12.0.2-linux_x64.tar.gz",
|
||||||
|
"name": "zulu12.3.11-ca-jdk12.0.2-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [12, 3, 11, 0],
|
||||||
|
"jdk_version": [12, 0, 2, 3]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10846,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu13.27.9-ca-jdk13.0.0-linux_x64.tar.gz",
|
||||||
|
"name": "zulu13.27.9-ca-jdk13.0.0-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [13, 27, 9, 0],
|
||||||
|
"jdk_version": [13, 0, 0, 33]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10888,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu13.28.11-ca-jdk13.0.1-linux_x64.tar.gz",
|
||||||
|
"name": "zulu13.28.11-ca-jdk13.0.1-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [13, 28, 11, 0],
|
||||||
|
"jdk_version": [13, 0, 1, 10]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11073,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu13.29.9-ca-jdk13.0.2-linux_x64.tar.gz",
|
||||||
|
"name": "zulu13.29.9-ca-jdk13.0.2-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [13, 29, 9, 0],
|
||||||
|
"jdk_version": [13, 0, 2, 6]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 12408,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu13.37.21-ca-jdk13.0.6-linux_x64.tar.gz",
|
||||||
|
"name": "zulu13.37.21-ca-jdk13.0.6-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [13, 37, 21, 0],
|
||||||
|
"jdk_version": [13, 0, 6, 5]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11236,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu14.27.1-ca-jdk14.0.0-linux_x64.tar.gz",
|
||||||
|
"name": "zulu14.27.1-ca-jdk14.0.0-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [14, 27, 1, 0],
|
||||||
|
"jdk_version": [14, 0, 0, 36]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11349,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu14.28.21-ca-jdk14.0.1-linux_x64.tar.gz",
|
||||||
|
"name": "zulu14.28.21-ca-jdk14.0.1-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [14, 28, 21, 0],
|
||||||
|
"jdk_version": [14, 0, 1, 8]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11513,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu14.29.23-ca-jdk14.0.2-linux_x64.tar.gz",
|
||||||
|
"name": "zulu14.29.23-ca-jdk14.0.2-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [14, 29, 23, 0],
|
||||||
|
"jdk_version": [14, 0, 2, 12]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11780,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-linux_x64.tar.gz",
|
||||||
|
"name": "zulu15.27.17-ca-jdk15.0.0-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [15, 27, 17, 0],
|
||||||
|
"jdk_version": [15, 0, 0, 36]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11924,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu15.28.13-ca-jdk15.0.1-linux_x64.tar.gz",
|
||||||
|
"name": "zulu15.28.13-ca-jdk15.0.1-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [15, 28, 13, 0],
|
||||||
|
"jdk_version": [15, 0, 1, 8]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 12101,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu15.28.51-ca-jdk15.0.1-linux_x64.tar.gz",
|
||||||
|
"name": "zulu15.28.51-ca-jdk15.0.1-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [15, 28, 51, 0],
|
||||||
|
"jdk_version": [15, 0, 1, 9]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 12445,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu15.29.15-ca-jdk15.0.2-linux_x64.tar.gz",
|
||||||
|
"name": "zulu15.29.15-ca-jdk15.0.2-linux_x64.tar.gz",
|
||||||
|
"zulu_version": [15, 29, 15, 0],
|
||||||
|
"jdk_version": [15, 0, 2, 7]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 12447,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu21.32.17-ca-jdk21.0.2-linux_aarch64.tar.gz",
|
||||||
|
"name": "zulu21.32.17-ca-jdk21.0.2-linux_aarch64.tar.gz",
|
||||||
|
"zulu_version": [21, 32, 17, 0],
|
||||||
|
"jdk_version": [21, 0, 2, 6]
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,254 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 10996,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu1.8.0_05-8.1.0.10-windows.tar.gz",
|
||||||
|
"name": "zulu1.8.0_05-8.1.0.10-windows.tar.gz",
|
||||||
|
"zulu_version": [8, 1, 0, 10],
|
||||||
|
"jdk_version": [8, 0, 5, 13]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10997,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu1.8.0_11-8.2.0.1-windows.tar.gz",
|
||||||
|
"name": "zulu1.8.0_11-8.2.0.1-windows.tar.gz",
|
||||||
|
"zulu_version": [8, 2, 0, 1],
|
||||||
|
"jdk_version": [8, 0, 11, 12]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10346,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu8.21.0.1-jdk8.0.131-windows_x64.tar.gz",
|
||||||
|
"name": "zulu8.21.0.1-jdk8.0.131-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [8, 21, 0, 1],
|
||||||
|
"jdk_version": [8, 0, 131, 11]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10362,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu8.23.0.3-jdk8.0.144-windows_x64.tar.gz",
|
||||||
|
"name": "zulu8.23.0.3-jdk8.0.144-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [8, 23, 0, 3],
|
||||||
|
"jdk_version": [8, 0, 144, 1]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10399,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu8.25.0.1-jdk8.0.152-windows_x64.tar.gz",
|
||||||
|
"name": "zulu8.25.0.1-jdk8.0.152-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [8, 25, 0, 1],
|
||||||
|
"jdk_version": [8, 0, 152, 16]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11355,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu8.46.0.19-ca-jdk8.0.252-windows_x64.tar.gz",
|
||||||
|
"name": "zulu8.46.0.19-ca-jdk8.0.252-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [8, 46, 0, 19],
|
||||||
|
"jdk_version": [8, 0, 252, 14]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11481,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu8.48.0.47-ca-jdk8.0.262-windows_x64.tar.gz",
|
||||||
|
"name": "zulu8.48.0.47-ca-jdk8.0.262-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [8, 48, 0, 47],
|
||||||
|
"jdk_version": [8, 0, 262, 17]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11622,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu8.48.0.51-ca-jdk8.0.262-windows_x64.tar.gz",
|
||||||
|
"name": "zulu8.48.0.51-ca-jdk8.0.262-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [8, 48, 0, 51],
|
||||||
|
"jdk_version": [8, 0, 262, 19]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11535,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu8.48.0.49-ca-jdk8.0.262-windows_x64.tar.gz",
|
||||||
|
"name": "zulu8.48.0.49-ca-jdk8.0.262-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [8, 48, 0, 49],
|
||||||
|
"jdk_version": [8, 0, 262, 18]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 12424,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu8.52.0.23-ca-jdk8.0.282-windows_x64.tar.gz",
|
||||||
|
"name": "zulu8.52.0.23-ca-jdk8.0.282-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [8, 52, 0, 23],
|
||||||
|
"jdk_version": [8, 0, 282, 8]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10383,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu9.0.0.15-jdk9.0.0-windows_x64.tar.gz",
|
||||||
|
"name": "zulu9.0.0.15-jdk9.0.0-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [9, 0, 0, 15],
|
||||||
|
"jdk_version": [9, 0, 0, 0]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10413,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu9.0.1.3-jdk9.0.1-windows_x64.tar.gz",
|
||||||
|
"name": "zulu9.0.1.3-jdk9.0.1-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [9, 0, 1, 3],
|
||||||
|
"jdk_version": [9, 0, 1, 0]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10503,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu10.2+3-jdk10.0.1-windows_x64.tar.gz",
|
||||||
|
"name": "zulu10.2+3-jdk10.0.1-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [10, 2, 3, 0],
|
||||||
|
"jdk_version": [10, 0, 1, 9]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10541,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu10.3+5-jdk10.0.2-windows_x64.tar.gz",
|
||||||
|
"name": "zulu10.3+5-jdk10.0.2-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [10, 3, 5, 0],
|
||||||
|
"jdk_version": [10, 0, 2, 13]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10576,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu11.2.3-jdk11.0.1-windows_x64.tar.gz",
|
||||||
|
"name": "zulu11.2.3-jdk11.0.1-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [11, 2, 3, 0],
|
||||||
|
"jdk_version": [11, 0, 1, 13]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10604,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu11.29.3-ca-jdk11.0.2-windows_x64.tar.gz",
|
||||||
|
"name": "zulu11.29.3-ca-jdk11.0.2-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [11, 29, 3, 0],
|
||||||
|
"jdk_version": [11, 0, 2, 7]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10687,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu11.31.11-ca-jdk11.0.3-windows_x64.tar.gz",
|
||||||
|
"name": "zulu11.31.11-ca-jdk11.0.3-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [11, 31, 11, 0],
|
||||||
|
"jdk_version": [11, 0, 3, 7]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10856,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu11.35.13-ca-jdk11.0.5-windows_x64.tar.gz",
|
||||||
|
"name": "zulu11.35.13-ca-jdk11.0.5-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [11, 35, 13, 0],
|
||||||
|
"jdk_version": [11, 0, 5, 10]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10933,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu11.35.15-ca-jdk11.0.5-windows_x64.tar.gz",
|
||||||
|
"name": "zulu11.35.15-ca-jdk11.0.5-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [11, 35, 15, 0],
|
||||||
|
"jdk_version": [11, 0, 5, 10]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10933,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu11.35.11-ca-jdk11.0.5-windows_x64.tar.gz",
|
||||||
|
"name": "zulu11.35.15-ca-jdk11.0.5-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [11, 35, 11, 0],
|
||||||
|
"jdk_version": [11, 0, 5, 10]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 12397,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-windows_x64.tar.gz",
|
||||||
|
"name": "zulu11.45.27-ca-jdk11.0.10-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [11, 45, 27, 0],
|
||||||
|
"jdk_version": [11, 0, 10, 9]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10667,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu12.1.3-ca-jdk12.0.0-windows_x64.tar.gz",
|
||||||
|
"name": "zulu12.1.3-ca-jdk12.0.0-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [12, 1, 3, 0],
|
||||||
|
"jdk_version": [12, 0, 0, 33]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10710,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu12.2.3-ca-jdk12.0.1-windows_x64.tar.gz",
|
||||||
|
"name": "zulu12.2.3-ca-jdk12.0.1-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [12, 2, 3, 0],
|
||||||
|
"jdk_version": [12, 0, 1, 12]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10780,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu12.3.11-ca-jdk12.0.2-windows_x64.tar.gz",
|
||||||
|
"name": "zulu12.3.11-ca-jdk12.0.2-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [12, 3, 11, 0],
|
||||||
|
"jdk_version": [12, 0, 2, 3]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10846,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu13.27.9-ca-jdk13.0.0-windows_x64.tar.gz",
|
||||||
|
"name": "zulu13.27.9-ca-jdk13.0.0-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [13, 27, 9, 0],
|
||||||
|
"jdk_version": [13, 0, 0, 33]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10888,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu13.28.11-ca-jdk13.0.1-windows_x64.tar.gz",
|
||||||
|
"name": "zulu13.28.11-ca-jdk13.0.1-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [13, 28, 11, 0],
|
||||||
|
"jdk_version": [13, 0, 1, 10]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11073,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu13.29.9-ca-jdk13.0.2-windows_x64.tar.gz",
|
||||||
|
"name": "zulu13.29.9-ca-jdk13.0.2-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [13, 29, 9, 0],
|
||||||
|
"jdk_version": [13, 0, 2, 6]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 12408,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu13.37.21-ca-jdk13.0.6-windows_x64.tar.gz",
|
||||||
|
"name": "zulu13.37.21-ca-jdk13.0.6-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [13, 37, 21, 0],
|
||||||
|
"jdk_version": [13, 0, 6, 5]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11236,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu14.27.1-ca-jdk14.0.0-windows_x64.tar.gz",
|
||||||
|
"name": "zulu14.27.1-ca-jdk14.0.0-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [14, 27, 1, 0],
|
||||||
|
"jdk_version": [14, 0, 0, 36]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11349,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu14.28.21-ca-jdk14.0.1-windows_x64.tar.gz",
|
||||||
|
"name": "zulu14.28.21-ca-jdk14.0.1-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [14, 28, 21, 0],
|
||||||
|
"jdk_version": [14, 0, 1, 8]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11513,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu14.29.23-ca-jdk14.0.2-windows_x64.tar.gz",
|
||||||
|
"name": "zulu14.29.23-ca-jdk14.0.2-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [14, 29, 23, 0],
|
||||||
|
"jdk_version": [14, 0, 2, 12]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11780,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-windows_x64.tar.gz",
|
||||||
|
"name": "zulu15.27.17-ca-jdk15.0.0-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [15, 27, 17, 0],
|
||||||
|
"jdk_version": [15, 0, 0, 36]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11924,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu15.28.13-ca-jdk15.0.1-windows_x64.tar.gz",
|
||||||
|
"name": "zulu15.28.13-ca-jdk15.0.1-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [15, 28, 13, 0],
|
||||||
|
"jdk_version": [15, 0, 1, 8]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 12101,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu15.28.51-ca-jdk15.0.1-windows_x64.tar.gz",
|
||||||
|
"name": "zulu15.28.51-ca-jdk15.0.1-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [15, 28, 51, 0],
|
||||||
|
"jdk_version": [15, 0, 1, 9]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 12445,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu15.29.15-ca-jdk15.0.2-windows_x64.tar.gz",
|
||||||
|
"name": "zulu15.29.15-ca-jdk15.0.2-windows_x64.tar.gz",
|
||||||
|
"zulu_version": [15, 29, 15, 0],
|
||||||
|
"jdk_version": [15, 0, 2, 7]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 12446,
|
||||||
|
"url": "https://cdn.azul.com/zulu/bin/zulu17.48.15-ca-jdk17.0.10-windows_aarch64.zip",
|
||||||
|
"name": "zulu17.48.15-ca-jdk17.0.10-win_aarhc4.zip",
|
||||||
|
"zulu_version": [17, 48, 15, 0],
|
||||||
|
"jdk_version": [17, 0, 10, 7]
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,290 @@
|
|||||||
|
import {LibericaDistributions} from '../../src/distributions/liberica/installer';
|
||||||
|
import {
|
||||||
|
ArchitectureOptions,
|
||||||
|
LibericaVersion
|
||||||
|
} from '../../src/distributions/liberica/models';
|
||||||
|
import {HttpClient} from '@actions/http-client';
|
||||||
|
import os from 'os';
|
||||||
|
|
||||||
|
import manifestData from '../data/liberica-linux.json';
|
||||||
|
|
||||||
|
describe('getAvailableVersions', () => {
|
||||||
|
let spyHttpClient: jest.SpyInstance;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
spyHttpClient = jest.spyOn(HttpClient.prototype, 'getJson');
|
||||||
|
spyHttpClient.mockReturnValue({
|
||||||
|
statusCode: 200,
|
||||||
|
headers: {},
|
||||||
|
result: manifestData as LibericaVersion[]
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
jest.resetAllMocks();
|
||||||
|
jest.clearAllMocks();
|
||||||
|
jest.restoreAllMocks();
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each([
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '11.x',
|
||||||
|
architecture: 'x86',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'bundle-type=jdk&bitness=32&arch=x86&build-type=all'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '11-ea',
|
||||||
|
architecture: 'x86',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'bundle-type=jdk&bitness=32&arch=x86&build-type=ea'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '16.0.2',
|
||||||
|
architecture: 'x64',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'bundle-type=jdk&bitness=64&arch=x86&build-type=all'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '16.0.2',
|
||||||
|
architecture: 'x64',
|
||||||
|
packageType: 'jre',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'bundle-type=jre&bitness=64&arch=x86&build-type=all'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '8',
|
||||||
|
architecture: 'armv7',
|
||||||
|
packageType: 'jdk+fx',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'bundle-type=jdk-full&bitness=32&arch=arm&build-type=all'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '8',
|
||||||
|
architecture: 'aarch64',
|
||||||
|
packageType: 'jre+fx',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'bundle-type=jre-full&bitness=64&arch=arm&build-type=all'
|
||||||
|
]
|
||||||
|
])('build correct url for %s -> %s', async (input, urlParams) => {
|
||||||
|
const additionalParams =
|
||||||
|
'&installation-type=archive&fields=downloadUrl%2Cversion%2CfeatureVersion%2CinterimVersion%2C' +
|
||||||
|
'updateVersion%2CbuildVersion';
|
||||||
|
const distribution = new LibericaDistributions(input);
|
||||||
|
distribution['getPlatformOption'] = () => 'linux';
|
||||||
|
const buildUrl = `https://api.bell-sw.com/v1/liberica/releases?os=linux&${urlParams}${additionalParams}`;
|
||||||
|
|
||||||
|
await distribution['getAvailableVersions']();
|
||||||
|
|
||||||
|
expect(spyHttpClient.mock.calls).toHaveLength(1);
|
||||||
|
expect(spyHttpClient.mock.calls[0][0]).toBe(buildUrl);
|
||||||
|
});
|
||||||
|
|
||||||
|
type DistroArch = {
|
||||||
|
bitness: string;
|
||||||
|
arch: string;
|
||||||
|
};
|
||||||
|
it.each([
|
||||||
|
['amd64', {bitness: '64', arch: 'x86'}],
|
||||||
|
['arm64', {bitness: '64', arch: 'arm'}]
|
||||||
|
])(
|
||||||
|
'defaults to os.arch(): %s mapped to distro arch: %s',
|
||||||
|
async (osArch: string, distroArch: DistroArch) => {
|
||||||
|
jest.spyOn(os, 'arch').mockReturnValue(osArch);
|
||||||
|
|
||||||
|
const distribution = new LibericaDistributions({
|
||||||
|
version: '17',
|
||||||
|
architecture: '', // to get default value
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
|
||||||
|
const additionalParams =
|
||||||
|
'&installation-type=archive&fields=downloadUrl%2Cversion%2CfeatureVersion%2CinterimVersion%2C' +
|
||||||
|
'updateVersion%2CbuildVersion';
|
||||||
|
distribution['getPlatformOption'] = () => 'linux';
|
||||||
|
|
||||||
|
const buildUrl = `https://api.bell-sw.com/v1/liberica/releases?os=linux&bundle-type=jdk&bitness=${distroArch.bitness}&arch=${distroArch.arch}&build-type=all${additionalParams}`;
|
||||||
|
|
||||||
|
await distribution['getAvailableVersions']();
|
||||||
|
|
||||||
|
expect(spyHttpClient.mock.calls).toHaveLength(1);
|
||||||
|
expect(spyHttpClient.mock.calls[0][0]).toBe(buildUrl);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
it('load available versions', async () => {
|
||||||
|
const distribution = new LibericaDistributions({
|
||||||
|
version: '11',
|
||||||
|
architecture: 'x64',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
const availableVersions = await distribution['getAvailableVersions']();
|
||||||
|
expect(availableVersions).toEqual(manifestData);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('getArchitectureOptions', () => {
|
||||||
|
it.each([
|
||||||
|
['x86', {bitness: '32', arch: 'x86'}],
|
||||||
|
['x64', {bitness: '64', arch: 'x86'}],
|
||||||
|
['armv7', {bitness: '32', arch: 'arm'}],
|
||||||
|
['aarch64', {bitness: '64', arch: 'arm'}],
|
||||||
|
['ppc64le', {bitness: '64', arch: 'ppc'}]
|
||||||
|
] as [string, ArchitectureOptions][])(
|
||||||
|
'parse architecture %s -> %s',
|
||||||
|
(input, expected) => {
|
||||||
|
const distributions = new LibericaDistributions({
|
||||||
|
architecture: input,
|
||||||
|
checkLatest: false,
|
||||||
|
packageType: '',
|
||||||
|
version: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(distributions['getArchitectureOptions']()).toEqual(expected);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
it.each(['armv6', 's390x'])('not support architecture %s', input => {
|
||||||
|
const distributions = new LibericaDistributions({
|
||||||
|
architecture: input,
|
||||||
|
checkLatest: false,
|
||||||
|
packageType: '',
|
||||||
|
version: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(() => distributions['getArchitectureOptions']()).toThrow(
|
||||||
|
/Architecture '\w+' is not supported\. Supported architectures: .*/
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('findPackageForDownload', () => {
|
||||||
|
let distribution: LibericaDistributions;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
distribution = new LibericaDistributions({
|
||||||
|
version: '',
|
||||||
|
architecture: 'x64',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
distribution['getAvailableVersions'] = async () => manifestData;
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each([
|
||||||
|
['8', '8.0.302+8'],
|
||||||
|
['11.x', '11.0.12+7'],
|
||||||
|
['8.0', '8.0.302+8'],
|
||||||
|
['11.0.x', '11.0.12+7'],
|
||||||
|
['15', '15.0.2+10'],
|
||||||
|
['15.0', '15.0.2+10'],
|
||||||
|
['15.0.0', '15.0.0+36'],
|
||||||
|
['8.0.232', '8.0.232+10'],
|
||||||
|
['8.0.232+9', '8.0.232+9'],
|
||||||
|
['15.0.2+8', '15.0.2+8'],
|
||||||
|
['15.0.2+10', '15.0.2+10']
|
||||||
|
])('version is %s -> %s', async (input, expected) => {
|
||||||
|
const result = await distribution['findPackageForDownload'](input);
|
||||||
|
expect(result.version).toBe(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should throw an error', async () => {
|
||||||
|
await expect(distribution['findPackageForDownload']('18')).rejects.toThrow(
|
||||||
|
/Could not find satisfied version for semver */
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('getPlatformOption', () => {
|
||||||
|
const distributions = new LibericaDistributions({
|
||||||
|
architecture: 'x64',
|
||||||
|
version: '11',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each([
|
||||||
|
['linux', 'linux'],
|
||||||
|
['darwin', 'macos'],
|
||||||
|
['win32', 'windows'],
|
||||||
|
['cygwin', 'windows'],
|
||||||
|
['sunos', 'solaris']
|
||||||
|
])('os version %s -> %s', (input, expected) => {
|
||||||
|
const actual = distributions['getPlatformOption'](input as NodeJS.Platform);
|
||||||
|
|
||||||
|
expect(actual).toEqual(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each(['aix', 'android', 'freebsd', 'openbsd', 'netbsd'])(
|
||||||
|
'not support os version %s',
|
||||||
|
input => {
|
||||||
|
expect(() =>
|
||||||
|
distributions['getPlatformOption'](input as NodeJS.Platform)
|
||||||
|
).toThrow(/Platform '\w+' is not supported\. Supported platforms: .+/);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('convertVersionToSemver', () => {
|
||||||
|
const distributions = new LibericaDistributions({
|
||||||
|
architecture: 'x64',
|
||||||
|
version: '11',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each([
|
||||||
|
[
|
||||||
|
{
|
||||||
|
featureVersion: 11,
|
||||||
|
interimVersion: 0,
|
||||||
|
updateVersion: 12,
|
||||||
|
buildVersion: 7
|
||||||
|
},
|
||||||
|
'11.0.12+7'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
featureVersion: 11,
|
||||||
|
interimVersion: 0,
|
||||||
|
updateVersion: 12,
|
||||||
|
buildVersion: 0
|
||||||
|
},
|
||||||
|
'11.0.12'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
featureVersion: 11,
|
||||||
|
interimVersion: 0,
|
||||||
|
updateVersion: 0,
|
||||||
|
buildVersion: 13
|
||||||
|
},
|
||||||
|
'11.0.0+13'
|
||||||
|
]
|
||||||
|
])('%s -> %s', (input, expected) => {
|
||||||
|
const actual = distributions['convertVersionToSemver']({
|
||||||
|
downloadUrl: '',
|
||||||
|
version: '',
|
||||||
|
...input
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(actual).toEqual(expected);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,290 @@
|
|||||||
|
import {LibericaDistributions} from '../../src/distributions/liberica/installer';
|
||||||
|
import {
|
||||||
|
ArchitectureOptions,
|
||||||
|
LibericaVersion
|
||||||
|
} from '../../src/distributions/liberica/models';
|
||||||
|
import {HttpClient} from '@actions/http-client';
|
||||||
|
import os from 'os';
|
||||||
|
|
||||||
|
import manifestData from '../data/liberica-windows.json';
|
||||||
|
|
||||||
|
describe('getAvailableVersions', () => {
|
||||||
|
let spyHttpClient: jest.SpyInstance;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
spyHttpClient = jest.spyOn(HttpClient.prototype, 'getJson');
|
||||||
|
spyHttpClient.mockReturnValue({
|
||||||
|
statusCode: 200,
|
||||||
|
headers: {},
|
||||||
|
result: manifestData as LibericaVersion[]
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
jest.resetAllMocks();
|
||||||
|
jest.clearAllMocks();
|
||||||
|
jest.restoreAllMocks();
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each([
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '11.x',
|
||||||
|
architecture: 'x86',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'bundle-type=jdk&bitness=32&arch=x86&build-type=all'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '11-ea',
|
||||||
|
architecture: 'x86',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'bundle-type=jdk&bitness=32&arch=x86&build-type=ea'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '16.0.2',
|
||||||
|
architecture: 'x64',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'bundle-type=jdk&bitness=64&arch=x86&build-type=all'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '16.0.2',
|
||||||
|
architecture: 'x64',
|
||||||
|
packageType: 'jre',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'bundle-type=jre&bitness=64&arch=x86&build-type=all'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '8',
|
||||||
|
architecture: 'armv7',
|
||||||
|
packageType: 'jdk+fx',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'bundle-type=jdk-full&bitness=32&arch=arm&build-type=all'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '8',
|
||||||
|
architecture: 'aarch64',
|
||||||
|
packageType: 'jre+fx',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'bundle-type=jre-full&bitness=64&arch=arm&build-type=all'
|
||||||
|
]
|
||||||
|
])('build correct url for %s -> %s', async (input, urlParams) => {
|
||||||
|
const additionalParams =
|
||||||
|
'&installation-type=archive&fields=downloadUrl%2Cversion%2CfeatureVersion%2CinterimVersion%2C' +
|
||||||
|
'updateVersion%2CbuildVersion';
|
||||||
|
const distribution = new LibericaDistributions(input);
|
||||||
|
distribution['getPlatformOption'] = () => 'windows';
|
||||||
|
const buildUrl = `https://api.bell-sw.com/v1/liberica/releases?os=windows&${urlParams}${additionalParams}`;
|
||||||
|
|
||||||
|
await distribution['getAvailableVersions']();
|
||||||
|
|
||||||
|
expect(spyHttpClient.mock.calls).toHaveLength(1);
|
||||||
|
expect(spyHttpClient.mock.calls[0][0]).toBe(buildUrl);
|
||||||
|
});
|
||||||
|
|
||||||
|
type DistroArch = {
|
||||||
|
bitness: string;
|
||||||
|
arch: string;
|
||||||
|
};
|
||||||
|
it.each([
|
||||||
|
['amd64', {bitness: '64', arch: 'x86'}],
|
||||||
|
['arm64', {bitness: '64', arch: 'arm'}]
|
||||||
|
])(
|
||||||
|
'defaults to os.arch(): %s mapped to distro arch: %s',
|
||||||
|
async (osArch: string, distroArch: DistroArch) => {
|
||||||
|
jest.spyOn(os, 'arch').mockReturnValue(osArch);
|
||||||
|
|
||||||
|
const distribution = new LibericaDistributions({
|
||||||
|
version: '17',
|
||||||
|
architecture: '', // to get default value
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
|
||||||
|
const additionalParams =
|
||||||
|
'&installation-type=archive&fields=downloadUrl%2Cversion%2CfeatureVersion%2CinterimVersion%2C' +
|
||||||
|
'updateVersion%2CbuildVersion';
|
||||||
|
distribution['getPlatformOption'] = () => 'windows';
|
||||||
|
|
||||||
|
const buildUrl = `https://api.bell-sw.com/v1/liberica/releases?os=windows&bundle-type=jdk&bitness=${distroArch.bitness}&arch=${distroArch.arch}&build-type=all${additionalParams}`;
|
||||||
|
|
||||||
|
await distribution['getAvailableVersions']();
|
||||||
|
|
||||||
|
expect(spyHttpClient.mock.calls).toHaveLength(1);
|
||||||
|
expect(spyHttpClient.mock.calls[0][0]).toBe(buildUrl);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
it('load available versions', async () => {
|
||||||
|
const distribution = new LibericaDistributions({
|
||||||
|
version: '11',
|
||||||
|
architecture: 'x64',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
const availableVersions = await distribution['getAvailableVersions']();
|
||||||
|
expect(availableVersions).toEqual(manifestData);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('getArchitectureOptions', () => {
|
||||||
|
it.each([
|
||||||
|
['x86', {bitness: '32', arch: 'x86'}],
|
||||||
|
['x64', {bitness: '64', arch: 'x86'}],
|
||||||
|
['armv7', {bitness: '32', arch: 'arm'}],
|
||||||
|
['aarch64', {bitness: '64', arch: 'arm'}],
|
||||||
|
['ppc64le', {bitness: '64', arch: 'ppc'}]
|
||||||
|
] as [string, ArchitectureOptions][])(
|
||||||
|
'parse architecture %s -> %s',
|
||||||
|
(input, expected) => {
|
||||||
|
const distributions = new LibericaDistributions({
|
||||||
|
architecture: input,
|
||||||
|
checkLatest: false,
|
||||||
|
packageType: '',
|
||||||
|
version: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(distributions['getArchitectureOptions']()).toEqual(expected);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
it.each(['armv6', 's390x'])('not support architecture %s', input => {
|
||||||
|
const distributions = new LibericaDistributions({
|
||||||
|
architecture: input,
|
||||||
|
checkLatest: false,
|
||||||
|
packageType: '',
|
||||||
|
version: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(() => distributions['getArchitectureOptions']()).toThrow(
|
||||||
|
/Architecture '\w+' is not supported\. Supported architectures: .*/
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('findPackageForDownload', () => {
|
||||||
|
let distribution: LibericaDistributions;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
distribution = new LibericaDistributions({
|
||||||
|
version: '',
|
||||||
|
architecture: 'x64',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
distribution['getAvailableVersions'] = async () => manifestData;
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each([
|
||||||
|
['8', '8.0.302+8'],
|
||||||
|
['11.x', '11.0.12+7'],
|
||||||
|
['8.0', '8.0.302+8'],
|
||||||
|
['11.0.x', '11.0.12+7'],
|
||||||
|
['15', '15.0.2+10'],
|
||||||
|
['15.0', '15.0.2+10'],
|
||||||
|
['15.0.0', '15.0.0+36'],
|
||||||
|
['8.0.232', '8.0.232+10'],
|
||||||
|
['8.0.232+9', '8.0.232+9'],
|
||||||
|
['15.0.2+8', '15.0.2+8'],
|
||||||
|
['15.0.2+10', '15.0.2+10']
|
||||||
|
])('version is %s -> %s', async (input, expected) => {
|
||||||
|
const result = await distribution['findPackageForDownload'](input);
|
||||||
|
expect(result.version).toBe(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should throw an error', async () => {
|
||||||
|
await expect(distribution['findPackageForDownload']('18')).rejects.toThrow(
|
||||||
|
/Could not find satisfied version for semver */
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('getPlatformOption', () => {
|
||||||
|
const distributions = new LibericaDistributions({
|
||||||
|
architecture: 'x64',
|
||||||
|
version: '11',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each([
|
||||||
|
['linux', 'linux'],
|
||||||
|
['darwin', 'macos'],
|
||||||
|
['win32', 'windows'],
|
||||||
|
['cygwin', 'windows'],
|
||||||
|
['sunos', 'solaris']
|
||||||
|
])('os version %s -> %s', (input, expected) => {
|
||||||
|
const actual = distributions['getPlatformOption'](input as NodeJS.Platform);
|
||||||
|
|
||||||
|
expect(actual).toEqual(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each(['aix', 'android', 'freebsd', 'openbsd', 'netbsd'])(
|
||||||
|
'not support os version %s',
|
||||||
|
input => {
|
||||||
|
expect(() =>
|
||||||
|
distributions['getPlatformOption'](input as NodeJS.Platform)
|
||||||
|
).toThrow(/Platform '\w+' is not supported\. Supported platforms: .+/);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('convertVersionToSemver', () => {
|
||||||
|
const distributions = new LibericaDistributions({
|
||||||
|
architecture: 'x64',
|
||||||
|
version: '11',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each([
|
||||||
|
[
|
||||||
|
{
|
||||||
|
featureVersion: 11,
|
||||||
|
interimVersion: 0,
|
||||||
|
updateVersion: 12,
|
||||||
|
buildVersion: 7
|
||||||
|
},
|
||||||
|
'11.0.12+7'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
featureVersion: 11,
|
||||||
|
interimVersion: 0,
|
||||||
|
updateVersion: 12,
|
||||||
|
buildVersion: 0
|
||||||
|
},
|
||||||
|
'11.0.12'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
featureVersion: 11,
|
||||||
|
interimVersion: 0,
|
||||||
|
updateVersion: 0,
|
||||||
|
buildVersion: 13
|
||||||
|
},
|
||||||
|
'11.0.0+13'
|
||||||
|
]
|
||||||
|
])('%s -> %s', (input, expected) => {
|
||||||
|
const actual = distributions['convertVersionToSemver']({
|
||||||
|
downloadUrl: '',
|
||||||
|
version: '',
|
||||||
|
...input
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(actual).toEqual(expected);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -29,6 +29,11 @@ describe('findPackageForDownload', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it.each([
|
it.each([
|
||||||
|
[
|
||||||
|
'21.x',
|
||||||
|
'21.0.0',
|
||||||
|
'https://aka.ms/download-jdk/microsoft-jdk-21.0.0-{{OS_TYPE}}-x64.{{ARCHIVE_TYPE}}'
|
||||||
|
],
|
||||||
[
|
[
|
||||||
'17.0.1',
|
'17.0.1',
|
||||||
'17.0.1+12.1',
|
'17.0.1+12.1',
|
||||||
@@ -84,6 +89,30 @@ describe('findPackageForDownload', () => {
|
|||||||
expect(result.url).toBe(url);
|
expect(result.url).toBe(url);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it.each([
|
||||||
|
['amd64', 'x64'],
|
||||||
|
['arm64', 'aarch64']
|
||||||
|
])(
|
||||||
|
'defaults to os.arch(): %s mapped to distro arch: %s',
|
||||||
|
async (osArch: string, distroArch: string) => {
|
||||||
|
jest.spyOn(os, 'arch').mockReturnValue(osArch);
|
||||||
|
jest.spyOn(os, 'platform').mockReturnValue('darwin');
|
||||||
|
|
||||||
|
const version = '17';
|
||||||
|
const distro = new MicrosoftDistributions({
|
||||||
|
version,
|
||||||
|
architecture: '', // to get default value
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
|
||||||
|
const result = await distro['findPackageForDownload'](version);
|
||||||
|
const expectedUrl = `https://aka.ms/download-jdk/microsoft-jdk-17.0.7-macos-${distroArch}.tar.gz`;
|
||||||
|
|
||||||
|
expect(result.url).toBe(expectedUrl);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
it.each([
|
it.each([
|
||||||
['amd64', 'x64'],
|
['amd64', 'x64'],
|
||||||
['arm64', 'aarch64']
|
['arm64', 'aarch64']
|
||||||
@@ -108,6 +137,30 @@ describe('findPackageForDownload', () => {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
it.each([
|
||||||
|
['amd64', 'x64'],
|
||||||
|
['arm64', 'aarch64']
|
||||||
|
])(
|
||||||
|
'defaults to os.arch(): %s mapped to distro arch: %s',
|
||||||
|
async (osArch: string, distroArch: string) => {
|
||||||
|
jest.spyOn(os, 'arch').mockReturnValue(osArch);
|
||||||
|
jest.spyOn(os, 'platform').mockReturnValue('win32');
|
||||||
|
|
||||||
|
const version = '17';
|
||||||
|
const distro = new MicrosoftDistributions({
|
||||||
|
version,
|
||||||
|
architecture: '', // to get default value
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
|
||||||
|
const result = await distro['findPackageForDownload'](version);
|
||||||
|
const expectedUrl = `https://aka.ms/download-jdk/microsoft-jdk-17.0.7-windows-${distroArch}.zip`;
|
||||||
|
|
||||||
|
expect(result.url).toBe(expectedUrl);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
it('should throw an error', async () => {
|
it('should throw an error', async () => {
|
||||||
await expect(distribution['findPackageForDownload']('8')).rejects.toThrow(
|
await expect(distribution['findPackageForDownload']('8')).rejects.toThrow(
|
||||||
/Could not find satisfied version for SemVer */
|
/Could not find satisfied version for SemVer */
|
||||||
|
|||||||
@@ -22,6 +22,11 @@ describe('findPackageForDownload', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it.each([
|
it.each([
|
||||||
|
[
|
||||||
|
'21',
|
||||||
|
'21',
|
||||||
|
'https://download.oracle.com/java/21/latest/jdk-21_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}'
|
||||||
|
],
|
||||||
[
|
[
|
||||||
'20',
|
'20',
|
||||||
'20',
|
'20',
|
||||||
|
|||||||
@@ -0,0 +1,229 @@
|
|||||||
|
import {HttpClient} from '@actions/http-client';
|
||||||
|
import * as semver from 'semver';
|
||||||
|
import {ZuluDistribution} from '../../src/distributions/zulu/installer';
|
||||||
|
import {IZuluVersions} from '../../src/distributions/zulu/models';
|
||||||
|
import * as utils from '../../src/util';
|
||||||
|
import os from 'os';
|
||||||
|
|
||||||
|
import manifestData from '../data/zulu-linux.json';
|
||||||
|
|
||||||
|
describe('getAvailableVersions', () => {
|
||||||
|
let spyHttpClient: jest.SpyInstance;
|
||||||
|
let spyUtilGetDownloadArchiveExtension: jest.SpyInstance;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
spyHttpClient = jest.spyOn(HttpClient.prototype, 'getJson');
|
||||||
|
spyHttpClient.mockReturnValue({
|
||||||
|
statusCode: 200,
|
||||||
|
headers: {},
|
||||||
|
result: manifestData as IZuluVersions[]
|
||||||
|
});
|
||||||
|
|
||||||
|
spyUtilGetDownloadArchiveExtension = jest.spyOn(
|
||||||
|
utils,
|
||||||
|
'getDownloadArchiveExtension'
|
||||||
|
);
|
||||||
|
spyUtilGetDownloadArchiveExtension.mockReturnValue('zip');
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
jest.resetAllMocks();
|
||||||
|
jest.clearAllMocks();
|
||||||
|
jest.restoreAllMocks();
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each([
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '11',
|
||||||
|
architecture: 'x86',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'?os=linux&ext=zip&bundle_type=jdk&javafx=false&arch=x86&hw_bitness=32&release_status=ga'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '11-ea',
|
||||||
|
architecture: 'x86',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'?os=linux&ext=zip&bundle_type=jdk&javafx=false&arch=x86&hw_bitness=32&release_status=ea'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '8',
|
||||||
|
architecture: 'x64',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'?os=linux&ext=zip&bundle_type=jdk&javafx=false&arch=x86&hw_bitness=64&release_status=ga'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '8',
|
||||||
|
architecture: 'x64',
|
||||||
|
packageType: 'jre',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'?os=linux&ext=zip&bundle_type=jre&javafx=false&arch=x86&hw_bitness=64&release_status=ga'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '8',
|
||||||
|
architecture: 'x64',
|
||||||
|
packageType: 'jdk+fx',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'?os=linux&ext=zip&bundle_type=jdk&javafx=true&arch=x86&hw_bitness=64&release_status=ga&features=fx'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '8',
|
||||||
|
architecture: 'x64',
|
||||||
|
packageType: 'jre+fx',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'?os=linux&ext=zip&bundle_type=jre&javafx=true&arch=x86&hw_bitness=64&release_status=ga&features=fx'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '11',
|
||||||
|
architecture: 'arm64',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'?os=linux&ext=zip&bundle_type=jdk&javafx=false&arch=arm&hw_bitness=64&release_status=ga'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '11',
|
||||||
|
architecture: 'arm',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'?os=linux&ext=zip&bundle_type=jdk&javafx=false&arch=arm&hw_bitness=&release_status=ga'
|
||||||
|
]
|
||||||
|
])('build correct url for %s -> %s', async (input, parsedUrl) => {
|
||||||
|
const distribution = new ZuluDistribution(input);
|
||||||
|
distribution['getPlatformOption'] = () => 'linux';
|
||||||
|
const buildUrl = `https://api.azul.com/zulu/download/community/v1.0/bundles/${parsedUrl}`;
|
||||||
|
|
||||||
|
await distribution['getAvailableVersions']();
|
||||||
|
|
||||||
|
expect(spyHttpClient.mock.calls).toHaveLength(1);
|
||||||
|
expect(spyHttpClient.mock.calls[0][0]).toBe(buildUrl);
|
||||||
|
});
|
||||||
|
|
||||||
|
type DistroArch = {
|
||||||
|
bitness: string;
|
||||||
|
arch: string;
|
||||||
|
};
|
||||||
|
it.each([
|
||||||
|
['amd64', {bitness: '64', arch: 'x86'}],
|
||||||
|
['arm64', {bitness: '64', arch: 'arm'}]
|
||||||
|
])(
|
||||||
|
'defaults to os.arch(): %s mapped to distro arch: %s',
|
||||||
|
async (osArch: string, distroArch: DistroArch) => {
|
||||||
|
jest.spyOn(os, 'arch').mockReturnValue(osArch);
|
||||||
|
|
||||||
|
const distribution = new ZuluDistribution({
|
||||||
|
version: '17',
|
||||||
|
architecture: '', // to get default value
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
distribution['getPlatformOption'] = () => 'linux';
|
||||||
|
const buildUrl = `https://api.azul.com/zulu/download/community/v1.0/bundles/?os=linux&ext=zip&bundle_type=jdk&javafx=false&arch=${distroArch.arch}&hw_bitness=${distroArch.bitness}&release_status=ga`;
|
||||||
|
|
||||||
|
await distribution['getAvailableVersions']();
|
||||||
|
|
||||||
|
expect(spyHttpClient.mock.calls).toHaveLength(1);
|
||||||
|
expect(spyHttpClient.mock.calls[0][0]).toBe(buildUrl);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
it('load available versions', async () => {
|
||||||
|
const distribution = new ZuluDistribution({
|
||||||
|
version: '11',
|
||||||
|
architecture: 'x86',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
const availableVersions = await distribution['getAvailableVersions']();
|
||||||
|
expect(availableVersions).toHaveLength(manifestData.length);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('getArchitectureOptions', () => {
|
||||||
|
it.each([
|
||||||
|
[{architecture: 'x64'}, {arch: 'x86', hw_bitness: '64', abi: ''}],
|
||||||
|
[{architecture: 'x86'}, {arch: 'x86', hw_bitness: '32', abi: ''}],
|
||||||
|
[{architecture: 'x32'}, {arch: 'x32', hw_bitness: '', abi: ''}],
|
||||||
|
[{architecture: 'arm'}, {arch: 'arm', hw_bitness: '', abi: ''}]
|
||||||
|
])('%s -> %s', (input, expected) => {
|
||||||
|
const distribution = new ZuluDistribution({
|
||||||
|
version: '11',
|
||||||
|
architecture: input.architecture,
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
expect(distribution['getArchitectureOptions']()).toEqual(expected);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('findPackageForDownload', () => {
|
||||||
|
it.each([
|
||||||
|
['8', '8.0.282+8'],
|
||||||
|
['11.x', '11.0.10+9'],
|
||||||
|
['8.0', '8.0.282+8'],
|
||||||
|
['11.0.x', '11.0.10+9'],
|
||||||
|
['15', '15.0.2+7'],
|
||||||
|
['9.0.0', '9.0.0+0'],
|
||||||
|
['9.0', '9.0.1+0'],
|
||||||
|
['8.0.262', '8.0.262+19'], // validate correct choice between [8.0.262.17, 8.0.262.19, 8.0.262.18]
|
||||||
|
['8.0.262+17', '8.0.262+17'],
|
||||||
|
['15.0.1+8', '15.0.1+8'],
|
||||||
|
['15.0.1+9', '15.0.1+9']
|
||||||
|
])('version is %s -> %s', async (input, expected) => {
|
||||||
|
const distribution = new ZuluDistribution({
|
||||||
|
version: input,
|
||||||
|
architecture: 'x86',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
distribution['getAvailableVersions'] = async () => manifestData;
|
||||||
|
const result = await distribution['findPackageForDownload'](
|
||||||
|
distribution['version']
|
||||||
|
);
|
||||||
|
expect(result.version).toBe(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('select correct bundle if there are multiple items with the same jdk version but different zulu versions', async () => {
|
||||||
|
const distribution = new ZuluDistribution({
|
||||||
|
version: '',
|
||||||
|
architecture: 'arm64',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
distribution['getAvailableVersions'] = async () => manifestData;
|
||||||
|
const result = await distribution['findPackageForDownload']('21.0.2');
|
||||||
|
expect(result.url).toBe(
|
||||||
|
'https://cdn.azul.com/zulu/bin/zulu21.32.17-ca-jdk21.0.2-linux_aarch64.tar.gz'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should throw an error', async () => {
|
||||||
|
const distribution = new ZuluDistribution({
|
||||||
|
version: '18',
|
||||||
|
architecture: 'x86',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
distribution['getAvailableVersions'] = async () => manifestData;
|
||||||
|
await expect(
|
||||||
|
distribution['findPackageForDownload'](distribution['version'])
|
||||||
|
).rejects.toThrow(/Could not find satisfied version for semver */);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,229 @@
|
|||||||
|
import {HttpClient} from '@actions/http-client';
|
||||||
|
import * as semver from 'semver';
|
||||||
|
import {ZuluDistribution} from '../../src/distributions/zulu/installer';
|
||||||
|
import {IZuluVersions} from '../../src/distributions/zulu/models';
|
||||||
|
import * as utils from '../../src/util';
|
||||||
|
import os from 'os';
|
||||||
|
|
||||||
|
import manifestData from '../data/zulu-windows.json';
|
||||||
|
|
||||||
|
describe('getAvailableVersions', () => {
|
||||||
|
let spyHttpClient: jest.SpyInstance;
|
||||||
|
let spyUtilGetDownloadArchiveExtension: jest.SpyInstance;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
spyHttpClient = jest.spyOn(HttpClient.prototype, 'getJson');
|
||||||
|
spyHttpClient.mockReturnValue({
|
||||||
|
statusCode: 200,
|
||||||
|
headers: {},
|
||||||
|
result: manifestData as IZuluVersions[]
|
||||||
|
});
|
||||||
|
|
||||||
|
spyUtilGetDownloadArchiveExtension = jest.spyOn(
|
||||||
|
utils,
|
||||||
|
'getDownloadArchiveExtension'
|
||||||
|
);
|
||||||
|
spyUtilGetDownloadArchiveExtension.mockReturnValue('zip');
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
jest.resetAllMocks();
|
||||||
|
jest.clearAllMocks();
|
||||||
|
jest.restoreAllMocks();
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each([
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '11',
|
||||||
|
architecture: 'x86',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'?os=windows&ext=zip&bundle_type=jdk&javafx=false&arch=x86&hw_bitness=32&release_status=ga'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '11-ea',
|
||||||
|
architecture: 'x86',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'?os=windows&ext=zip&bundle_type=jdk&javafx=false&arch=x86&hw_bitness=32&release_status=ea'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '8',
|
||||||
|
architecture: 'x64',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'?os=windows&ext=zip&bundle_type=jdk&javafx=false&arch=x86&hw_bitness=64&release_status=ga'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '8',
|
||||||
|
architecture: 'x64',
|
||||||
|
packageType: 'jre',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'?os=windows&ext=zip&bundle_type=jre&javafx=false&arch=x86&hw_bitness=64&release_status=ga'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '8',
|
||||||
|
architecture: 'x64',
|
||||||
|
packageType: 'jdk+fx',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'?os=windows&ext=zip&bundle_type=jdk&javafx=true&arch=x86&hw_bitness=64&release_status=ga&features=fx'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '8',
|
||||||
|
architecture: 'x64',
|
||||||
|
packageType: 'jre+fx',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'?os=windows&ext=zip&bundle_type=jre&javafx=true&arch=x86&hw_bitness=64&release_status=ga&features=fx'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '11',
|
||||||
|
architecture: 'arm64',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'?os=windows&ext=zip&bundle_type=jdk&javafx=false&arch=arm&hw_bitness=64&release_status=ga'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
version: '11',
|
||||||
|
architecture: 'arm',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
},
|
||||||
|
'?os=windows&ext=zip&bundle_type=jdk&javafx=false&arch=arm&hw_bitness=&release_status=ga'
|
||||||
|
]
|
||||||
|
])('build correct url for %s -> %s', async (input, parsedUrl) => {
|
||||||
|
const distribution = new ZuluDistribution(input);
|
||||||
|
distribution['getPlatformOption'] = () => 'windows';
|
||||||
|
const buildUrl = `https://api.azul.com/zulu/download/community/v1.0/bundles/${parsedUrl}`;
|
||||||
|
|
||||||
|
await distribution['getAvailableVersions']();
|
||||||
|
|
||||||
|
expect(spyHttpClient.mock.calls).toHaveLength(1);
|
||||||
|
expect(spyHttpClient.mock.calls[0][0]).toBe(buildUrl);
|
||||||
|
});
|
||||||
|
|
||||||
|
type DistroArch = {
|
||||||
|
bitness: string;
|
||||||
|
arch: string;
|
||||||
|
};
|
||||||
|
it.each([
|
||||||
|
['amd64', {bitness: '64', arch: 'x86'}],
|
||||||
|
['arm64', {bitness: '64', arch: 'arm'}]
|
||||||
|
])(
|
||||||
|
'defaults to os.arch(): %s mapped to distro arch: %s',
|
||||||
|
async (osArch: string, distroArch: DistroArch) => {
|
||||||
|
jest.spyOn(os, 'arch').mockReturnValue(osArch);
|
||||||
|
|
||||||
|
const distribution = new ZuluDistribution({
|
||||||
|
version: '17',
|
||||||
|
architecture: '', // to get default value
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
distribution['getPlatformOption'] = () => 'windows';
|
||||||
|
const buildUrl = `https://api.azul.com/zulu/download/community/v1.0/bundles/?os=windows&ext=zip&bundle_type=jdk&javafx=false&arch=${distroArch.arch}&hw_bitness=${distroArch.bitness}&release_status=ga`;
|
||||||
|
|
||||||
|
await distribution['getAvailableVersions']();
|
||||||
|
|
||||||
|
expect(spyHttpClient.mock.calls).toHaveLength(1);
|
||||||
|
expect(spyHttpClient.mock.calls[0][0]).toBe(buildUrl);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
it('load available versions', async () => {
|
||||||
|
const distribution = new ZuluDistribution({
|
||||||
|
version: '11',
|
||||||
|
architecture: 'x86',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
const availableVersions = await distribution['getAvailableVersions']();
|
||||||
|
expect(availableVersions).toHaveLength(manifestData.length);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('getArchitectureOptions', () => {
|
||||||
|
it.each([
|
||||||
|
[{architecture: 'x64'}, {arch: 'x86', hw_bitness: '64', abi: ''}],
|
||||||
|
[{architecture: 'x86'}, {arch: 'x86', hw_bitness: '32', abi: ''}],
|
||||||
|
[{architecture: 'x32'}, {arch: 'x32', hw_bitness: '', abi: ''}],
|
||||||
|
[{architecture: 'arm'}, {arch: 'arm', hw_bitness: '', abi: ''}]
|
||||||
|
])('%s -> %s', (input, expected) => {
|
||||||
|
const distribution = new ZuluDistribution({
|
||||||
|
version: '11',
|
||||||
|
architecture: input.architecture,
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
expect(distribution['getArchitectureOptions']()).toEqual(expected);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('findPackageForDownload', () => {
|
||||||
|
it.each([
|
||||||
|
['8', '8.0.282+8'],
|
||||||
|
['11.x', '11.0.10+9'],
|
||||||
|
['8.0', '8.0.282+8'],
|
||||||
|
['11.0.x', '11.0.10+9'],
|
||||||
|
['15', '15.0.2+7'],
|
||||||
|
['9.0.0', '9.0.0+0'],
|
||||||
|
['9.0', '9.0.1+0'],
|
||||||
|
['8.0.262', '8.0.262+19'], // validate correct choice between [8.0.262.17, 8.0.262.19, 8.0.262.18]
|
||||||
|
['8.0.262+17', '8.0.262+17'],
|
||||||
|
['15.0.1+8', '15.0.1+8'],
|
||||||
|
['15.0.1+9', '15.0.1+9']
|
||||||
|
])('version is %s -> %s', async (input, expected) => {
|
||||||
|
const distribution = new ZuluDistribution({
|
||||||
|
version: input,
|
||||||
|
architecture: 'x86',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
distribution['getAvailableVersions'] = async () => manifestData;
|
||||||
|
const result = await distribution['findPackageForDownload'](
|
||||||
|
distribution['version']
|
||||||
|
);
|
||||||
|
expect(result.version).toBe(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('select correct bundle if there are multiple items with the same jdk version but different zulu versions', async () => {
|
||||||
|
const distribution = new ZuluDistribution({
|
||||||
|
version: '',
|
||||||
|
architecture: 'arm64',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
distribution['getAvailableVersions'] = async () => manifestData;
|
||||||
|
const result = await distribution['findPackageForDownload']('17.0.10');
|
||||||
|
expect(result.url).toBe(
|
||||||
|
'https://cdn.azul.com/zulu/bin/zulu17.48.15-ca-jdk17.0.10-windows_aarch64.zip'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should throw an error', async () => {
|
||||||
|
const distribution = new ZuluDistribution({
|
||||||
|
version: '18',
|
||||||
|
architecture: 'x86',
|
||||||
|
packageType: 'jdk',
|
||||||
|
checkLatest: false
|
||||||
|
});
|
||||||
|
distribution['getAvailableVersions'] = async () => manifestData;
|
||||||
|
await expect(
|
||||||
|
distribution['findPackageForDownload'](distribution['version'])
|
||||||
|
).rejects.toThrow(/Could not find satisfied version for semver */);
|
||||||
|
});
|
||||||
|
});
|
||||||
+4
-1
@@ -56,6 +56,9 @@ inputs:
|
|||||||
cache:
|
cache:
|
||||||
description: 'Name of the build platform to cache dependencies. It can be "maven", "gradle" or "sbt".'
|
description: 'Name of the build platform to cache dependencies. It can be "maven", "gradle" or "sbt".'
|
||||||
required: false
|
required: false
|
||||||
|
cache-dependency-path:
|
||||||
|
description: 'The path to a dependency file: pom.xml, build.gradle, build.sbt, etc. This option can be used with the `cache` option. If this option is omitted, the action searches for the dependency file in the entire repository. This option supports wildcards and a list of file names for caching multiple dependencies.'
|
||||||
|
required: false
|
||||||
job-status:
|
job-status:
|
||||||
description: 'Workaround to pass job status to post job step. This variable is not intended for manual setting'
|
description: 'Workaround to pass job status to post job step. This variable is not intended for manual setting'
|
||||||
default: ${{ job.status }}
|
default: ${{ job.status }}
|
||||||
@@ -78,6 +81,6 @@ outputs:
|
|||||||
cache-hit:
|
cache-hit:
|
||||||
description: 'A boolean value to indicate an exact match was found for the primary key'
|
description: 'A boolean value to indicate an exact match was found for the primary key'
|
||||||
runs:
|
runs:
|
||||||
using: 'node16'
|
using: 'node20'
|
||||||
main: 'dist/setup/index.js'
|
main: 'dist/setup/index.js'
|
||||||
post: 'dist/cleanup/index.js'
|
post: 'dist/cleanup/index.js'
|
||||||
|
|||||||
Vendored
+5346
-12777
File diff suppressed because one or more lines are too long
Vendored
+9641
-16957
File diff suppressed because one or more lines are too long
+60
-53
@@ -25,13 +25,14 @@ See [action.yml](../action.yml) for more details on task inputs.
|
|||||||
Inputs `java-version` and `distribution` are mandatory and needs to be provided. See [Supported distributions](../README.md#Supported-distributions) for a list of available options.
|
Inputs `java-version` and `distribution` are mandatory and needs to be provided. See [Supported distributions](../README.md#Supported-distributions) for a list of available options.
|
||||||
|
|
||||||
### Eclipse Temurin
|
### Eclipse Temurin
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: '11'
|
java-version: '21'
|
||||||
- run: java -cp java HelloWorldApp
|
- run: java -cp java HelloWorldApp
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -40,8 +41,8 @@ steps:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'adopt-hotspot'
|
distribution: 'adopt-hotspot'
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
@@ -49,37 +50,40 @@ steps:
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Zulu
|
### Zulu
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: '11'
|
java-version: '21'
|
||||||
java-package: jdk # optional (jdk, jre, jdk+fx or jre+fx) - defaults to jdk
|
java-package: jdk # optional (jdk, jre, jdk+fx or jre+fx) - defaults to jdk
|
||||||
- run: java -cp java HelloWorldApp
|
- run: java -cp java HelloWorldApp
|
||||||
```
|
```
|
||||||
|
|
||||||
### Liberica
|
### Liberica
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'liberica'
|
distribution: 'liberica'
|
||||||
java-version: '11'
|
java-version: '21'
|
||||||
java-package: jdk # optional (jdk, jre, jdk+fx or jre+fx) - defaults to jdk
|
java-package: jdk # optional (jdk, jre, jdk+fx or jre+fx) - defaults to jdk
|
||||||
- run: java -cp java HelloWorldApp
|
- run: java -cp java HelloWorldApp
|
||||||
```
|
```
|
||||||
|
|
||||||
### Microsoft
|
### Microsoft
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'microsoft'
|
distribution: 'microsoft'
|
||||||
java-version: '11'
|
java-version: '21'
|
||||||
- run: java -cp java HelloWorldApp
|
- run: java -cp java HelloWorldApp
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -90,11 +94,11 @@ steps:
|
|||||||
To get a higher rate limit, you can [generate a personal access token on github.com](https://github.com/settings/tokens/new) and pass it as the `token` input for the action:
|
To get a higher rate limit, you can [generate a personal access token on github.com](https://github.com/settings/tokens/new) and pass it as the `token` input for the action:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GH_DOTCOM_TOKEN }}
|
token: ${{ secrets.GH_DOTCOM_TOKEN }}
|
||||||
distribution: 'microsoft'
|
distribution: 'microsoft'
|
||||||
java-version: '11'
|
java-version: '21'
|
||||||
```
|
```
|
||||||
|
|
||||||
If the runner is not able to access github.com, any Java versions requested during a workflow run must come from the runner's tool cache. See "[Setting up the tool cache on self-hosted runners without internet access](https://docs.github.com/en/enterprise-server@3.2/admin/github-actions/managing-access-to-actions-from-githubcom/setting-up-the-tool-cache-on-self-hosted-runners-without-internet-access)" for more information.
|
If the runner is not able to access github.com, any Java versions requested during a workflow run must come from the runner's tool cache. See "[Setting up the tool cache on self-hosted runners without internet access](https://docs.github.com/en/enterprise-server@3.2/admin/github-actions/managing-access-to-actions-from-githubcom/setting-up-the-tool-cache-on-self-hosted-runners-without-internet-access)" for more information.
|
||||||
@@ -104,11 +108,11 @@ If the runner is not able to access github.com, any Java versions requested duri
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'corretto'
|
distribution: 'corretto'
|
||||||
java-version: '11'
|
java-version: '21'
|
||||||
- run: java -cp java HelloWorldApp
|
- run: java -cp java HelloWorldApp
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -117,20 +121,21 @@ steps:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'oracle'
|
distribution: 'oracle'
|
||||||
java-version: '17'
|
java-version: '21'
|
||||||
- run: java -cp java HelloWorldApp
|
- run: java -cp java HelloWorldApp
|
||||||
```
|
```
|
||||||
|
|
||||||
### Alibaba Dragonwell
|
### Alibaba Dragonwell
|
||||||
**NOTE:** Alibaba Dragonwell only provides jdk.
|
**NOTE:** Alibaba Dragonwell only provides jdk.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'dragonwell'
|
distribution: 'dragonwell'
|
||||||
java-version: '8'
|
java-version: '8'
|
||||||
@@ -140,8 +145,8 @@ steps:
|
|||||||
## Installing custom Java package type
|
## Installing custom Java package type
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: '<distribution>'
|
distribution: '<distribution>'
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
@@ -154,8 +159,8 @@ steps:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: '<distribution>'
|
distribution: '<distribution>'
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
@@ -171,7 +176,7 @@ steps:
|
|||||||
- run: |
|
- 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/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_linux_hotspot_11.0.10_9.tar.gz"
|
||||||
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
|
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'jdkfile'
|
distribution: 'jdkfile'
|
||||||
jdkFile: ${{ runner.temp }}/java_package.tar.gz
|
jdkFile: ${{ runner.temp }}/java_package.tar.gz
|
||||||
@@ -188,7 +193,7 @@ If your use-case requires a custom distribution (in the example, alpine-linux is
|
|||||||
- name: fetch latest temurin JDK
|
- name: fetch latest temurin JDK
|
||||||
id: fetch_latest_jdk
|
id: fetch_latest_jdk
|
||||||
run: |
|
run: |
|
||||||
major_version={{ env.JAVA_VERSION }} # Example 8 or 11 or 17
|
major_version={{ env.JAVA_VERSION }} # Example 16 or 21 or 22
|
||||||
cd $RUNNER_TEMP
|
cd $RUNNER_TEMP
|
||||||
response=$(curl -s "https://api.github.com/repos/adoptium/temurin${major_version}-binaries/releases")
|
response=$(curl -s "https://api.github.com/repos/adoptium/temurin${major_version}-binaries/releases")
|
||||||
latest_jdk_download_url=$(echo "$response" | jq -r '.[0].assets[] | select(.name | contains("jdk_x64_alpine-linux") and endswith(".tar.gz")) | .browser_download_url')
|
latest_jdk_download_url=$(echo "$response" | jq -r '.[0].assets[] | select(.name | contains("jdk_x64_alpine-linux") and endswith(".tar.gz")) | .browser_download_url')
|
||||||
@@ -197,7 +202,7 @@ If your use-case requires a custom distribution (in the example, alpine-linux is
|
|||||||
latest_semver_version=$(curl -sL $latest_jdk_json_url | jq -r 'version.semver')
|
latest_semver_version=$(curl -sL $latest_jdk_json_url | jq -r 'version.semver')
|
||||||
echo "java_version=$latest_semver_version" >> "$GITHUB_OUTPUT"
|
echo "java_version=$latest_semver_version" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'jdkfile'
|
distribution: 'jdkfile'
|
||||||
jdkFile: ${{ runner.temp }}/java_package.tar.gz
|
jdkFile: ${{ runner.temp }}/java_package.tar.gz
|
||||||
@@ -218,9 +223,9 @@ jobs:
|
|||||||
java: [ '8', '11' ]
|
java: [ '8', '11' ]
|
||||||
name: Java ${{ matrix.Java }} (${{ matrix.distribution }}) sample
|
name: Java ${{ matrix.Java }} (${{ matrix.distribution }}) sample
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Setup java
|
- name: Setup java
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: ${{ matrix.distribution }}
|
distribution: ${{ matrix.distribution }}
|
||||||
java-version: ${{ matrix.java }}
|
java-version: ${{ matrix.java }}
|
||||||
@@ -238,9 +243,9 @@ jobs:
|
|||||||
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
|
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
|
||||||
name: Java ${{ matrix.Java }} (${{ matrix.os }}) sample
|
name: Java ${{ matrix.Java }} (${{ matrix.os }}) sample
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Setup java
|
- name: Setup java
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: ${{ matrix.java }}
|
java-version: ${{ matrix.java }}
|
||||||
@@ -255,9 +260,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 11
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: '<distribution>'
|
distribution: '<distribution>'
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
@@ -271,7 +276,7 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ github.token }} # GITHUB_TOKEN is the default env for the password
|
GITHUB_TOKEN: ${{ github.token }} # GITHUB_TOKEN is the default env for the password
|
||||||
|
|
||||||
- name: Set up Apache Maven Central
|
- name: Set up Apache Maven Central
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v4
|
||||||
with: # running setup-java again overwrites the settings.xml
|
with: # running setup-java again overwrites the settings.xml
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
@@ -356,6 +361,8 @@ If `gpg-private-key` input is provided, the private key will be written to a fil
|
|||||||
|
|
||||||
See the help docs on [Publishing a Package](https://help.github.com/en/github/managing-packages-with-github-packages/configuring-apache-maven-for-use-with-github-packages#publishing-a-package) for more information on the `pom.xml` file.
|
See the help docs on [Publishing a Package](https://help.github.com/en/github/managing-packages-with-github-packages/configuring-apache-maven-for-use-with-github-packages#publishing-a-package) for more information on the `pom.xml` file.
|
||||||
|
|
||||||
|
***NOTE***: If the error that states, `gpg: Sorry, no terminal at all requested - can't get input` [is encountered](https://github.com/actions/setup-java/issues/554), please update the version of `maven-gpg-plugin` to 1.6 or higher.
|
||||||
|
|
||||||
## Apache Maven with a settings path
|
## Apache Maven with a settings path
|
||||||
|
|
||||||
When using an Actions self-hosted runner with multiple shared runners the default `$HOME` directory can be shared by a number runners at the same time which could overwrite existing settings file. Setting the `settings-path` variable allows you to choose a unique location for your settings file.
|
When using an Actions self-hosted runner with multiple shared runners the default `$HOME` directory can be shared by a number runners at the same time which could overwrite existing settings file. Setting the `settings-path` variable allows you to choose a unique location for your settings file.
|
||||||
@@ -366,9 +373,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Set up JDK 11 for Shared Runner
|
- name: Set up JDK 11 for Shared Runner
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: '<distribution>'
|
distribution: '<distribution>'
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
@@ -392,10 +399,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 11
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: '<distribution>'
|
distribution: '<distribution>'
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
@@ -429,17 +436,17 @@ Subsequent calls to `setup-java` with distinct distribution and version paramete
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: '<distribution>'
|
distribution: '<distribution>'
|
||||||
java-version: |
|
java-version: |
|
||||||
8
|
8
|
||||||
11
|
11
|
||||||
|
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: '<distribution>'
|
distribution: '<distribution>'
|
||||||
java-version: 15
|
java-version: '15'
|
||||||
```
|
```
|
||||||
|
|
||||||
The result is a Toolchain with entries for JDKs 8, 11 and 15. You can even combine this with custom JDKs of arbitrary versions:
|
The result is a Toolchain with entries for JDKs 8, 11 and 15. You can even combine this with custom JDKs of arbitrary versions:
|
||||||
@@ -448,7 +455,7 @@ The result is a Toolchain with entries for JDKs 8, 11 and 15. You can even combi
|
|||||||
- run: |
|
- run: |
|
||||||
download_url="https://example.com/java/jdk/6u45-b06/jdk-6u45-linux-x64.tar.gz"
|
download_url="https://example.com/java/jdk/6u45-b06/jdk-6u45-linux-x64.tar.gz"
|
||||||
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
|
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'jdkfile'
|
distribution: 'jdkfile'
|
||||||
jdkFile: ${{ runner.temp }}/java_package.tar.gz
|
jdkFile: ${{ runner.temp }}/java_package.tar.gz
|
||||||
@@ -456,7 +463,7 @@ The result is a Toolchain with entries for JDKs 8, 11 and 15. You can even combi
|
|||||||
architecture: x64
|
architecture: x64
|
||||||
```
|
```
|
||||||
|
|
||||||
This will generate a Toolchains entry with the following values: `version: 1.6`, `vendor: jkdfile`, `id: Oracle_1.6`.
|
This will generate a Toolchains entry with the following values: `version: 1.6`, `vendor: jdkfile`, `id: Oracle_1.6`.
|
||||||
|
|
||||||
### Modifying The Toolchain Vendor For JDKs
|
### Modifying The Toolchain Vendor For JDKs
|
||||||
Each JDK provider will receive a default `vendor` using the `distribution` input value but this can be overridden with the `mvn-toolchain-vendor` parameter as follows.
|
Each JDK provider will receive a default `vendor` using the `distribution` input value but this can be overridden with the `mvn-toolchain-vendor` parameter as follows.
|
||||||
@@ -465,7 +472,7 @@ Each JDK provider will receive a default `vendor` using the `distribution` input
|
|||||||
- run: |
|
- run: |
|
||||||
download_url="https://example.com/java/jdk/6u45-b06/jdk-6u45-linux-x64.tar.gz"
|
download_url="https://example.com/java/jdk/6u45-b06/jdk-6u45-linux-x64.tar.gz"
|
||||||
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
|
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'jdkfile'
|
distribution: 'jdkfile'
|
||||||
jdkFile: ${{ runner.temp }}/java_package.tar.gz
|
jdkFile: ${{ runner.temp }}/java_package.tar.gz
|
||||||
@@ -480,7 +487,7 @@ In case you install multiple versions of Java at once with multi-line `java-vers
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: '<distribution>'
|
distribution: '<distribution>'
|
||||||
java-version: |
|
java-version: |
|
||||||
@@ -494,8 +501,8 @@ Each JDK provider will receive a default `id` based on the combination of `distr
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
@@ -507,7 +514,7 @@ In case you install multiple versions of Java at once you can use the same synta
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: '<distribution>'
|
distribution: '<distribution>'
|
||||||
java-version: |
|
java-version: |
|
||||||
@@ -523,7 +530,7 @@ If the `java-version-file` input is specified, the action will try to extract th
|
|||||||
Action is able to recognize all variants of the version description according to [jenv](https://github.com/jenv/jenv).
|
Action is able to recognize all variants of the version description according to [jenv](https://github.com/jenv/jenv).
|
||||||
Valid entry options:
|
Valid entry options:
|
||||||
```
|
```
|
||||||
major versions: 8, 11, 16, 17
|
major versions: 8, 11, 16, 17, 21
|
||||||
more specific versions: 1.8.0.2, 17.0, 11.0, 11.0.4, 8.0.232, 8.0.282+8
|
more specific versions: 1.8.0.2, 17.0, 11.0, 11.0.4, 8.0.232, 8.0.282+8
|
||||||
early access (EA) versions: 15-ea, 15.0.0-ea, 15.0.0-ea.2, 15.0.0+2-ea
|
early access (EA) versions: 15-ea, 15.0.0-ea, 15.0.0-ea.2, 15.0.0+2-ea
|
||||||
versions with specified distribution: openjdk64-11.0.2
|
versions with specified distribution: openjdk64-11.0.2
|
||||||
|
|||||||
Generated
+1955
-6727
File diff suppressed because it is too large
Load Diff
+17
-13
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "setup-java",
|
"name": "setup-java",
|
||||||
"version": "3.4.1",
|
"version": "4.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "setup java action",
|
"description": "setup java action",
|
||||||
"main": "dist/setup/index.js",
|
"main": "dist/setup/index.js",
|
||||||
@@ -26,31 +26,35 @@
|
|||||||
"author": "GitHub",
|
"author": "GitHub",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "^4.0.3",
|
"@actions/cache": "^3.0.4",
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/exec": "^1.0.4",
|
"@actions/exec": "^1.0.4",
|
||||||
"@actions/glob": "^0.2.0",
|
"@actions/glob": "^0.4.0",
|
||||||
"@actions/http-client": "^1.0.11",
|
"@actions/http-client": "^2.2.0",
|
||||||
"@actions/io": "^1.0.2",
|
"@actions/io": "^1.0.2",
|
||||||
"@actions/tool-cache": "^1.6.1",
|
"@actions/tool-cache": "^2.0.1",
|
||||||
"semver": "^7.3.4",
|
"semver": "^7.3.4",
|
||||||
"xmlbuilder2": "^2.4.0"
|
"xmlbuilder2": "^2.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^27.0.2",
|
"@types/jest": "^29.5.9",
|
||||||
"@types/node": "^16.11.25",
|
"@types/node": "^20.9.3",
|
||||||
"@types/semver": "^7.3.4",
|
"@types/semver": "^7.3.4",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
||||||
"@typescript-eslint/parser": "^5.54.0",
|
"@typescript-eslint/parser": "^5.54.0",
|
||||||
"@vercel/ncc": "^0.33.4",
|
"@vercel/ncc": "^0.38.1",
|
||||||
"eslint": "^8.35.0",
|
"eslint": "^8.35.0",
|
||||||
"eslint-config-prettier": "^8.6.0",
|
"eslint-config-prettier": "^8.6.0",
|
||||||
"eslint-plugin-jest": "^27.2.1",
|
"eslint-plugin-jest": "^27.2.1",
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"jest": "^27.2.5",
|
"jest": "^29.7.0",
|
||||||
"jest-circus": "^27.2.5",
|
"jest-circus": "^29.7.0",
|
||||||
"prettier": "^2.8.4",
|
"prettier": "^2.8.4",
|
||||||
"ts-jest": "^27.0.5",
|
"ts-jest": "^29.1.1",
|
||||||
"typescript": "^4.2.3"
|
"typescript": "^5.3.2"
|
||||||
}
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/actions/setup-java/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/actions/setup-java#readme"
|
||||||
}
|
}
|
||||||
|
|||||||
+22
-17
@@ -83,31 +83,34 @@ function findPackageManager(id: string): PackageManager {
|
|||||||
/**
|
/**
|
||||||
* A function that generates a cache key to use.
|
* A function that generates a cache key to use.
|
||||||
* Format of the generated key will be "${{ platform }}-${{ id }}-${{ fileHash }}"".
|
* Format of the generated key will be "${{ platform }}-${{ id }}-${{ fileHash }}"".
|
||||||
* If there is no file matched to {@link PackageManager.path}, the generated key ends with a dash (-).
|
|
||||||
* @see {@link https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#matching-a-cache-key|spec of cache key}
|
* @see {@link https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#matching-a-cache-key|spec of cache key}
|
||||||
*/
|
*/
|
||||||
async function computeCacheKey(packageManager: PackageManager) {
|
async function computeCacheKey(
|
||||||
const hash = await glob.hashFiles(packageManager.pattern.join('\n'));
|
packageManager: PackageManager,
|
||||||
return `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${packageManager.id}-${hash}`;
|
cacheDependencyPath: string
|
||||||
|
) {
|
||||||
|
const pattern = cacheDependencyPath
|
||||||
|
? cacheDependencyPath.trim().split('\n')
|
||||||
|
: packageManager.pattern;
|
||||||
|
const fileHash = await glob.hashFiles(pattern.join('\n'));
|
||||||
|
if (!fileHash) {
|
||||||
|
throw new Error(
|
||||||
|
`No file in ${process.cwd()} matched to [${pattern}], make sure you have checked out the target repository`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${packageManager.id}-${fileHash}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Restore the dependency cache
|
* Restore the dependency cache
|
||||||
* @param id ID of the package manager, should be "maven" or "gradle"
|
* @param id ID of the package manager, should be "maven" or "gradle"
|
||||||
|
* @param cacheDependencyPath The path to a dependency file
|
||||||
*/
|
*/
|
||||||
export async function restore(id: string) {
|
export async function restore(id: string, cacheDependencyPath: string) {
|
||||||
const packageManager = findPackageManager(id);
|
const packageManager = findPackageManager(id);
|
||||||
const primaryKey = await computeCacheKey(packageManager);
|
const primaryKey = await computeCacheKey(packageManager, cacheDependencyPath);
|
||||||
|
|
||||||
core.debug(`primary key is ${primaryKey}`);
|
core.debug(`primary key is ${primaryKey}`);
|
||||||
core.saveState(STATE_CACHE_PRIMARY_KEY, primaryKey);
|
core.saveState(STATE_CACHE_PRIMARY_KEY, primaryKey);
|
||||||
if (primaryKey.endsWith('-')) {
|
|
||||||
throw new Error(
|
|
||||||
`No file in ${process.cwd()} matched to [${
|
|
||||||
packageManager.pattern
|
|
||||||
}], make sure you have checked out the target repository`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// No "restoreKeys" is set, to start with a clear cache after dependency update (see https://github.com/actions/setup-java/issues/269)
|
// No "restoreKeys" is set, to start with a clear cache after dependency update (see https://github.com/actions/setup-java/issues/269)
|
||||||
const matchedKey = await cache.restoreCache(packageManager.path, primaryKey);
|
const matchedKey = await cache.restoreCache(packageManager.path, primaryKey);
|
||||||
@@ -146,10 +149,12 @@ export async function save(id: string) {
|
|||||||
await cache.saveCache(packageManager.path, primaryKey);
|
await cache.saveCache(packageManager.path, primaryKey);
|
||||||
core.info(`Cache saved with the key: ${primaryKey}`);
|
core.info(`Cache saved with the key: ${primaryKey}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.name === cache.ReserveCacheError.name) {
|
const err = error as Error;
|
||||||
core.info(error.message);
|
|
||||||
|
if (err.name === cache.ReserveCacheError.name) {
|
||||||
|
core.info(err.message);
|
||||||
} else {
|
} else {
|
||||||
if (isProbablyGradleDaemonProblem(packageManager, error)) {
|
if (isProbablyGradleDaemonProblem(packageManager, err)) {
|
||||||
core.warning(
|
core.warning(
|
||||||
'Failed to save Gradle cache on Windows. If tar.exe reported "Permission denied", try to run Gradle with `--no-daemon` option. Refer to https://github.com/actions/cache/issues/454 for details.'
|
'Failed to save Gradle cache on Windows. If tar.exe reported "Permission denied", try to run Gradle with `--no-daemon` option. Refer to https://github.com/actions/cache/issues/454 for details.'
|
||||||
);
|
);
|
||||||
|
|||||||
+3
-1
@@ -13,7 +13,9 @@ async function removePrivateKeyFromKeychain() {
|
|||||||
);
|
);
|
||||||
await gpg.deleteKey(keyFingerprint);
|
await gpg.deleteKey(keyFingerprint);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(`Failed to remove private key due to: ${error.message}`);
|
core.setFailed(
|
||||||
|
`Failed to remove private key due to: ${(error as Error).message}`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ export const INPUT_DEFAULT_GPG_PRIVATE_KEY = undefined;
|
|||||||
export const INPUT_DEFAULT_GPG_PASSPHRASE = 'GPG_PASSPHRASE';
|
export const INPUT_DEFAULT_GPG_PASSPHRASE = 'GPG_PASSPHRASE';
|
||||||
|
|
||||||
export const INPUT_CACHE = 'cache';
|
export const INPUT_CACHE = 'cache';
|
||||||
|
export const INPUT_CACHE_DEPENDENCY_PATH = 'cache-dependency-path';
|
||||||
export const INPUT_JOB_STATUS = 'job-status';
|
export const INPUT_JOB_STATUS = 'job-status';
|
||||||
|
|
||||||
export const STATE_GPG_PRIVATE_KEY_FINGERPRINT = 'gpg-private-key-fingerprint';
|
export const STATE_GPG_PRIVATE_KEY_FINGERPRINT = 'gpg-private-key-fingerprint';
|
||||||
|
|||||||
@@ -149,14 +149,9 @@ export class DragonwellDistribution extends JavaBase {
|
|||||||
|
|
||||||
// Some version of Dragonwell JDK are numerated with help of non-semver notation (more then 3 digits).
|
// Some version of Dragonwell JDK are numerated with help of non-semver notation (more then 3 digits).
|
||||||
// Common practice is to transform excess digits to the so-called semver build part, which is prefixed with the plus sign, to be able to operate with them using semver tools.
|
// Common practice is to transform excess digits to the so-called semver build part, which is prefixed with the plus sign, to be able to operate with them using semver tools.
|
||||||
const jdkVersionNums: string[] = jdkVersion
|
if (jdkVersion.split('.').length > 3) {
|
||||||
.replace('+', '.')
|
jdkVersion = convertVersionToSemver(jdkVersion);
|
||||||
.split('.');
|
}
|
||||||
jdkVersion = convertVersionToSemver(
|
|
||||||
`${jdkVersionNums.slice(0, 3).join('.')}.${
|
|
||||||
jdkVersionNums[jdkVersionNums.length - 1]
|
|
||||||
}`
|
|
||||||
);
|
|
||||||
|
|
||||||
for (const edition in archMap) {
|
for (const edition in archMap) {
|
||||||
eligibleVersions.push({
|
eligibleVersions.push({
|
||||||
@@ -211,7 +206,9 @@ export class DragonwellDistribution extends JavaBase {
|
|||||||
return fetchedDragonwellJson;
|
return fetchedDragonwellJson;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
core.debug(
|
core.debug(
|
||||||
`Fetching Dragonwell versions info from the primary link: ${primaryUrl} ended up with the error: ${err.message}`
|
`Fetching Dragonwell versions info from the primary link: ${primaryUrl} ended up with the error: ${
|
||||||
|
(err as Error).message
|
||||||
|
}`
|
||||||
);
|
);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -237,7 +234,9 @@ export class DragonwellDistribution extends JavaBase {
|
|||||||
return fetchedDragonwellJson;
|
return fetchedDragonwellJson;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
core.debug(
|
core.debug(
|
||||||
`Fetching Dragonwell versions info from the backup url: ${backupUrl} ended up with the error: ${err.message}`
|
`Fetching Dragonwell versions info from the backup url: ${backupUrl} ended up with the error: ${
|
||||||
|
(err as Error).message
|
||||||
|
}`
|
||||||
);
|
);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,10 +31,18 @@ export class LibericaDistributions extends JavaBase {
|
|||||||
core.info(
|
core.info(
|
||||||
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
|
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
|
||||||
);
|
);
|
||||||
const javaArchivePath = await tc.downloadTool(javaRelease.url);
|
let javaArchivePath = await tc.downloadTool(javaRelease.url);
|
||||||
|
|
||||||
core.info(`Extracting Java archive...`);
|
core.info(`Extracting Java archive...`);
|
||||||
const extension = getDownloadArchiveExtension();
|
const extension = getDownloadArchiveExtension();
|
||||||
|
if (
|
||||||
|
process.platform === 'win32' &&
|
||||||
|
(this.architecture === 'arm64' || this.architecture === 'aarch64')
|
||||||
|
) {
|
||||||
|
const javaArchivePathRenamed = `${javaArchivePath}.zip`;
|
||||||
|
await fs.renameSync(javaArchivePath, javaArchivePathRenamed);
|
||||||
|
javaArchivePath = javaArchivePathRenamed;
|
||||||
|
}
|
||||||
const extractedJavaPath = await extractJdkFile(javaArchivePath, extension);
|
const extractedJavaPath = await extractJdkFile(javaArchivePath, extension);
|
||||||
|
|
||||||
const archiveName = fs.readdirSync(extractedJavaPath)[0];
|
const archiveName = fs.readdirSync(extractedJavaPath)[0];
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import * as core from '@actions/core';
|
|||||||
import * as tc from '@actions/tool-cache';
|
import * as tc from '@actions/tool-cache';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import {ITypedResponse} from '@actions/http-client/interfaces';
|
import {TypedResponse} from '@actions/http-client/lib/interfaces';
|
||||||
|
|
||||||
export class MicrosoftDistributions extends JavaBase {
|
export class MicrosoftDistributions extends JavaBase {
|
||||||
constructor(installerOptions: JavaInstallerOptions) {
|
constructor(installerOptions: JavaInstallerOptions) {
|
||||||
@@ -26,7 +26,20 @@ export class MicrosoftDistributions extends JavaBase {
|
|||||||
core.info(
|
core.info(
|
||||||
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
|
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
|
||||||
);
|
);
|
||||||
const javaArchivePath = await tc.downloadTool(javaRelease.url);
|
let javaArchivePath = await tc.downloadTool(javaRelease.url);
|
||||||
|
// Rename archive to add extension because after downloading
|
||||||
|
// archive does not contain extension type and it leads to some issues
|
||||||
|
// on Windows runners without PowerShell Core.
|
||||||
|
//
|
||||||
|
// For default PowerShell Windows it should contain extension type to unpack it.
|
||||||
|
if (
|
||||||
|
process.platform === 'win32' &&
|
||||||
|
(this.architecture === 'arm64' || this.architecture === 'aarch64')
|
||||||
|
) {
|
||||||
|
const javaArchivePathRenamed = `${javaArchivePath}.zip`;
|
||||||
|
await fs.renameSync(javaArchivePath, javaArchivePathRenamed);
|
||||||
|
javaArchivePath = javaArchivePathRenamed;
|
||||||
|
}
|
||||||
|
|
||||||
core.info(`Extracting Java archive...`);
|
core.info(`Extracting Java archive...`);
|
||||||
const extension = getDownloadArchiveExtension();
|
const extension = getDownloadArchiveExtension();
|
||||||
@@ -99,7 +112,7 @@ export class MicrosoftDistributions extends JavaBase {
|
|||||||
|
|
||||||
const headers = getGitHubHttpHeaders();
|
const headers = getGitHubHttpHeaders();
|
||||||
|
|
||||||
let response: ITypedResponse<tc.IToolRelease[]> | null = null;
|
let response: TypedResponse<tc.IToolRelease[]> | null = null;
|
||||||
|
|
||||||
if (core.isDebug()) {
|
if (core.isDebug()) {
|
||||||
console.time('Retrieving available versions for Microsoft took'); // eslint-disable-line no-console
|
console.time('Retrieving available versions for Microsoft took'); // eslint-disable-line no-console
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -76,11 +76,18 @@ export class ZuluDistribution extends JavaBase {
|
|||||||
core.info(
|
core.info(
|
||||||
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
|
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
|
||||||
);
|
);
|
||||||
const javaArchivePath = await tc.downloadTool(javaRelease.url);
|
let javaArchivePath = await tc.downloadTool(javaRelease.url);
|
||||||
|
|
||||||
core.info(`Extracting Java archive...`);
|
core.info(`Extracting Java archive...`);
|
||||||
const extension = getDownloadArchiveExtension();
|
const extension = getDownloadArchiveExtension();
|
||||||
|
if (
|
||||||
|
process.platform === 'win32' &&
|
||||||
|
(this.architecture === 'arm64' || this.architecture === 'aarch64')
|
||||||
|
) {
|
||||||
|
const javaArchivePathRenamed = `${javaArchivePath}.zip`;
|
||||||
|
await fs.renameSync(javaArchivePath, javaArchivePathRenamed);
|
||||||
|
javaArchivePath = javaArchivePathRenamed;
|
||||||
|
}
|
||||||
const extractedJavaPath = await extractJdkFile(javaArchivePath, extension);
|
const extractedJavaPath = await extractJdkFile(javaArchivePath, extension);
|
||||||
|
|
||||||
const archiveName = fs.readdirSync(extractedJavaPath)[0];
|
const archiveName = fs.readdirSync(extractedJavaPath)[0];
|
||||||
|
|||||||
+5
-2
@@ -24,6 +24,9 @@ async function run() {
|
|||||||
const packageType = core.getInput(constants.INPUT_JAVA_PACKAGE);
|
const packageType = core.getInput(constants.INPUT_JAVA_PACKAGE);
|
||||||
const jdkFile = core.getInput(constants.INPUT_JDK_FILE);
|
const jdkFile = core.getInput(constants.INPUT_JDK_FILE);
|
||||||
const cache = core.getInput(constants.INPUT_CACHE);
|
const cache = core.getInput(constants.INPUT_CACHE);
|
||||||
|
const cacheDependencyPath = core.getInput(
|
||||||
|
constants.INPUT_CACHE_DEPENDENCY_PATH
|
||||||
|
);
|
||||||
const checkLatest = getBooleanInput(constants.INPUT_CHECK_LATEST, false);
|
const checkLatest = getBooleanInput(constants.INPUT_CHECK_LATEST, false);
|
||||||
let toolchainIds = core.getMultilineInput(constants.INPUT_MVN_TOOLCHAIN_ID);
|
let toolchainIds = core.getMultilineInput(constants.INPUT_MVN_TOOLCHAIN_ID);
|
||||||
|
|
||||||
@@ -73,10 +76,10 @@ async function run() {
|
|||||||
|
|
||||||
await auth.configureAuthentication();
|
await auth.configureAuthentication();
|
||||||
if (cache && isCacheFeatureAvailable()) {
|
if (cache && isCacheFeatureAvailable()) {
|
||||||
await restore(cache);
|
await restore(cache, cacheDependencyPath);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed((error as Error).message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -166,9 +166,13 @@ export function convertVersionToSemver(version: number[] | string) {
|
|||||||
export function getGitHubHttpHeaders(): OutgoingHttpHeaders {
|
export function getGitHubHttpHeaders(): OutgoingHttpHeaders {
|
||||||
const token = core.getInput('token');
|
const token = core.getInput('token');
|
||||||
const auth = !token ? undefined : `token ${token}`;
|
const auth = !token ? undefined : `token ${token}`;
|
||||||
|
|
||||||
const headers: OutgoingHttpHeaders = {
|
const headers: OutgoingHttpHeaders = {
|
||||||
authorization: auth,
|
|
||||||
accept: 'application/vnd.github.VERSION.raw'
|
accept: 'application/vnd.github.VERSION.raw'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (auth) {
|
||||||
|
headers.authorization = auth;
|
||||||
|
}
|
||||||
return headers;
|
return headers;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user