Skip to content

Commit 2af20b9

Browse files
committed
Try to use env.java-version in cache
1 parent a5ee578 commit 2af20b9

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.github/workflows/gradle.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,17 @@ jobs:
2424
uses: actions/setup-java@v1
2525
with:
2626
java-version: ${{ matrix.java }}
27-
# - name: Cache Gradle
28-
# uses: actions/cache@v2
29-
# with:
30-
# path: |
31-
# ~/.gradle/caches
32-
# ~/.gradle/wrapper
33-
# key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
34-
# restore-keys: |
35-
# ${{ runner.os }}-gradle-
27+
- name: Cache Gradle
28+
uses: actions/cache@v2
29+
env:
30+
java-version: ${{ matrix.java }}
31+
with:
32+
path: |
33+
~/.gradle/caches
34+
~/.gradle/wrapper
35+
key: ${{ runner.os }}-${{ env.java-version }}-gradle-${{ hashFiles('**/*.gradle*') }}
36+
restore-keys: |
37+
${{ runner.os }}-${{ env.java-version }}-gradle-
3638
- name: Make gradlew executable (non-Windows only)
3739
if: matrix.os != 'windows-latest'
3840
run: chmod +x ./gradlew

0 commit comments

Comments
 (0)