From 65ad74b4bc4f2c026c46d978e77118da9d5882a6 Mon Sep 17 00:00:00 2001 From: davotoula Date: Mon, 30 Mar 2026 08:39:54 +0200 Subject: [PATCH] Switching to cache: gradle in setup-java. The built-in caching automatically excludes lock files and handles cleanup properly. --- .github/workflows/build.yml | 44 ++++--------------------------------- 1 file changed, 4 insertions(+), 40 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 93176ac48..ab5d75d8c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,16 +26,7 @@ jobs: with: distribution: 'zulu' java-version: 21 - - - name: Cache gradle - uses: actions/cache@v5 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- + cache: gradle - name: Linter (gradle) run: ./gradlew spotlessCheck @@ -60,16 +51,7 @@ jobs: with: distribution: 'zulu' java-version: 21 - - - name: Cache gradle - uses: actions/cache@v5 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- + cache: gradle - name: Test (gradle) run: ./gradlew test --no-daemon @@ -102,16 +84,7 @@ jobs: with: distribution: 'zulu' java-version: 21 - - - name: Cache gradle - uses: actions/cache@v5 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- + cache: gradle - name: Build APK (gradle) run: ./gradlew assembleDebug @@ -181,16 +154,7 @@ jobs: with: distribution: 'zulu' java-version: 21 - - - name: Cache gradle - uses: actions/cache@v5 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- + cache: gradle - name: Build Desktop Distribution run: ./gradlew :desktopApp:${{ matrix.task }}