mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
refactor(build): Centralize Develocity and build cache configuration (#4382)
This commit is contained in:
parent
c39dcb4461
commit
1abcb4d4ed
7 changed files with 128 additions and 49 deletions
18
.github/workflows/release.yml
vendored
18
.github/workflows/release.yml
vendored
|
|
@ -36,6 +36,10 @@ on:
|
|||
required: true
|
||||
GRADLE_CACHE_URL:
|
||||
required: false
|
||||
GRADLE_CACHE_USERNAME:
|
||||
required: false
|
||||
GRADLE_CACHE_PASSWORD:
|
||||
required: false
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ inputs.tag_name }}
|
||||
|
|
@ -53,6 +57,10 @@ jobs:
|
|||
outputs:
|
||||
APP_VERSION_NAME: ${{ steps.get_version_name.outputs.APP_VERSION_NAME }}
|
||||
APP_VERSION_CODE: ${{ steps.calculate_version_code.outputs.versionCode }}
|
||||
env:
|
||||
GRADLE_CACHE_URL: ${{ secrets.GRADLE_CACHE_URL }}
|
||||
GRADLE_CACHE_USERNAME: ${{ secrets.GRADLE_CACHE_USERNAME }}
|
||||
GRADLE_CACHE_PASSWORD: ${{ secrets.GRADLE_CACHE_PASSWORD }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
|
|
@ -96,6 +104,10 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
needs: prepare-build-info
|
||||
environment: Release
|
||||
env:
|
||||
GRADLE_CACHE_URL: ${{ secrets.GRADLE_CACHE_URL }}
|
||||
GRADLE_CACHE_USERNAME: ${{ secrets.GRADLE_CACHE_USERNAME }}
|
||||
GRADLE_CACHE_PASSWORD: ${{ secrets.GRADLE_CACHE_PASSWORD }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
|
|
@ -146,7 +158,6 @@ 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
|
||||
|
|
@ -177,6 +188,10 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
needs: prepare-build-info
|
||||
environment: Release
|
||||
env:
|
||||
GRADLE_CACHE_URL: ${{ secrets.GRADLE_CACHE_URL }}
|
||||
GRADLE_CACHE_USERNAME: ${{ secrets.GRADLE_CACHE_USERNAME }}
|
||||
GRADLE_CACHE_PASSWORD: ${{ secrets.GRADLE_CACHE_PASSWORD }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
|
|
@ -216,7 +231,6 @@ 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
|
||||
|
|
|
|||
6
.github/workflows/reusable-android-build.yml
vendored
6
.github/workflows/reusable-android-build.yml
vendored
|
|
@ -13,6 +13,10 @@ on:
|
|||
required: false
|
||||
GRADLE_CACHE_URL:
|
||||
required: false
|
||||
GRADLE_CACHE_USERNAME:
|
||||
required: false
|
||||
GRADLE_CACHE_PASSWORD:
|
||||
required: false
|
||||
inputs:
|
||||
upload_artifacts:
|
||||
description: 'Whether to upload build and Detekt artifacts'
|
||||
|
|
@ -33,6 +37,8 @@ jobs:
|
|||
DATADOG_CLIENT_TOKEN: ${{ secrets.DATADOG_CLIENT_TOKEN }}
|
||||
MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
|
||||
GRADLE_CACHE_URL: ${{ secrets.GRADLE_CACHE_URL }}
|
||||
GRADLE_CACHE_USERNAME: ${{ secrets.GRADLE_CACHE_USERNAME }}
|
||||
GRADLE_CACHE_PASSWORD: ${{ secrets.GRADLE_CACHE_PASSWORD }}
|
||||
|
||||
steps:
|
||||
|
||||
|
|
|
|||
6
.github/workflows/reusable-android-test.yml
vendored
6
.github/workflows/reusable-android-test.yml
vendored
|
|
@ -25,6 +25,10 @@ on:
|
|||
required: true
|
||||
GRADLE_CACHE_URL:
|
||||
required: false
|
||||
GRADLE_CACHE_USERNAME:
|
||||
required: false
|
||||
GRADLE_CACHE_PASSWORD:
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
androidTest:
|
||||
|
|
@ -32,6 +36,8 @@ jobs:
|
|||
timeout-minutes: 45
|
||||
env:
|
||||
GRADLE_CACHE_URL: ${{ secrets.GRADLE_CACHE_URL }}
|
||||
GRADLE_CACHE_USERNAME: ${{ secrets.GRADLE_CACHE_USERNAME }}
|
||||
GRADLE_CACHE_PASSWORD: ${{ secrets.GRADLE_CACHE_PASSWORD }}
|
||||
strategy:
|
||||
matrix:
|
||||
api-level: ${{ fromJson(inputs.api_levels) }} # Use the input to define the matrix
|
||||
|
|
|
|||
6
.github/workflows/reusable-lint.yml
vendored
6
.github/workflows/reusable-lint.yml
vendored
|
|
@ -7,6 +7,10 @@ on:
|
|||
required: false
|
||||
GRADLE_CACHE_URL:
|
||||
required: false
|
||||
GRADLE_CACHE_USERNAME:
|
||||
required: false
|
||||
GRADLE_CACHE_PASSWORD:
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
|
|
@ -14,6 +18,8 @@ jobs:
|
|||
timeout-minutes: 10
|
||||
env:
|
||||
GRADLE_CACHE_URL: ${{ secrets.GRADLE_CACHE_URL }}
|
||||
GRADLE_CACHE_USERNAME: ${{ secrets.GRADLE_CACHE_USERNAME }}
|
||||
GRADLE_CACHE_PASSWORD: ${{ secrets.GRADLE_CACHE_PASSWORD }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue