Skip to content

Commit cf7b6a1

Browse files
committed
Replace manual caching and wrapper-validation with setup-gradle action
1 parent b8fd4c9 commit cf7b6a1

File tree

2 files changed

+4
-22
lines changed

2 files changed

+4
-22
lines changed

.github/workflows/gradle.yml

+2-11
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,10 @@ jobs:
2626
with:
2727
java-version: '17'
2828
distribution: 'temurin'
29-
cache: gradle
30-
- name: Validate Gradle wrapper
31-
uses: gradle/wrapper-validation-action@85cde3f5a1033b2adc2442631c24b530f1183a1a
29+
- name: Setup Gradle
30+
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808
3231
- name: Build with Gradle
3332
run: ./gradlew assemble
34-
- name: Cleanup Gradle Cache
35-
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
36-
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
37-
run: |
38-
rm -f ~/.gradle/caches/modules-2/modules-2.lock
39-
rm -f ~/.gradle/caches/modules-2/gc.properties
40-
rm -fr ~/.gradle/caches/*/plugin-resolution/
41-
find ~/.gradle/caches/ -name "*.lock" -type f -delete
4233
- name: build artifact
4334
uses: actions/upload-artifact@v4
4435
with:

.github/workflows/publish-docs.yml

+2-11
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,10 @@ jobs:
2121
with:
2222
java-version: '17'
2323
distribution: 'temurin'
24-
cache: gradle
25-
- name: Validate Gradle wrapper
26-
uses: gradle/wrapper-validation-action@85cde3f5a1033b2adc2442631c24b530f1183a1a
24+
- name: Setup Gradle
25+
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808
2726
- name: Build with Gradle
2827
run: ./gradlew javadoc
29-
- name: Cleanup Gradle Cache
30-
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
31-
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
32-
run: |
33-
rm -f ~/.gradle/caches/modules-2/modules-2.lock
34-
rm -f ~/.gradle/caches/modules-2/gc.properties
35-
rm -fr ~/.gradle/caches/*/plugin-resolution/
36-
find ~/.gradle/caches/ -name "*.lock" -type f -delete
3728
- name: build artifact
3829
uses: actions/upload-artifact@v4
3930
with:

0 commit comments

Comments
 (0)