Skip to content

Commit

Permalink
Remove use of ASDF within build
Browse files Browse the repository at this point in the history
Not necessary, and adds complexity.
  • Loading branch information
chadlwilson committed Sep 27, 2023
1 parent d0756dd commit a670f9e
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,13 @@ jobs:
with:
fetch-depth: 0

- name: ASDF setup
uses: asdf-vm/actions/setup@v2

- name: ASDF Cache
id: asdf-cache
uses: actions/cache@v3
- uses: actions/setup-java@v3
with:
path: ${{ env.ASDF_DIR }}
key: ${{ runner.os }}-${{ hashFiles('**/.tool-versions') }}

- name: ASDF tool install
uses: asdf-vm/actions/install@v2
if: steps.asdf-cache.outputs.cache-hit != 'true'

- name: Set JAVA_HOME from ASDF
run: echo "JAVA_HOME=$(dirname $(dirname $(asdf which java)))" >> $GITHUB_ENV
distribution: temurin
java-version: 17

- name: Gradle Build, Lint, Test
uses: gradle/gradle-build-action@v2
env:
JAVA_HOME: ${{ env.JAVA_HOME }}
with:
arguments: build
gradle-home-cache-cleanup: true
Expand Down

0 comments on commit a670f9e

Please sign in to comment.