Commit e6374c6
fix: Prioritise local cpp (use default as fallback) (#48340)
Summary:
#47379 removed local cpp sources from the sources being built with the app. This resulted in a local `android/app/src/main/jni/OnLoad.cpp` file being ignored at build time. I have therefore added logic to the cmake file to prioritise local `cpp` files and fallback to `${REACT_ANDROID_DIR}/cmake-utils/default-app-setup/*.cpp` if none exist.
This resolves #48298
[ANDROID] [FIXED] - Prioritise local OnLoad.cpp, falling back to default-app-setup
Pull Request resolved: #48340
Test Plan:
- Followed the https://reactnative.dev/docs/the-new-architecture/pure-cxx-modules guide (which was broken > 0.76.1)
- Applied the patch to the reproduction repository linked to #47352 to ensure no regression
Reviewed By: cipolleschi
Differential Revision: D67736012
Pulled By: cortinico
fbshipit-source-id: 87f6b8edf1613682585a94e1d1b3e6b4b792e4f51 parent 07b7953 commit e6374c6
File tree
1 file changed
+18
-3
lines changed- packages/react-native/ReactAndroid/cmake-utils
1 file changed
+18
-3
lines changedLines changed: 18 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
40 | 55 | | |
41 | 56 | | |
42 | 57 | | |
| |||
0 commit comments