From be124b2bbefd0f5e3a150af10070f81a0529f457 Mon Sep 17 00:00:00 2001 From: jim Date: Fri, 16 Aug 2024 21:43:10 -0500 Subject: [PATCH] move to oracle-actions/setup-java --- .github/workflows/gradle.yml | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 1721d9d..f165bda 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -17,29 +17,27 @@ jobs: - uses: actions/checkout@v4 - uses: gradle/actions/wrapper-validation@v3 - - uses: actions/setup-java@v4 + - uses: oracle-actions/setup-java@v1 if: ${{ vars.GRADLE_JAVA_VERSION != vars.JAVA_VERSION }} with: - distribution: ${{ vars.JAVA_VENDOR }} - java-version: ${{ vars.GRADLE_JAVA_VERSION }} - java-package: jre - cache: 'gradle' + website: jdk.java.net + release: ${{ vars.GRADLE_JAVA_VERSION }} - - run: printf "org.gradle.java.home=%s" "$JAVA_HOME" > gradle.properties + - run: | + printf "org.gradle.java.home=%s" "$JAVA_HOME" > gradle.properties + java --version if: ${{ vars.GRADLE_JAVA_VERSION != vars.JAVA_VERSION }} - - uses: actions/setup-java@v4 + - uses: oracle-actions/setup-java@v1 with: - distribution: ${{ vars.JAVA_VENDOR }} - java-version: ${{ vars.JAVA_VERSION }} - check-latest: true + website: jdk.java.net + release: ${{ vars.JAVA_VERSION }} - run: printf "org.gradle.java.home=%s" "$JAVA_HOME" > gradle.properties if: ${{ vars.GRADLE_JAVA_VERSION == vars.JAVA_VERSION }} - - run: printf "\norg.gradle.java.installations.paths=%s" "$JAVA_HOME" >> gradle.properties - - - run: java --version - - name: Gradle Check - run: ./gradlew -PtargetJava=${{ vars.JAVA_VERSION }} check --stacktrace --no-daemon \ No newline at end of file + run: | + printf "\norg.gradle.java.installations.paths=%s" "$JAVA_HOME" >> gradle.properties + java --version + ./gradlew -PtargetJava=${{ vars.JAVA_VERSION }} check --stacktrace --no-daemon \ No newline at end of file