Optimize build cache; use Gradle 8.8

This commit is contained in:
Ricki Hirner
2024-06-27 18:22:14 +02:00
parent 18b1e5222e
commit 479a2c363a
2 changed files with 7 additions and 6 deletions

View File

@@ -18,13 +18,14 @@ jobs:
with:
distribution: temurin
java-version: 17
# See https://community.gradle.org/github-actions/docs/setup-gradle/ for more information
- uses: gradle/actions/setup-gradle@v3 # creates build cache when on main branch
with:
cache-encryption-key: ${{ secrets.gradle_encryption_key }}
gradle-home-cache-cleanup: true # clean up unused files
gradle-home-cache-excludes: |
- caches/transforms-* # transforms are very big
- run: ./gradlew --build-cache --configuration-cache --configuration-cache-problems=warn --no-daemon app:assembleDebug
- run: ./gradlew --build-cache --configuration-cache --configuration-cache-problems=warn app:assembleDebug
test:
needs: compile
@@ -42,7 +43,7 @@ jobs:
cache-read-only: true
- name: Run lint and unit tests
run: ./gradlew --build-cache --configuration-cache --configuration-cache-problems=warn --no-daemon app:check
run: ./gradlew --build-cache --configuration-cache --configuration-cache-problems=warn app:check
# generates the build caches because it uses more gradle dependencies
test_on_emulator:
@@ -73,4 +74,4 @@ jobs:
key: avd-${{ hashFiles('app/build.gradle.kts') }} # gradle-managed devices are defined there
- name: Run device tests
run: ./gradlew --build-cache --configuration-cache --configuration-cache-problems=warn --no-daemon app:virtualCheck
run: ./gradlew --build-cache --configuration-cache --configuration-cache-problems=warn app:virtualCheck

View File

@@ -1,6 +1,6 @@
#Mon Mar 04 14:10:49 CET 2024
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME