feat(build): Add support for remote Gradle build cache (#4357)

This commit is contained in:
James Rich 2026-01-29 13:43:21 -06:00 committed by GitHub
parent 6665737c9b
commit fd3ad804fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 43 additions and 11 deletions

View file

@ -54,9 +54,7 @@ jobs:
with:
api_levels: '[35]' # Run only on API 35 for PRs
test_flavors: 'google' # Run only Google flavor for PRs (faster)
secrets:
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
secrets: inherit
# This job handles the case when no code changes are detected (docs-only PRs)
skip-notice:

View file

@ -34,6 +34,8 @@ on:
required: true
GRADLE_ENCRYPTION_KEY:
required: true
GRADLE_CACHE_URL:
required: false
concurrency:
group: ${{ github.workflow }}-${{ inputs.tag_name }}
@ -144,6 +146,7 @@ jobs:
env:
VERSION_NAME: ${{ needs.prepare-build-info.outputs.APP_VERSION_NAME }}
VERSION_CODE: ${{ needs.prepare-build-info.outputs.APP_VERSION_CODE }}
GRADLE_CACHE_URL: ${{ secrets.GRADLE_CACHE_URL }}
run: bundle exec fastlane internal
- name: Upload Google AAB artifact
@ -213,6 +216,7 @@ jobs:
env:
VERSION_NAME: ${{ needs.prepare-build-info.outputs.APP_VERSION_NAME }}
VERSION_CODE: ${{ needs.prepare-build-info.outputs.APP_VERSION_CODE }}
GRADLE_CACHE_URL: ${{ secrets.GRADLE_CACHE_URL }}
run: bundle exec fastlane fdroid_build
- name: Upload F-Droid APK artifact

View file

@ -11,6 +11,8 @@ on:
required: false
CODECOV_TOKEN:
required: false
GRADLE_CACHE_URL:
required: false
inputs:
upload_artifacts:
description: 'Whether to upload build and Detekt artifacts'
@ -30,6 +32,7 @@ jobs:
DATADOG_APPLICATION_ID: ${{ secrets.DATADOG_APPLICATION_ID }}
DATADOG_CLIENT_TOKEN: ${{ secrets.DATADOG_CLIENT_TOKEN }}
MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
GRADLE_CACHE_URL: ${{ secrets.GRADLE_CACHE_URL }}
steps:

View file

@ -23,11 +23,15 @@ on:
required: false
CODECOV_TOKEN:
required: true
GRADLE_CACHE_URL:
required: false
jobs:
androidTest:
runs-on: ubuntu-latest
timeout-minutes: 45
env:
GRADLE_CACHE_URL: ${{ secrets.GRADLE_CACHE_URL }}
strategy:
matrix:
api-level: ${{ fromJson(inputs.api_levels) }} # Use the input to define the matrix