Skip to content

Commit 4e17010

Browse files
authored
Merge pull request #1772 from SimonMarquis/gradle-configuration-cache
Gradle Configuration Cache on CI
2 parents dcfb8ba + e5f1b84 commit 4e17010

File tree

6 files changed

+13
-0
lines changed

6 files changed

+13
-0
lines changed

.github/ci-gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
org.gradle.daemon=false
1818
org.gradle.parallel=true
1919
org.gradle.workers.max=2
20+
org.gradle.configuration-cache=true
21+
org.gradle.configuration-cache.parallel=true
2022

2123
kotlin.incremental=false
2224

.github/workflows/Build.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ jobs:
3737

3838
- name: Setup Gradle
3939
uses: gradle/actions/setup-gradle@v4
40+
with:
41+
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
4042

4143
- name: Check build-logic
4244
run: ./gradlew :build-logic:convention:check
@@ -186,6 +188,8 @@ jobs:
186188

187189
- name: Setup Gradle
188190
uses: gradle/actions/setup-gradle@v4
191+
with:
192+
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
189193

190194
- name: Build projects and run instrumentation tests
191195
uses: reactivecircus/android-emulator-runner@v2

.github/workflows/NightlyBaselineProfiles.yaml

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

3737
- name: Setup Gradle
3838
uses: gradle/actions/setup-gradle@v4
39+
with:
40+
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
3941

4042
- name: Setup Android SDK
4143
uses: android-actions/setup-android@v3

.github/workflows/Release.yml

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

3434
- name: Setup Gradle
3535
uses: gradle/actions/setup-gradle@v4
36+
with:
37+
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
3638

3739
- name: Setup Android SDK
3840
uses: android-actions/setup-android@v3

build-logic/gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
org.gradle.parallel=true
33
org.gradle.caching=true
44
org.gradle.configureondemand=true
5+
org.gradle.configuration-cache=true
6+
org.gradle.configuration-cache.parallel=true

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ org.gradle.caching=true
3939

4040
# Enable configuration caching between builds.
4141
org.gradle.configuration-cache=true
42+
org.gradle.configuration-cache.parallel=true
4243
# This option is set because of https://github.com/google/play-services-plugins/issues/246
4344
# to generate the Configuration Cache regardless of incompatible tasks.
4445
# See https://github.com/android/nowinandroid/issues/1022 before using it.

0 commit comments

Comments
 (0)