Update Gradle Wrapper #1473
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update Gradle Wrapper | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| update-gradle-wrapper: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: 'recursive' | |
| persist-credentials: false | |
| - name: Configure JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: "temurin" | |
| java-version: "21" | |
| - name: Install Android Command Line Tools | |
| uses: android-actions/setup-android@v3 | |
| - name: Read configured NDK version | |
| run: | | |
| cargo install toml-cli | |
| ANDROID_NDK_VERSION=$(toml get gradle/libs.versions.toml versions.ndk --raw) | |
| ANDROID_NDK_MAJOR_VERSION=$(echo $ANDROID_NDK_VERSION | cut -f1 -d.) | |
| ANDROID_NDK_MINOR_VERSION=$(echo $ANDROID_NDK_VERSION | cut -f2 -d.) | |
| ANDROID_NDK_MARKETING_VERSION="r${ANDROID_NDK_MAJOR_VERSION}" | |
| if ! [ "$ANDROID_NDK_MINOR_VERSION" == "0" ]; then | |
| alphabet="abcdefghijklmnopqrstuvwxyz" | |
| ANDROID_NDK_MARKETING_MINOR_VERSION=$(echo ${alphabet:$ANDROID_NDK_MINOR_VERSION:1}) | |
| ANDROID_NDK_MARKETING_VERSION="${ANDROID_NDK_MARKETING_VERSION}${ANDROID_NDK_MARKETING_MINOR_VERSION}" | |
| fi | |
| echo "ANDROID_NDK_VERSION=$ANDROID_NDK_VERSION" >> $GITHUB_ENV | |
| echo "ANDROID_NDK_MARKETING_VERSION=$ANDROID_NDK_MARKETING_VERSION" >> $GITHUB_ENV | |
| shell: bash | |
| - name: Setup Android NDK | |
| uses: nttld/setup-ndk@v1 | |
| with: | |
| ndk-version: ${{ env.ANDROID_NDK_MARKETING_VERSION }} | |
| add-to-path: false | |
| link-to-sdk: true | |
| - name: Update Gradle Wrapper | |
| uses: gradle-update/update-gradle-wrapper-action@v2 | |
| with: | |
| repo-token: ${{ secrets.MIKEHARDY_MACHINE_ACCOUNT_PAT }} | |
| set-distribution-checksum: false |