-
-
Notifications
You must be signed in to change notification settings - Fork 655
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
android: Build RN from source, at our fork, for targetSdkVersion 34
This gets us zulip/react-native@5c36f102f and its fixup commit zulip/react-native@b7b2f6c22 (on the `0.68.7-zulip` branch), to fix a build failure with `targetSdkVersion = 34` without having to upgrade to RN v0.73. (The build failure is in debug builds only, but we still need to make those to develop fixes in this legacy project as needed.) Thanks to Greg for investigating the build failure: #5877 (comment) Since (as part of working on this) the `0.68.7-zulip` branch also includes the things that were in the patch-package patch, that patch becomes redundant and we delete it here. Done by digesting the history of RN's doc on building RN from source: facebook/react-native-website@22da0cc63 and making some simplifications. The line `ndkVersion = 24…` sets a variable that ReactAndroid reads, to control the NDK version it builds with. It would otherwise build with NDK 21, which is old and chosen automatically based on ReactAndroid's targetSdkVersion of 31. We need it to be at least 24 for Apple Silicon support.
- Loading branch information
1 parent
382e31f
commit 0509575
Showing
9 changed files
with
57 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Using a `react-native` with cherry-picked or custom changes | ||
|
||
Since 2024-09, we use a fork of `react-native` to make changes | ||
atop 0.68.7. We prefer to avoid upgrading to later `react-native` | ||
releases because it's laborious and we're eager to retire this | ||
codebase and transition to `zulip-flutter`. | ||
|
||
When there's an issue in React Native that calls for changes in | ||
React Native: | ||
|
||
- Push those changes to our RN fork, `zulip/react-native`, | ||
on the `0.68.7-zulip` branch. | ||
|
||
- Update the `package.json`: | ||
|
||
```json | ||
"react-native": "zulip/react-native#<commit-id>", | ||
``` | ||
|
||
- Run `yarn`. | ||
|
||
When building for Android, it will take longer the first time because | ||
React Native is built from source. (`react-native` releases on NPM, | ||
which we've been using until recently, come with a pre-built binary.) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.