chore: Migrate from gradle-build-action to setup-gradle (#394)

gradle-build-action is deprecated, setup-gradle replaces it. Enable the
new support for the configuration cache.
This commit is contained in:
Nik Clayton 2024-01-30 00:08:39 +01:00 committed by GitHub
parent 741bf56f38
commit f744cbc102
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 15 additions and 13 deletions

View File

@ -30,10 +30,10 @@ jobs:
- name: Copy CI gradle.properties - name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Gradle Build Action - name: Setup Gradle
uses: gradle/gradle-build-action@v2 uses: gradle/actions/setup-gradle@v3
with: with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }} cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: ktlint - name: ktlint
run: ./gradlew clean ktlintCheck run: ./gradlew clean ktlintCheck

View File

@ -22,9 +22,10 @@ jobs:
- uses: gradle/wrapper-validation-action@v1 - uses: gradle/wrapper-validation-action@v1
- uses: gradle/gradle-build-action@v2 - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with: with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }} cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- run: chmod +x ./gradlew - run: chmod +x ./gradlew

View File

@ -30,9 +30,10 @@ jobs:
- name: Copy CI gradle.properties - name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- uses: gradle/gradle-build-action@v2 - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with: with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }} cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Run app:buildOrangeDebug - name: Run app:buildOrangeDebug
run: ./gradlew app:build${{ matrix.color }}${{ matrix.store }}Debug run: ./gradlew app:build${{ matrix.color }}${{ matrix.store }}Debug

View File

@ -22,10 +22,10 @@ jobs:
- name: Copy CI gradle.properties - name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Gradle Build Action - name: Setup Gradle
uses: gradle/gradle-build-action@v2 uses: gradle/actions/setup-gradle@v3
with: with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }} cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Build GitHub APK - name: Build GitHub APK
run: ./gradlew assembleBlueGithubRelease --stacktrace run: ./gradlew assembleBlueGithubRelease --stacktrace

View File

@ -24,10 +24,10 @@ jobs:
- name: Copy CI gradle.properties - name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Gradle Build Action - name: Setup Gradle
uses: gradle/gradle-build-action@v2 uses: gradle/actions/setup-gradle@v3
with: with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }} cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Test - name: Test
run: ./gradlew app:testOrangeGoogleReleaseUnitTest --stacktrace run: ./gradlew app:testOrangeGoogleReleaseUnitTest --stacktrace