mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-05-04 21:58:35 +02:00
Inform Gradle where to locate pre-installed JDKs
This commit is contained in:
parent
b17d107b8c
commit
a07019c726
2 changed files with 40 additions and 0 deletions
|
@ -80,3 +80,27 @@ jobs:
|
|||
run: |
|
||||
grep -q 'Eclipse Temurin JDK 16' output.txt || (echo "::error::Did not detect setup-java installed JDK 16" && exit 1)
|
||||
grep -q 'Eclipse Temurin JDK 20' output.txt || (echo "::error::Did not detect setup-java installed JDK 20" && exit 1)
|
||||
|
||||
# Test that predefined JDK detection property is not overwritten by action
|
||||
check-no-overwrite:
|
||||
strategy:
|
||||
matrix:
|
||||
os: ${{fromJSON(inputs.runner-os)}}
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v3
|
||||
- name: Download distribution if required
|
||||
uses: ./.github/actions/download-dist
|
||||
- name: Configure java installations env var in Gradle User Home
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p ~/.gradle
|
||||
echo "org.gradle.java.installations.fromEnv=XXXXX" > ~/.gradle/gradle.properties
|
||||
- name: Setup Gradle
|
||||
uses: ./
|
||||
- name: Check gradle.properties
|
||||
shell: bash
|
||||
run: |
|
||||
cat ~/.gradle/gradle.properties
|
||||
grep -q 'org.gradle.java.installations.fromEnv=JAVA_HOME' && exit 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue