Skip to content

Commit 80b2b8c

Browse files
committed
ci: optimize Android build caching
1 parent 8b731c4 commit 80b2b8c

6 files changed

Lines changed: 15 additions & 18 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,6 @@ jobs:
4949
- name: Prepare Android environment
5050
uses: ./.github/actions/prepare-android
5151

52-
- name: Restore Android build cache
53-
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
54-
with:
55-
path: |
56-
apps/TesterIntegrated/kotlin/build
57-
apps/TesterIntegrated/kotlin/app/.cxx
58-
apps/TesterIntegrated/kotlin/app/build
59-
apps/RNApp/android/build
60-
apps/RNApp/android/app/.cxx
61-
apps/RNApp/android/app/build
62-
apps/AndroidApp/build
63-
apps/AndroidApp/app/build
64-
apps/AndroidApp/app/.cxx
65-
key: ${{ runner.os }}-android-build-road-tests-${{ github.sha }}
66-
restore-keys: |
67-
${{ runner.os }}-android-build-road-tests-
68-
6952
- name: Restore Gradle cache
7053
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
7154
with:

apps/AndroidApp/gradle.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@ kotlin.code.style=official
2020
# Enables namespacing of each library's R class so that its R class includes only the
2121
# resources declared in the library itself and none from the library's dependencies,
2222
# thereby reducing the size of the R class for that library
23-
android.nonTransitiveRClass=true
23+
android.nonTransitiveRClass=true
24+
# Enable Gradle's build cache
25+
org.gradle.caching=true

apps/RNApp/android/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ hermesEnabled=true
4242
# This allows your app to draw behind system bars for an immersive UI.
4343
# Note: Only works with ReactActivity and should not be used with custom Activity.
4444
edgeToEdgeEnabled=false
45+
46+
# Enable Gradle's build cache
47+
org.gradle.caching=true

apps/TesterIntegrated/kotlin/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ newArchEnabled=true
3131
# Use this property to enable or disable the Hermes JS engine.
3232
# If set to false, you will be using JSC instead.
3333
hermesEnabled=true
34+
35+
# Enable Gradle's build cache
36+
org.gradle.caching=true

gradle-plugins/react/brownfield/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ DESCRIPTION=Helps you generate Fat Aar for React Native Brownfield Projects
99
GITHUB_URL=https://github.com/callstack/react-native-brownfield/
1010
SCM_CONNECTION=scm:git:git://github.com/callstack/react-native-brownfield.git
1111
SCM_DEV_CONNECTION=scm:git:ssh://git@github.com:callstack/react-native-brownfield.git
12+
13+
# Enable Gradle's build cache
14+
org.gradle.caching=true

packages/react-native-brownfield/android/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ RNBrownfield_minSdkVersion=21
33
RNBrownfield_targetSdkVersion=31
44
RNBrownfield_compileSdkVersion=31
55
RNBrownfield_ndkversion=21.4.7075529
6+
7+
# Enable Gradle's build cache
8+
org.gradle.caching=true

0 commit comments

Comments
 (0)