Skip to content

Commit

Permalink
Update gradle ci version and use config-cache (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
geoff-powell authored Feb 4, 2024
1 parent 416a1b6 commit 2f0dfdc
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 17 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ jobs:
with:
java-version: '17'
distribution: 'zulu'
cache: gradle

- name: Setup gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
cache-write-only: ${{ github.event_name == 'push' }}
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- name: Build with Gradle
run: ./gradlew composeApp:assembleDebug -Pbuild-numeber=${{ needs.build-number.outputs.build-number }}
Expand All @@ -51,10 +52,13 @@ jobs:
with:
java-version: '17'
distribution: 'zulu'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
cache-write-only: ${{ github.event_name == 'push' }}
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- name: Build with Gradle
run: ./gradlew composeApp:assembleRelease -Pbuild-numeber=${{ needs.build-number.outputs.build-number }}
Expand All @@ -75,10 +79,13 @@ jobs:
with:
java-version: '17'
distribution: 'zulu'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
cache-write-only: ${{ github.event_name == 'push' }}
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- name: Build with Gradle
run: ./gradlew composeApp:testDebugUnitTest
5 changes: 3 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ jobs:
with:
java-version: '17'
distribution: 'zulu'
cache: gradle

- name: Setup gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
cache-write-only: ${{ github.event_name == 'push' }}
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- name: Build with Gradle
run: ./gradlew spotlessCheck
14 changes: 9 additions & 5 deletions .github/workflows/desktop-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ jobs:
with:
java-version: '17'
distribution: 'zulu'
cache: gradle

- name: Setup gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
cache-write-only: ${{ github.event_name == 'push' }}
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- name: Build with Gradle
run: ./gradlew composeApp:desktopJar
Expand All @@ -48,10 +49,13 @@ jobs:
with:
java-version: '17'
distribution: 'zulu'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
cache-write-only: ${{ github.event_name == 'push' }}
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- name: Setup Node
uses: actions/setup-node@v4
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,13 @@ jobs:
with:
java-version: '17'
distribution: 'zulu'
cache: gradle

- name: Setup gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
cache-write-only: ${{ github.event_name == 'push' }}
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

# Update build number with the one generated from build-number.yml
- uses: yanamura/ios-bump-version@v1
Expand Down

0 comments on commit 2f0dfdc

Please sign in to comment.