diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51c458f2a..587ee5a08 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -132,7 +132,9 @@ jobs: path: | ~/.android/avd/gradle-managed/* ~/.android/adb* - key: ${{ runner.os }}-${{ env.cache-version }}-gmd-${{ steps.get-date.outputs.date }} + # use combination of date (to cover case where emulator or system image version changed) and + # hash of top-level build.gradle (to cover case where AGP or android API level changed) + key: ${{ runner.os }}-${{ env.cache-version }}-gmd-${{ steps.get-date.outputs.date }}-${{ hashFiles('gradle-tests/build.gradle') }} - name: 'Download local snapshot for tests' uses: actions/download-artifact@v4 with: