fix(android): cache the gradle distribution and dependencies
Every Android job downloads gradle-8.13-bin.zip and the whole Android plugin dependency tree from Maven Central on each run, so a Maven Central 403 fails the build before it configures anything: Could not GET '.../kotlin-stdlib-2.2.0.pom'. Received status code 403 from server: Forbidden Cache ~/.gradle/caches and ~/.gradle/wrapper, keyed on the wrapper properties and build.gradle.
This commit is contained in:
@@ -25,6 +25,15 @@ jobs:
|
|||||||
ref: ${{ github.sha }}
|
ref: ${{ github.sha }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
# Gradle distribution and the Android plugin's dependencies.
|
||||||
|
- uses: actions/cache@v5
|
||||||
|
with:
|
||||||
|
key: gradle-android-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle') }}
|
||||||
|
path: |
|
||||||
|
~/.gradle/caches
|
||||||
|
~/.gradle/wrapper
|
||||||
|
restore-keys: gradle-android-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update && sudo apt-get install glslang-tools spirv-tools librsvg2-bin gettext npm
|
sudo apt-get update && sudo apt-get install glslang-tools spirv-tools librsvg2-bin gettext npm
|
||||||
|
|||||||
@@ -196,6 +196,15 @@ jobs:
|
|||||||
${{github.workspace}}/cmake-fetch/*.tgz
|
${{github.workspace}}/cmake-fetch/*.tgz
|
||||||
restore-keys: cmake-android-
|
restore-keys: cmake-android-
|
||||||
|
|
||||||
|
# Gradle distribution and the Android plugin's dependencies.
|
||||||
|
- uses: actions/cache@v5
|
||||||
|
with:
|
||||||
|
key: gradle-android-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle') }}
|
||||||
|
path: |
|
||||||
|
~/.gradle/caches
|
||||||
|
~/.gradle/wrapper
|
||||||
|
restore-keys: gradle-android-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update && sudo apt-get install glslang-tools spirv-tools librsvg2-bin gettext
|
sudo apt-get update && sudo apt-get install glslang-tools spirv-tools librsvg2-bin gettext
|
||||||
|
|||||||
Reference in New Issue
Block a user