Don't pass -ea suffix into Gradle as the toolchain version
This commit is similar to what we had to do for Java 22-ea.
Given our actions have changed quite a bit, this commit replaces the
"java-distribution" parameter by a "java-early-access" parameter. When
set, it automatically switches the distribution to temurin as well as
applying the same handling of the Java version as in b8a6cab.
See gh-41698
This commit is contained in:
8
.github/actions/build/action.yml
vendored
8
.github/actions/build/action.yml
vendored
@@ -5,10 +5,10 @@ inputs:
|
||||
required: false
|
||||
default: '17'
|
||||
description: 'The Java version to compile and test with'
|
||||
java-distribution:
|
||||
java-early-access:
|
||||
required: false
|
||||
default: 'liberica'
|
||||
description: 'The Java distribution to use for the build'
|
||||
default: 'false'
|
||||
description: 'Whether the Java version is in early access'
|
||||
java-toolchain:
|
||||
required: false
|
||||
default: 'false'
|
||||
@@ -35,7 +35,7 @@ runs:
|
||||
with:
|
||||
develocity-access-key: ${{ inputs.develocity-access-key }}
|
||||
java-version: ${{ inputs.java-version }}
|
||||
java-distribution: ${{ inputs.java-distribution }}
|
||||
java-early-access: ${{ inputs.java-early-access }}
|
||||
java-toolchain: ${{ inputs.java-toolchain }}
|
||||
- name: Build
|
||||
id: build
|
||||
|
||||
10
.github/actions/prepare-gradle-build/action.yml
vendored
10
.github/actions/prepare-gradle-build/action.yml
vendored
@@ -5,10 +5,10 @@ inputs:
|
||||
required: false
|
||||
default: '17'
|
||||
description: 'The Java version to use for the build'
|
||||
java-distribution:
|
||||
java-early-access:
|
||||
required: false
|
||||
default: 'liberica'
|
||||
description: 'The Java distribution to use for the build'
|
||||
default: 'false'
|
||||
description: 'Whether the Java version is in early access'
|
||||
java-toolchain:
|
||||
required: false
|
||||
default: 'false'
|
||||
@@ -27,9 +27,9 @@ runs:
|
||||
- name: Set Up Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: ${{ inputs.java-distribution }}
|
||||
distribution: ${{ inputs.java-early-access == 'true' && 'temurin' || 'liberica' }}
|
||||
java-version: |
|
||||
${{ inputs.java-version }}
|
||||
${{ inputs.java-early-access == 'true' && format('{0}-ea', inputs.java-version) || inputs.java-version }}
|
||||
${{ inputs.java-toolchain == 'true' && '17' || '' }}
|
||||
- name: Set Up Gradle
|
||||
uses: gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3.5.0
|
||||
|
||||
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@@ -24,8 +24,8 @@ jobs:
|
||||
toolchain: true
|
||||
- version: 22
|
||||
toolchain: true
|
||||
- version: 23-ea
|
||||
distribution: temurin
|
||||
- version: 23
|
||||
early-access: true
|
||||
toolchain: true
|
||||
exclude:
|
||||
- os:
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
uses: ./.github/actions/build
|
||||
with:
|
||||
java-version: ${{ matrix.java.version }}
|
||||
java-distribution: ${{ matrix.java.distribution || 'liberica' }}
|
||||
java-early-access: ${{ matrix.java.early-access || 'false' }}
|
||||
java-toolchain: ${{ matrix.java.toolchain }}
|
||||
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
|
||||
- name: Send Notification
|
||||
|
||||
Reference in New Issue
Block a user