Skip to content

Commit de48d53

Browse files
authored
Create GitHub Actions Java w Gradle debug workflow on Ubuntu 20.04 for AGP 7.1.1+ resolving ReactAndroid:configureNdkBuildDebug (#276)
Full details/logs: #276 - Create bleeding edge Android debug workflow on Ubuntu - Test older AGP 4.2.2 clean and build - passing (super slowly) - Test supported AGP 7.0.4 clean and build - passing - Test current unsupported AGP 7.1.1 depending on default build-variant and preBuild tasks - failing - facebook/react-native#33586 - https://issuetracker.google.com/issues/207403732 - Test react-native#200488 - dependencies failing detecting React Native version - Remove react-native-screens until Gradle clean task resolved with current AGP 7.3.x - fdf4e57 - https://github.com/leotm/react-native-template-new-architecture/runs/6181690191?check_suite_focus=true#step:6:134 - Revert Gradle properties JVM memory - Revert Android SDK Build Tools to 31.0.0 until SDK licenses accepted - @react-native-community/datetimepicker, task :react-native-community_datetimepicker:compileDebugAidl - https://github.com/leotm/react-native-template-new-architecture/runs/6156939397?check_suite_focus=true#step:6:128 - Revert AGP 7.0.4 to 7.3.0-alpha09 - Revert Gradle 7.3.3 to 7.5 nightly - Revert NDK 24 stable to 25 rc2 - Remove debug info (npx react-native info) - Revert to cleaning once, repetitive stable and cached - Revert to building once, repetitive stable and cached - Check macOS 12.4 / 12.4 Beta / 12.4 Beta 2 - Raise mergeDexRelease issue seperately, test RN nightly and fix ReactAndroid hermes-engine dependency - #553 - #554 - Consider CI on - macos-latest / macos-11 - windows-latest / windows-2022 - self-hosted M1 - Add ANDROID_NDK_HOME and ANDROID_NDK_ROOT global and local env comments - Add E2E release APK arch/ABI comments per VM image for AVD - Add release build comments on parallelising via matrix, ccache and sccache
1 parent 9500be8 commit de48d53

15 files changed

+104
-132
lines changed

.github/workflows/gradle.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
6+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
7+
8+
name: Java CI with Gradle
9+
10+
on:
11+
push:
12+
branches: [ master ]
13+
pull_request:
14+
branches: [ master ]
15+
16+
# Global envs
17+
# env:
18+
# ANDROID_NDK_HOME: /usr/local/lib/android/sdk/ndk/x.x.x
19+
# ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk/x.x.x
20+
21+
# TODO: Avoid brutally editing/setting ndk.dir in local.properties
22+
23+
jobs:
24+
build-android:
25+
26+
runs-on: ubuntu-latest
27+
28+
# Local job envs
29+
30+
steps:
31+
32+
- uses: actions/checkout@v3
33+
34+
- name: Set up JDK 18
35+
uses: actions/[email protected]
36+
with:
37+
java-version: 18
38+
distribution: temurin
39+
40+
# (Standalone toolchains obsolete)
41+
# Ubuntu 20.04: r21e, r22, r23b, Custom: r24+
42+
- name: Set up NDK 25 Beta 2
43+
uses: nttld/[email protected]
44+
with:
45+
ndk-version: r25-beta2
46+
47+
# - name: Or manually set NDK X env vars
48+
# run: |
49+
# export ANDROID_NDK_HOME=/usr/local/lib/android/sdk/ndk/x.x.x
50+
# export ANDROID_NDK_ROOT=/usr/local/lib/android/sdk/ndk/x.x.x
51+
52+
- name: Install all project dependencies
53+
run: yarn
54+
55+
# Avoid poisoned cache problems
56+
- name: Delete Android build pre-computed outputs
57+
uses: gradle/[email protected]
58+
with:
59+
arguments: clean
60+
build-root-directory: android
61+
62+
- name: Build application Debug APK with Gradle
63+
uses: gradle/[email protected]
64+
with:
65+
arguments: assembleDebug
66+
build-root-directory: android
67+
68+
# - name: Build project Make-based (not CMake)
69+
# run: |
70+
# /usr/local/lib/android/sdk/ndk/x.x.x/ndk-build
71+
# NDK_PROJECT_PATH=null
72+
# APP_BUILD_SCRIPT=/home/runner/work/react-native-template-new-architecture/react-native-template-new-architecture/node_modules/react-native/ReactAndroid/src/main/jni/react/jni/Android.mk
73+
# NDK_APPLICATION_MK=/home/runner/work/react-native-template-new-architecture/react-native-template-new-architecture/node_modules/react-native/ReactAndroid/src/main/jni/Application.mk
74+
75+
# E2E Release APK for Detox per VM image architecture for AVD
76+
# --active-arch-only
77+
# - M1: -PreactNativeArchitectures=arm64-v8a
78+
# - Other: -PreactNativeArchitectures=x86_64
79+
80+
# Release AAB/APK with all 4 ABIs
81+
# - 1 AAB/APK, 1 upload
82+
# - Consider ccache without matrix
83+
# - Parallelise each ABI via matrix
84+
# - Upload each ABI seperately
85+
# - Consider sccache
86+
# - Bigger organisation/team
87+
# - Running more frequent builds
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import org.apache.tools.ant.taskdefs.condition.Os
44

55
buildscript {
66
ext {
7-
buildToolsVersion = "33.0.0 rc2"
7+
buildToolsVersion = "31.0.0"
88
minSdkVersion = 21
99
compileSdkVersion = 31
1010
targetSdkVersion = 31
-1.19 KB
Binary file not shown.

android/gradlew.bat

Lines changed: 0 additions & 91 deletions
This file was deleted.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
"react-native": "0.68.1",
3939
"react-native-codegen": "0.0.14",
4040
"react-native-safe-area-context": "4.2.5",
41-
"react-native-screens": "3.13.1",
4241
"react-query": "3.34.20"
4342
},
4443
"devDependencies": {

yarn.lock

Lines changed: 16 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8900,12 +8900,12 @@ __metadata:
89008900
languageName: node
89018901
linkType: hard
89028902

8903-
"bplist-parser@npm:0.3.0":
8904-
version: 0.3.0
8905-
resolution: "bplist-parser@npm:0.3.0"
8903+
"bplist-parser@npm:0.3.1":
8904+
version: 0.3.1
8905+
resolution: "bplist-parser@npm:0.3.1"
89068906
dependencies:
89078907
big-integer: 1.6.x
8908-
checksum: f1c49e4850eabda94b63a1764507cfa33c4e85f6289164964de06cb781d753cca63ccde4c2334999b6fd58ac85cab11f716a1e2fcdc31cd2213f718439c5383c
8908+
checksum: 7cabc5beadb7530f100cfdcce2b2f1d5d1674309b20f281b9b376022b2de55e86904598f1fd67254ec7f6ac1b74d67dc92c3445eb4cef5dec21c36c58d4a1106
89098909
languageName: node
89108910
linkType: hard
89118911

@@ -17562,7 +17562,6 @@ fsevents@^1.2.7:
1756217562
react-native-gradle-plugin: 0.0.6
1756317563
react-native-rename: 2.9.0
1756417564
react-native-safe-area-context: 4.2.5
17565-
react-native-screens: 3.13.1
1756617565
react-query: 3.34.20
1756717566
react-test-renderer: experimental
1756817567
reactotron-react-native: 5.0.1
@@ -18769,13 +18768,13 @@ fsevents@^1.2.7:
1876918768
languageName: node
1877018769
linkType: hard
1877118770

18772-
"plist@npm:^3.0.4":
18773-
version: 3.0.4
18774-
resolution: "plist@npm:3.0.4"
18771+
"plist@npm:^3.0.5":
18772+
version: 3.0.5
18773+
resolution: "plist@npm:3.0.5"
1877518774
dependencies:
1877618775
base64-js: ^1.5.1
1877718776
xmlbuilder: ^9.0.7
18778-
checksum: cb5883ed1b1aa227ddc5f99003750d312a8ac5cfd6f58d3ce0b24939255b175b54f25ebc6adcbd4266105ffd54f6831acb6cb06f529652bb3344215c10f5601b
18777+
checksum: f8b82816f66559965a4dabf139bd8dd95cdec7e51f32742bb353af276ea8228b9807113743b860eda3e867f6ed70d2bcbc1e135b3204d92b5c37ac765f68444e
1877918778
languageName: node
1878018779
linkType: hard
1878118780

@@ -19513,12 +19512,12 @@ fsevents@^1.2.7:
1951319512
linkType: hard
1951419513

1951519514
"react-devtools-core@npm:^4.23.0":
19516-
version: 4.23.0
19517-
resolution: "react-devtools-core@npm:4.23.0"
19515+
version: 4.24.4
19516+
resolution: "react-devtools-core@npm:4.24.4"
1951819517
dependencies:
1951919518
shell-quote: ^1.6.1
1952019519
ws: ^7
19521-
checksum: 16c020149171c18039f366f43e305fdf5ec5991a40841e0ef83d5360b41c9a52cb072f22915b35732dd767954adbd65b6baf4f7f1bbcc785d9ffeb7f42bc1bb4
19520+
checksum: 550735b87870353d6a35386907da4c20bb35a4a49d57c906e9fd776c2d348945fcc3f3d8c14a1b30a6b247980be425dc2b5bbe8f98117250e78bf183577d9ac0
1952219521
languageName: node
1952319522
linkType: hard
1952419523

@@ -19602,15 +19601,6 @@ fsevents@^1.2.7:
1960219601
languageName: node
1960319602
linkType: hard
1960419603

19605-
"react-freeze@npm:^1.0.0":
19606-
version: 1.0.0
19607-
resolution: "react-freeze@npm:1.0.0"
19608-
peerDependencies:
19609-
react: ^17.0.0
19610-
checksum: c746b9d369c77296c277626cf7dd5ff24d49657e2f16412d14f845d1b428588184c0009374119f7dec24be37ab8c134d15aa4ecd57360c874880af508dcc577b
19611-
languageName: node
19612-
linkType: hard
19613-
1961419604
"react-helmet-async@npm:^1.0.2":
1961519605
version: 1.0.9
1961619606
resolution: "react-helmet-async@npm:1.0.9"
@@ -19863,19 +19853,6 @@ fsevents@^1.2.7:
1986319853
languageName: node
1986419854
linkType: hard
1986519855

19866-
"react-native-screens@npm:3.13.1":
19867-
version: 3.13.1
19868-
resolution: "react-native-screens@npm:3.13.1"
19869-
dependencies:
19870-
react-freeze: ^1.0.0
19871-
warn-once: ^0.1.0
19872-
peerDependencies:
19873-
react: "*"
19874-
react-native: "*"
19875-
checksum: aaab7071f65ea7b3be197417e073d0cad06c80fcb2a956faaeb020322c8002963f4d14ba96550484e96d156a48a29989c1485f47ec4bcd98c9701fe8de5c7cc1
19876-
languageName: node
19877-
linkType: hard
19878-
1987919856
"react-native-swipe-gestures@npm:^1.0.5":
1988019857
version: 1.0.5
1988119858
resolution: "react-native-swipe-gestures@npm:1.0.5"
@@ -21569,13 +21546,13 @@ resolve@^2.0.0-next.3:
2156921546
linkType: hard
2157021547

2157121548
"simple-plist@npm:^1.1.0":
21572-
version: 1.3.0
21573-
resolution: "simple-plist@npm:1.3.0"
21549+
version: 1.3.1
21550+
resolution: "simple-plist@npm:1.3.1"
2157421551
dependencies:
2157521552
bplist-creator: 0.1.0
21576-
bplist-parser: 0.3.0
21577-
plist: ^3.0.4
21578-
checksum: 60955ac24ce73b9c5ba71c450bc9b1b90b4e21e862735e4fd33073e451bcb2dc543bf2d364527ae78c6b76354eb5674c5a1163ec78428598fdd8fde60ce24bb3
21553+
bplist-parser: 0.3.1
21554+
plist: ^3.0.5
21555+
checksum: 3890b49db544096e6f35f53268901112be859c44b187528979f1a67e604b5b48b4cd6e5d6ee9e2e32aeb1e2535fe93e1cb102e2cf2bf5a37200d8884cb65b918
2157921556
languageName: node
2158021557
linkType: hard
2158121558

0 commit comments

Comments
 (0)