Skip to content

Commit 039df78

Browse files
committed
Enable Gradle build cache
1 parent 0bbb0f8 commit 039df78

5 files changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/app-distribution-alpha.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121

2222
- name: Set up Gradle
2323
uses: gradle/actions/setup-gradle@v6
24+
with:
25+
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }
2426

2527
- name: Set up signing configuration
2628
uses: ./.github/actions/setup-signing

.github/workflows/app-distribution-beta.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323

2424
- name: Set up Gradle
2525
uses: gradle/actions/setup-gradle@v6
26+
with:
27+
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }
2628

2729
- name: Set up signing configuration
2830
uses: ./.github/actions/setup-signing

.github/workflows/build-docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ jobs:
9191

9292
- name: Set up Gradle
9393
uses: gradle/actions/setup-gradle@v6
94+
with:
95+
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }
9496

9597
- name: Download artifacts
9698
uses: actions/download-artifact@v8

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131

3232
- name: Set up Gradle
3333
uses: gradle/actions/setup-gradle@v6
34+
with:
35+
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }
3436

3537
- name: Set up signing configuration
3638
uses: ./.github/actions/setup-signing
@@ -106,6 +108,8 @@ jobs:
106108

107109
- name: Set up Gradle
108110
uses: gradle/actions/setup-gradle@v6
111+
with:
112+
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }
109113

110114
- name: Set up signing configuration
111115
uses: ./.github/actions/setup-signing
@@ -147,6 +151,8 @@ jobs:
147151

148152
- name: Set up Gradle
149153
uses: gradle/actions/setup-gradle@v6
154+
with:
155+
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }
150156

151157
- name: Set up signing configuration
152158
uses: ./.github/actions/setup-signing
@@ -183,6 +189,8 @@ jobs:
183189

184190
- name: Set up Gradle
185191
uses: gradle/actions/setup-gradle@v6
192+
with:
193+
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }
186194

187195
- name: Publish release to Google Play Store
188196
run: |

gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8
2222
# This option should only be used with decoupled projects. For more details, visit
2323
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
2424
org.gradle.parallel=true
25+
# Enable build cache for faster incremental builds gradle.properties +5 -2
26+
# Benefits both local development and CI/CD pipelines package-lock.json +30 -19
27+
org.gradle.caching=true
2528
# AndroidX package structure to make it clearer which packages are bundled with the
2629
# Android operating system, and which are packaged with your app's APK
2730
# https://developer.android.com/topic/libraries/support-library/androidx-rn

0 commit comments

Comments
 (0)