Skip to content

Commit 3621257

Browse files
authored
chore: use java 17 and 6G max heap on workflows (#524)
### Summary Newer versions of Android Gradle Plugin requires Java 17 to work. We were using Java 11 on workflows. Upgraded them to use Java 17. I've also noticed sometimes runners fails due to 2G max heap. I've set max heap to 6G. ### Test plan Android related CI needs to pass.
1 parent 62ef8c2 commit 3621257

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/build-templates.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ jobs:
207207
uses: actions/setup-java@v3
208208
with:
209209
distribution: 'zulu'
210-
java-version: '11'
210+
java-version: '17'
211211

212212
- name: Finalize Android SDK
213213
if: env.android_build == 1 && env.turbo_cache_hit_android != 1
@@ -226,6 +226,8 @@ jobs:
226226
${{ runner.os }}-gradle-
227227
228228
- name: Build example (Android)
229+
env:
230+
JAVA_OPTS: "-XX:MaxHeapSize=6g"
229231
if: env.android_build == 1
230232
working-directory: ${{ env.work_dir }}
231233
run: |

packages/create-react-native-library/templates/common/$.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
uses: actions/setup-java@v3
8181
with:
8282
distribution: 'zulu'
83-
java-version: '11'
83+
java-version: '17'
8484

8585
- name: Finalize Android SDK
8686
if: env.turbo_cache_hit != 1
@@ -99,6 +99,8 @@ jobs:
9999
${{ runner.os }}-gradle-
100100
101101
- name: Build example for Android
102+
env:
103+
JAVA_OPTS: "-XX:MaxHeapSize=6g"
102104
run: |
103105
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
104106

0 commit comments

Comments
 (0)