Compare commits

...
Author SHA1 Message Date
React Native Bot a2022aff95 Release 0.75.0-rc.4
#publish-packages-to-npm&next
2024-07-08 15:49:29 +00:00
Ruslan Lesiutin 2617ec5570 upgrade[react-devtools-core]: ^5.3.1 (#45288) 2024-07-08 15:17:02 +02:00
Tomek Zawadzki 625d330ed9 Fix dynamic_cast (RTTI) by adding key function to ShadowNodeWrapper again (#45290)
Summary:
This PR restores the virtual destructor for `ShadowNodeWrapper` which was added in https://github.com/facebook/react-native/pull/33500 and unfortunately removed in https://github.com/facebook/react-native/pull/40864.

The virtual destructor here serves as a key function. Without a key function, `obj.hasNativeState<ShadowNodeWrapper>(rt)` **does not** work correctly between shared library boundaries on Android and always returns false.

We need this pretty badly in third-party libraries like react-native-reanimated or react-native-gesture-handler.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[ANDROID] [FIXED] - Fix dynamic_cast (RTTI) for ShadowNodeWrapper when accessed by third-party libraries again

Pull Request resolved: https://github.com/facebook/react-native/pull/45290

Test Plan: This patch fixes an issue in Reanimated's fabric-example app.

Reviewed By: fabriziocucci

Differential Revision: D59375554

Pulled By: javache

fbshipit-source-id: 09f3eda89a67c26d6dacca3428e08d1b7138d350
2024-07-08 15:16:30 +02:00
Jakub Piasecki 2d42024d21 Update ignore file to include ReactBuildConfig in the npm package (#45279)
Summary:
Changes `.npmignore` file to only exclude the `ReactAndroid/build` directory instead of all `build` directories under `ReactAndroid` (which included the `ReactAndroid/src/main/java/com/facebook/react/common/build` package). This problem was caused by the newer version of NPM being used.

Closes https://github.com/facebook/react-native/issues/45204

## Changelog:

[ANDROID] [FIXED] - Fixed build from source failing due to a missing file

Pull Request resolved: https://github.com/facebook/react-native/pull/45279

Test Plan:
Run `npm pack` or `npm publish -dry-run`.

Before this change it includes 3774 files in the package and `ReactBuildConfig` isn't included. After this change it includes 3775 files in the package and `ReactBuildConfig` is included.

Reviewed By: javache

Differential Revision: D59371555

Pulled By: cortinico

fbshipit-source-id: f54f1e88e30429d538b9e160e6ce20d994c5d1b8
2024-07-08 15:15:52 +02:00
Wojciech Lewicki 83a2086548 fix: add JvmStatic to all methods used in cpp (#45243)
Summary:
Following-up on https://github.com/facebook/react-native/pull/45230, I added all the needed `JvmStatic` annotations for methods used in cpp code here: https://github.com/facebook/hermes/blob/f5c867514c71b25212eb3039230e0c095518b532/lib/Platform/Unicode/PlatformUnicodeJava.cpp.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID] [FIXED] - Use `JvmStatic` annotations for all methods from `AndroidUnicodeUtils.kt`

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[ANDROID] [FIXED] - Use `JvmStatic` annotations for all methods from `AndroidUnicodeUtils.kt`

Pull Request resolved: https://github.com/facebook/react-native/pull/45243

Test Plan: Try and use those methods to see that they don't crash on `cpp` side.

Reviewed By: cortinico

Differential Revision: D59264093

Pulled By: dmytrorykun

fbshipit-source-id: 07d683ee38ea1c7d9621ad2e37d04f3d484d3200
2024-07-08 15:15:30 +02:00
Riccardo Cipolleschi 1630b5c743 [RN][Testing] Update testing scripts to work with any version of React native (#45201) 2024-07-03 16:11:08 +01:00
Nicola Corti 7db3ebe2d1 Update Podfile.lock
Changelog: [Internal]
2024-07-02 10:55:27 +01:00
React Native Bot 15b55714eb Release 0.75.0-rc.3
#publish-packages-to-npm&next
2024-07-01 16:54:13 +00:00
Nicola Corti 2ab13798f9 [LOCAL] Bump hermes to hermes-2024-07-01-RNv0.75.0-1edbe36ce92fef2c4d427f5c4e104f2758f4b692 2024-07-01 14:38:19 +01:00
Bartłomiej Błoniarz 07420ea5a2 Add missing WithRuntimeDecorator methods (#45042)
Summary:
This PR adds missing `WithRuntimeDecorator` methods related to `NativeState`. This pattern is used by reanimated to ensure no concurrent access to the runtime. Without this `override` the `RuntimeDecorator` implementation was used, bypassing our mutex.

Changelog:
[GENERAL] [FIXED] - Add missing `NativeState` methods to the `WithRuntimeDecorator` class.

Pull Request resolved: https://github.com/facebook/react-native/pull/45042

Reviewed By: fbmal7

Differential Revision: D58744051

Pulled By: neildhar

fbshipit-source-id: 3f5c85d0bf7cd6445d0c434ac4ae7ed54df203ba
2024-07-01 14:34:00 +01:00
Alan Lee 173587f5ec extract ParsedError handling to helper (#44922)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44922

extract ParsedError handling code into `StackTraceHelperTest`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D58512611

fbshipit-source-id: 959978d80907f2afba96ef249c2fddd351d099ff
2024-07-01 14:32:01 +01:00
Alan Lee 75584641be add default early JS error handler (#44884)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44884

Removing JavaScript error handler supplied to ReactHostImpl.java which is just a stub and creating a default handler in ReactInstance.java which uses NativeExceptionHandler TurboModule to handle error.

Changelog: [Android][BREAKING]  Removing `ReactJsExceptionHandler` param from ReactHostImpl() constructor and providing a default private implementation

Reviewed By: javache, cortinico

Differential Revision: D58385767

fbshipit-source-id: 46548677df936b7c2f584084a2c9769c27e6a963
2024-07-01 14:31:54 +01:00
Gabriel Donadel f86bc9512f Fix Android autolink plugin for libraries that are platform specific (#45223)
Summary:
Fixes https://github.com/facebook/react-native/issues/45222

## Changelog:

[ANDROID] [FIXED] - Fix autolink plugin for libraries that are platform-specific

Pull Request resolved: https://github.com/facebook/react-native/pull/45223

Test Plan: And a library that does not have Android native code such as react-native-segmented-control/segmented-control and sync gradle

Reviewed By: rshest

Differential Revision: D59221562

Pulled By: cortinico

fbshipit-source-id: 55739d63ded63e46897d0d770281f937668c1f50
2024-07-01 14:28:13 +01:00
Nicola Corti 3252855e1d Fix crash due to missing @JvmStatic to convertToCase
Summary:
Users are reporting that RN 0.75 is crashing due to us attempting to accessing a static method
on `AndroidUnicodeUtils.convertToCase` which is not static anymore due to Kotlin conversion.

Static access is inside Hermes codebase here:
https://github.com/facebook/hermes/blob/f5c867514c71b25212eb3039230e0c095518b532/lib/Platform/Unicode/PlatformUnicodeJava.cpp#L107-L109

Changelog:
[Android] [Fixed] - Fix crash due to missing JvmStatic to `convertToCase`

Reviewed By: javache

Differential Revision: D59218291

fbshipit-source-id: ac121a8bcd5fd917ee134d257f967c8e3e338ca5
2024-07-01 14:27:55 +01:00
imWildCat 89073d46bd fix the path of the script phase (#45208)
Summary:
Since 0.75-rc.x, I cannot run pod install because of an linking issue of react native firebase.

https://github.com/reactwg/react-native-releases/issues/341#issuecomment-2194568204

## Changelog:

[IOS][FIXED] Auto linking script of script phase

Pull Request resolved: https://github.com/facebook/react-native/pull/45208

Test Plan: Full demo of this fix: <https://github.com/imWildCat-archived/react-native-075-rc2-regression-ios-linking-script-phase>

Reviewed By: christophpurrer

Differential Revision: D59125585

Pulled By: blakef

fbshipit-source-id: be96d3b207eff67c5e0d777203e7fc0d10103fc0
2024-07-01 14:27:31 +01:00
Dmitry Rykun 6bd418b738 Fix output path for generated artifacts (#45165)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45165

This is a fix for https://github.com/facebook/react-native/issues/45112
This diff changes the codegen so that the output path is computed relative to project root (or `path` if provided) instead of current working directory.

Changelog: [General][Fixed] - Codegen computes output path relative to project root instead of current working directory.

Reviewed By: fkgozali

Differential Revision: D59009821

fbshipit-source-id: 3a138a3508fc239c8600b8c9f242f1c665f8e3c0
2024-07-01 14:27:15 +01:00
Riccardo Cipolleschi 1f10d62700 [LOCAL][iOS] Bump Podfile.lock to RC.2 2024-06-26 14:50:06 +02:00
Riccardo Cipolleschi f938e3214c [LOCAL] Fix type import in testing scripts 2024-06-26 13:06:08 +02:00
React Native Bot 668358c47a Release 0.75.0-rc.2
#publish-packages-to-npm&next
2024-06-26 10:59:42 +00:00
zhongwuzw 4783de7a40 Fixes js bundle failed (#45155)
Summary:
When I enabled `FORCE_BUNDLING`, it build errors like below. cc blakef
![image](https://github.com/facebook/react-native/assets/5061845/d23f6bad-ed60-4f1f-8111-2361c93e93a4)

## Changelog:

[INTERNAL] [FIXED] - Fixes js bundle failed

Pull Request resolved: https://github.com/facebook/react-native/pull/45155

Test Plan: Enable FORCE_BUNDLING and build success.

Reviewed By: cipolleschi

Differential Revision: D59006962

Pulled By: blakef

fbshipit-source-id: 1142d1ddbae7346b67712fac0237950847211992
2024-06-26 11:57:50 +01:00
Riccardo Cipolleschi 865aaeda58 [LOCAL] Bump RC in testing script 2024-06-26 11:23:35 +02:00
Riccardo Cipolleschi 2a0c175135 [LOCAL][CI] Fix Helloworld ios jobs (#45158) 2024-06-26 10:22:02 +01:00
Nicola Corti 6a155dd1cf [LOCAL] Bump CLI to 14.0.0-alpha.11 2024-06-26 10:13:27 +01:00
Riccardo Cipolleschi 52db082576 [LOCAL][iOS] Bump Podfile.lock 2024-06-25 19:02:16 +02:00
React Native Bot 9120930288 Release 0.75.0-rc.1
#publish-packages-to-npm&next
2024-06-25 13:58:20 +00:00
Riccardo Cipolleschi c9f335a568 [LOCAL][Release-Testing] Update the testing script to use the new template (#45144)
* [LOCAL][Release-Testing] Update the testing script to use the new template

* Fix script
2024-06-25 13:55:02 +01:00
Riccardo Cipolleschi 38b1ddebd5 [LOCAL][RN][CI] Improve stability of the Hermes pipeline (#45142)
* [LOCAL][CI] Require cocoapods to hermes-engine podspec

* Refactor Hermes workspace (#45071)

Summary:
This change is the first step in refactoring GHA so that they can be reused more easily across jobs.
Its goal is also to be more reliable w.r.t. caches.

That this change do:
* moves `prepare_hermes_workspace` to a composite action
	* saves the `prepare_hermes_workspace` caches only on main
	* uploads the destination folder as an artifact so that we can use it later in the run
* makes the `test-all`, `nightly` and `publish-release` workflow use the new composite action
* updates the `setup-hermes-workspace` to download and use the artifact uploaded by `prepare_hermes_workspace`

[Internal] - Factor out the prepare_hermes_workspace action

Pull Request resolved: https://github.com/facebook/react-native/pull/45071

Test Plan: GHA in CI

Reviewed By: cortinico

Differential Revision: D58808087

Pulled By: cipolleschi

fbshipit-source-id: 42c46bcf75fc73b2edfda9be62b5d0fe8a919a5d

* [LOCAL][RN][CI] Improve stability of the Hermes pipeline

* chore: align nighlties and releases to the test-all jobs which is green in GHA
2024-06-25 13:54:03 +01:00
Nicola Corti a300a2c057 [LOCAL] Bump CLI to 14.0.0-alpha.10 2024-06-25 13:52:18 +01:00
Riccardo Cipolleschi 1c0a4e72b1 [LOCAL][CI] Require cocoapods to hermes-engine podspec (#45134)
* [LOCAL][CI] Require cocoapods to hermes-engine podspec

* Refactor Hermes workspace (#45071)

Summary:
This change is the first step in refactoring GHA so that they can be reused more easily across jobs.
Its goal is also to be more reliable w.r.t. caches.

That this change do:
* moves `prepare_hermes_workspace` to a composite action
	* saves the `prepare_hermes_workspace` caches only on main
	* uploads the destination folder as an artifact so that we can use it later in the run
* makes the `test-all`, `nightly` and `publish-release` workflow use the new composite action
* updates the `setup-hermes-workspace` to download and use the artifact uploaded by `prepare_hermes_workspace`

[Internal] - Factor out the prepare_hermes_workspace action

Pull Request resolved: https://github.com/facebook/react-native/pull/45071

Test Plan: GHA in CI

Reviewed By: cortinico

Differential Revision: D58808087

Pulled By: cipolleschi

fbshipit-source-id: 42c46bcf75fc73b2edfda9be62b5d0fe8a919a5d
2024-06-24 16:36:39 +01:00
Nicola Corti 50503b08f8 Back out "Add Float and Int type support for Android modules" (#45087)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45087

Original commit changeset: 32b3bbdf5fd2

Fixes https://github.com/facebook/react-native/issues/44963
Closes https://github.com/facebook/react-native/pull/45024

Original Phabricator Diff: D52420921

Changelog:
[Internal] [Changed] - Back out "[RN][Codegen]Add Float and Int type support for Android  modules"

Reviewed By: dmytrorykun

Differential Revision: D58820544

fbshipit-source-id: 59cd0e7cc17a681785c57b5ce1a9d50d28a348af
2024-06-24 14:17:44 +01:00
Riccardo Cipolleschi 453e00a017 [RN][CI] Bump react-native CLI dependency to alpha.9 (#45123) 2024-06-24 13:02:41 +01:00
Riccardo Cipolleschi fafc71b5cb [LOCAL][RN][Tests] Fix JS tests for release (#45062) 2024-06-19 14:37:48 +01:00
React Native Bot 98b302e219 Release 0.75.0-rc.0
#publish-packages-to-npm&next
2024-06-19 10:03:08 +00:00
Nicola Corti 7aa3396f53 Revert "Release 0.75.0-rc.0"
This reverts commit 534fdc0005.
2024-06-19 11:01:46 +01:00
Nicola Corti fee2156642 [LOCAL] Fix build_android by setting git safe folders 2024-06-19 11:01:35 +01:00
React Native Bot 534fdc0005 Release 0.75.0-rc.0
#publish-packages-to-npm&next
2024-06-19 09:54:40 +00:00
Nicola Corti 609c7c05b1 [LOCAL] Fix handling of GITHUB_REF_NAME 2024-06-19 10:53:18 +01:00
Nicola Corti 5f11ed9e43 Revert "Release 0.75.0-rc.0"
This reverts commit 1d69fe9d23.
2024-06-19 10:51:17 +01:00
React Native Bot 1d69fe9d23 Release 0.75.0-rc.0
#publish-packages-to-npm&next
2024-06-19 09:42:02 +00:00
Nicola Corti 63d1a1e5eb [LOCAL] Add debugging info for GITHUB_REF 2024-06-19 10:39:53 +01:00
Riccardo Cipolleschi 6c1374e065 Revert "Release 0.75.0-rc.0"
This reverts commit abd96c21ec.
2024-06-19 10:37:38 +01:00
React Native Bot abd96c21ec Release 0.75.0-rc.0
#publish-packages-to-npm&next
2024-06-19 09:33:10 +00:00
Riccardo Cipolleschi 375c88478c [LOCAL][RN][CI] Fix release scripts to use GITHUB_REF and GITHUB_REF_NAME variables (#45057) 2024-06-19 10:32:04 +01:00
Nicola Corti daf9b29d05 Revert "Release 0.75.0-rc.0"
This reverts commit c2ebb30389.
2024-06-18 18:37:46 +01:00
React Native Bot c2ebb30389 Release 0.75.0-rc.0
#publish-packages-to-npm&next
2024-06-18 17:33:11 +00:00
Nicola Corti f4b1dd1fa1 [LOCAL] Configure git user before attempting to publish a release (#45039) 2024-06-18 18:31:53 +01:00
Nicola Corti a0c83803e8 Fix release regex for publish-release workflow (#45043)
Summary:
The existing regex is not workign. I've split it in two and tested it against a private repo.

## Changelog:

[INTERNAL] - Fix release regex for publish-release workflow

Pull Request resolved: https://github.com/facebook/react-native/pull/45043

Test Plan: Tested on privare repo with GHA

Reviewed By: cipolleschi

Differential Revision: D58736292

Pulled By: cortinico

fbshipit-source-id: f07ef32dcb0059922100c555f7894bbf0c7dd8f6
2024-06-18 18:29:09 +01:00
Riccardo Cipolleschi 528097709a [LOCAL][RN][Release] Use github bot token to commit the tag 2024-06-18 18:27:47 +01:00
Riccardo Cipolleschi efa1e5375a Revert "Release 0.75.0-rc.0"
This reverts commit 1481140e68.
2024-06-18 17:14:43 +01:00
Riccardo Cipolleschi d524c151cd [CI][Release] remove publishing jobs from cci 2024-06-18 17:10:41 +01:00
React Native Bot 1481140e68 Release 0.75.0-rc.0
#publish-packages-to-npm&next
2024-06-18 16:01:33 +00:00
Nicola Corti 03591318fb [LOCAL] Fix double quotes for inputs.dry_run 2024-06-18 17:00:34 +01:00
Nicola Corti 56e1c8bfdd [LOCAL] Fix input types for create-release 2024-06-18 16:58:54 +01:00
Nicola Corti 1b891357b2 [LOCAL] Configure git user before attempting to publish a release (#45039) 2024-06-18 16:51:54 +01:00
Riccardo Cipolleschi e36b46f0c9 [LOCAL][CI][Release] Forward inputs to Create Release composite action (#45038) 2024-06-18 16:46:49 +01:00
Riccardo CipolleschiandNicola Corti b236f9bd82 [LOCAL][RN][Release Testing] Update the testing script to run with the community template (#45033)
* [LOCAL][RN][Release Testing] Update the testing script to run with the community template

* fix prettier

---------

Co-authored-by: Nicola Corti <ncor@meta.com>
2024-06-18 16:23:08 +01:00
Nicola Corti 44d4190581 [LOCAL] Disable test_js_e2e on the 0.75 release branch (#45022) 2024-06-18 11:16:56 +01:00
Riccardo Cipolleschi 88c136ed36 [LOCAL][RN][CI] Use bigger machines for Android Helloworld (#45020) 2024-06-18 10:53:46 +01:00
Blake Friedman e56d4f9528 remove the template from react-native package (#45008)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45008

As part of RFC0759, we are moving the template into it's own repository.

- [Section in RFC0759](https://github.com/react-native-community/discussions-and-proposals/blob/main/proposals/0759-react-native-frameworks.md#evolving-the-react-native-community-template--cli)
- [Template's new home](https://github.com/react-native-community/template)
- [Versioning discussion](https://github.com/react-native-community/cli/issues/2345)

Changelog: [General][Breaking] removed the template from react-native into react-native-community/template

Reviewed By: cortinico

Differential Revision: D58184276

fbshipit-source-id: 5e52320af55495488587accbe144d11164cea4fd
2024-06-18 10:04:11 +01:00
Blake Friedman 20ca94b0d3 test_android_template → test_android_helloworld but disabled until template is removed (#44908)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44908

Changelog: [General] [Changed] - CircleCI test to Helloworld, but disabled for now until we remove the template

Reviewed By: cipolleschi

Differential Revision: D58469912

fbshipit-source-id: 718a774946bd70347697f18bbfc470b2897d2f87
2024-06-18 10:02:48 +01:00
Nicola Corti 37e8fa113e Revert "Make the New Architecture the default (#43135)"
This reverts commit b9f3186ee6.
2024-06-17 14:32:59 +01:00
Nicola Corti 492a0c1292 Bump Hermes version 2024-06-17 14:27:43 +01:00
140 changed files with 1840 additions and 3549 deletions
+18 -20
View File
@@ -96,8 +96,6 @@ jobs:
- run:
name: "Run Tests: JavaScript Tests"
command: node ./scripts/run-ci-javascript-tests.js --maxWorkers 2
- run_e2e:
platform: js
# Optionally, run disabled tests
- when:
@@ -327,9 +325,9 @@ jobs:
destination: rntester-apk
# -------------------------
# JOBS: Test Android Template
# JOBS: Test Android HelloWorld
# -------------------------
test_android_template:
test_android_helloworld:
executor: reactnativeandroid-large
parameters:
flavor:
@@ -348,37 +346,37 @@ jobs:
type: enum
enum: ["Hermes", "JSC"]
environment:
- LC_ALL: C.UTF8
- PROJECT_NAME: "AndroidTemplateProject"
- YARN_ENABLE_IMMUTABLE_INSTALLS: false
- TARGET_ARCHITECTURE: "arm64-v8a"
steps:
- checkout_code_with_cache
- run_yarn
- attach_workspace:
at: .
- run:
name: Create Android template project
name: Build codegen js scripts from flow -> JS
command: |
REPO_ROOT=$(pwd)
node ./scripts/releases/update-template-package.js "{\"react-native\":\"file:$REPO_ROOT/build/$(cat build/react-native-package-version)\"}"
node ./scripts/e2e/init-template-e2e.js --projectName $PROJECT_NAME --templatePath "$REPO_ROOT/packages/react-native" --directory "/tmp/$PROJECT_NAME" --verbose
cd packages/react-native-codegen
yarn run build
- with_gradle_cache:
steps:
- run:
name: Build the template application for << parameters.flavor >> with Architecture set to << parameters.architecture >>, and using the << parameters.jsengine>> JS engine.
name: Build the Helloworld application for << parameters.flavor >> with Architecture set to << parameters.architecture >>, and using the << parameters.jsengine>> JS engine.
command: |
cd /tmp/$PROJECT_NAME/android/
if [[ << parameters.architecture >> == "NewArch" ]]; then
export ORG_GRADLE_PROJECT_newArchEnabled=true
else
export ORG_GRADLE_PROJECT_newArchEnabled=false
cd packages/helloworld/android
args=()
if [[ << parameters.architecture >> == "OldArch" ]]; then
args+=(--arch old)
fi
if [[ << parameters.jsengine >> == "Hermes" ]]; then
export ORG_GRADLE_PROJECT_hermesEnabled=true
else
export ORG_GRADLE_PROJECT_hermesEnabled=false
if [[ << parameters.jsengine >> == "JSC" ]]; then
args+=(--jsvm jsc)
fi
./gradlew assemble<< parameters.flavor >> -Preact.internal.mavenLocalRepo=/root/react-native/maven-local
if [[ << parameters.flavor >> == "Release" ]]; then
args+=(--prod)
fi
yarn build android "${args[@]}" -P reactNativeArchitectures="$TARGET_ARCHITECTURE"
- store_artifacts:
path: /tmp/AndroidTemplateProject/android/app/build/outputs/apk/
destination: template-apk
@@ -46,14 +46,16 @@
- test_android:
requires:
- build_android
- test_android_template:
requires:
- build_npm_package
matrix:
parameters:
architecture: ["NewArch", "OldArch"]
jsengine: ["Hermes", "JSC"]
flavor: ["Debug", "Release"]
## Disabled to land removing react-native/template. Re-enable once switched over
## to Helloworld.
# - test_android_template:
# requires:
# - build_npm_package
# matrix:
# parameters:
# architecture: ["NewArch", "OldArch"]
# jsengine: ["Hermes", "JSC"]
# flavor: ["Debug", "Release"]
- test_ios_helloworld:
requires:
- build_hermes_macos
@@ -43,15 +43,16 @@
- build_hermesc_linux
- build_hermes_macos
- build_hermesc_windows
- test_android:
requires:
- build_android
# - test_e2e_android
- test_android_template:
requires:
- build_npm_package
matrix:
parameters:
architecture: ["NewArch", "OldArch"]
jsengine: ["Hermes", "JSC"]
flavor: ["Debug", "Release"]
## Disabled to land removing react-native/template. Re-enable once switched over
## to Helloworld.
# - test_android:
# requires:
# - build_android
# - test_android_template:
# requires:
# - build_npm_package
# matrix:
# parameters:
# architecture: ["NewArch", "OldArch"]
# jsengine: ["Hermes", "JSC"]
# flavor: ["Debug", "Release"]
-61
View File
@@ -15,67 +15,6 @@
workflows:
version: 2
# Release workflow, triggered by `yarn trigger-react-native-release`
create_release:
when: << pipeline.parameters.run_release_workflow >>
jobs:
- prepare_release:
name: prepare_release
version: << pipeline.parameters.release_version >>
monorepo_packages_version: << pipeline.parameters.release_monorepo_packages_version >>
tag: << pipeline.parameters.release_tag >>
dry_run: << pipeline.parameters.release_dry_run >>
# This job will run only when a tag is published due to all the jobs being filtered.
publish_release:
jobs:
- prepare_hermes_workspace:
filters: *only_release_tags
- build_android:
filters: *only_release_tags
name: build_android_for_release
release_type: "release"
- build_hermesc_linux:
filters: *only_release_tags
requires:
- prepare_hermes_workspace
- build_hermesc_apple:
filters: *only_release_tags
requires:
- prepare_hermes_workspace
- build_apple_slices_hermes:
filters: *only_release_tags
requires:
- build_hermesc_apple
matrix:
parameters:
flavor: ["Debug", "Release"]
slice: ["macosx", "iphoneos", "iphonesimulator", "catalyst"]
- build_hermesc_windows:
filters: *only_release_tags
requires:
- prepare_hermes_workspace
- build_hermes_macos:
filters: *only_release_tags
requires:
- build_apple_slices_hermes
matrix:
parameters:
flavor: ["Debug", "Release"]
# This job will trigger when a version tag is pushed (by package_release)
- build_npm_package:
name: build_and_publish_npm_package
release_type: "release"
filters: *only_release_tags
requires:
- build_android_for_release
- build_hermesc_linux
- build_hermes_macos
- build_hermesc_windows
- poll_maven:
requires:
- build_and_publish_npm_package
analysis:
when:
and:
+1 -1
View File
@@ -84,5 +84,5 @@ runs:
path: |
/tmp/hermes/download/
/tmp/hermes/hermes/
key: v1-hermes-${{ inputs.hermes-version }}-${{ github.run_number }}
key: v1-hermes-${{ inputs.hermes-version }}
enableCrossOsArchive: true
+17 -1
View File
@@ -1,11 +1,27 @@
name: create_release
description: Creates a new React Native release
inputs:
version:
description: "The version of React Native we want to release. For example 0.75.0-rc.0"
required: true
is_latest_on_npm:
description: "Whether we want to tag this release as latest on NPM"
required: true
default: "false"
dry_run:
description: "Whether the job should be executed in dry-run mode or not"
default: "false"
runs:
using: composite
steps:
- name: Yarn install
shell: bash
run: yarn install --non-interactive
- name: Configure Git
shell: bash
run: |
git config --local user.email "bot@reactnative.dev"
git config --local user.name "React Native Bot"
- name: Creating release commit
shell: bash
run: |
@@ -23,7 +39,7 @@ runs:
git tag -a "latest" -m "latest"
- name: Pushing release commit
shell: bash
if: ${{ inputs.dry_run == false }}
if: ${{ inputs.dry_run == 'false' }}
run: |
CURR_BRANCH="$(git branch --show-current)"
git push origin "$CURR_BRANCH" --follow-tags
@@ -0,0 +1,104 @@
name: prepare-hermes-workspace
description: This action prepares the hermes workspace with the right hermes and react-native versions.
inputs:
HERMES_WS_DIR:
required: true
description: The hermes dir we need to use to setup the workspace
HERMES_VERSION_FILE:
required: true
description: the path to the file that will contain the hermes version
BUILD_FROM_SOURCE:
description: Whether we need to build from source or not
default: true
outputs:
hermes-version:
description: the version of Hermes tied to this run
value: ${{ steps.hermes-version.outputs.VERSION }}
react-native-version:
description: the version of React Native tied to this run
value: ${{ steps.react-native-version.outputs.VERSION }}
runs:
using: composite
steps:
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Setup hermes version
shell: bash
id: hermes-version
run: |
mkdir -p "/tmp/hermes" "/tmp/hermes/download" "/tmp/hermes/hermes"
if [ -f "$HERMES_VERSION_FILE" ]; then
echo "Hermes Version file found! Using this version for the build:"
echo "VERSION=$(cat $HERMES_VERSION_FILE)" >> "$GITHUB_OUTPUT"
else
echo "Hermes Version file not found!!!"
echo "Using the last commit from main for the build:"
HERMES_TAG_SHA=$(git ls-remote https://github.com/facebook/hermes main | cut -f 1 | tr -d '[:space:]')
echo "VERSION=$HERMES_TAG_SHA" >> "$GITHUB_OUTPUT"
fi
echo "Hermes commit is $HERMES_TAG_SHA"
- name: Get react-native version
shell: bash
id: react-native-version
run: |
VERSION=$(cat packages/react-native/package.json | jq -r '.version')
# Save the react native version we are building in an output variable so we can use that file as part of the cache key.
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
echo "React Native Version is $VERSION"
- name: Cache hermes workspace
id: restore-hermes
uses: actions/cache/restore@v4.0.0
with:
path: |
/tmp/hermes/download/
/tmp/hermes/hermes/
key: v1-hermes-${{ steps.hermes-version.outputs.version }}
enableCrossOsArchive: true
# It happened while testing that a cache was created from the right folders
# but those folders where empty. Thus, the next check ensures that we can work with those caches.
- name: Check if cache was meaningful
id: meaningful-cache
shell: bash
run: |
if [[ -d /tmp/hermes/hermes ]] && [[ -n "$(ls -A /tmp/hermes/hermes)" ]]; then
echo "Found a good hermes cache"
echo "HERMES_CACHED=true" >> "$GITHUB_OUTPUT"
fi
- name: Yarn- Install Dependencies
if: ${{ steps.meaningful-cache.outputs.HERMES_CACHED != 'true' }}
shell: bash
run: yarn install --non-interactive
- name: Download Hermes tarball
if: ${{ steps.meaningful-cache.outputs.HERMES_CACHED != 'true' }}
shell: bash
run: |
node packages/react-native/scripts/hermes/prepare-hermes-for-build ${{ github.event.pull_request.html_url }}
cp packages/react-native/sdks/download/* $HERMES_WS_DIR/download/.
cp -r packages/react-native/sdks/hermes/* $HERMES_WS_DIR/hermes/.
echo ${{ steps.hermes-version.outputs.version }}
- name: Upload Hermes artifact
uses: actions/upload-artifact@v4
with:
name: hermes-workspace
path: |
/tmp/hermes/download/
/tmp/hermes/hermes/
- name: Cache hermes workspace
uses: actions/cache/save@v4.0.0
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode.
with:
path: |
/tmp/hermes/download/
/tmp/hermes/hermes/
key: v1-hermes-${{ steps.hermes-version.outputs.version }}
enableCrossOsArchive: true
@@ -1,8 +1,13 @@
name: setup_hermes_workspace
description: "Setup hermes workspace"
name: restore-hermes-workspace
description: "Restore hermes workspace that has been created in Prepare Hermes Workspace"
runs:
using: composite
steps:
- name: Download Previous Artifacts
uses: actions/download-artifact@v4
with:
name: hermes-workspace
path: /tmp/hermes
- name: Set up workspace
shell: bash
run: |
+22 -7
View File
@@ -45,17 +45,20 @@ runs:
uses: ./.github/actions/setup-xcode
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Cache setup
id: cache_setup
uses: ./.github/actions/cache_setup
- name: Create Hermes folder
shell: bash
run: mkdir -p "$HERMES_WS_DIR"
- name: Download Hermes
uses: actions/download-artifact@v4
with:
hermes-version: ${{ inputs.hermes-version }}
react-native-version: ${{ inputs.react-native-version }}
name: hermes-darwin-bin-${{ inputs.flavor }}
path: /tmp/hermes/hermes-runtime-darwin/
- name: Print Downloaded hermes
shell: bash
run: ls -lR "$HERMES_WS_DIR"
- name: Run yarn
shell: bash
run: yarn install --non-interactive
- name: Setup Hermes workspace
uses: ./.github/actions/setup_hermes_workspace
- name: Setup ruby
uses: ruby/setup-ruby@v1.170.0
with:
@@ -78,6 +81,17 @@ runs:
args+=(--jsvm jsc)
yarn bootstrap ios "${args[@]}" | cat
else
# Tarball is restored with capital flavors suffix, but somehow the tarball name from JS at line 96 returns as lowercased.
# Let's ensure that the tarballs have the right names
if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" ]]; then
mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-debug.tar.gz"
fi
if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" ]]; then
mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-release.tar.gz"
fi
BUILD_TYPE="${{ inputs.flavor }}"
TARBALL_FILENAME=$(node ../react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE")
HERMES_PATH="$HERMES_WS_DIR/hermes-runtime-darwin/$TARBALL_FILENAME"
@@ -87,6 +101,7 @@ runs:
shell: bash
run: |
cd packages/helloworld
args=()
if [[ ${{ inputs.flavor }} == "Release" ]]; then
args+=(--prod)
+5 -5
View File
@@ -38,12 +38,11 @@ runs:
- name: Run yarn
shell: bash
run: yarn install --non-interactive
- name: Cache setup
id: cache_setup
uses: ./.github/actions/cache_setup
- name: Download Hermes
uses: actions/download-artifact@v4
with:
hermes-version: ${{ inputs.hermes-version }}
react-native-version: ${{ inputs.react-native-version }}
name: hermes-darwin-bin-${{ inputs.flavor }}
path: ${{ inputs.hermes-tarball-artifacts-dir }}
- name: Setup ruby
uses: ruby/setup-ruby@v1.170.0
with:
@@ -82,6 +81,7 @@ runs:
if [[ -e $TARBALL_PATH ]]; then
tar -xf $TARBALL_PATH
echo 'print(HermesInternal?.getRuntimeProperties?.()["OSS Release Version"])' > test.js
chmod +x ./destroot/bin/hermes
./destroot/bin/hermes test.js
rm test.js
rm -rf destroot
+7 -1
View File
@@ -18,11 +18,13 @@ on:
default: false
jobs:
prepare_release:
create_release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
with:
token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
- name: Check if on stable branch
id: check_stable_branch
run: |
@@ -46,3 +48,7 @@ jobs:
- name: Execute Prepare Release
if: ${{ steps.check_stable_branch.outputs.ON_STABLE_BRANCH && !steps.check_if_tag_exists.outputs.TAG_EXISTS }}
uses: ./.github/actions/create-release
with:
version: ${{ inputs.version }}
is_latest_on_npm: ${{ inputs.is_latest_on_npm }}
dry_run: ${{ inputs.dry_run }}
+130 -135
View File
@@ -28,54 +28,19 @@ jobs:
HERMES_WS_DIR: /tmp/hermes
HERMES_VERSION_FILE: packages/react-native/sdks/.hermesversion
BUILD_FROM_SOURCE: true
GRADLE_OPTS: '-Dorg.gradle.daemon=false'
outputs:
react-native-version: ${{ steps.react-native-version.outputs.version }}
hermes-version: ${{ steps.hermes-version.outputs.version }}
react-native-version: ${{ steps.prepare-hermes-workspace.outputs.react-native-version }}
hermes-version: ${{ steps.prepare-hermes-workspace.outputs.hermes-version }}
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Setup hermes version
id: hermes-version
run: |
mkdir -p "/tmp/hermes" "/tmp/hermes/download" "/tmp/hermes/hermes"
if [ -f "$HERMES_VERSION_FILE" ]; then
echo "Hermes Version file found! Using this version for the build:"
echo "VERSION=$(cat $HERMES_VERSION_FILE)" >> "$GITHUB_OUTPUT"
else
echo "Hermes Version file not found!!!"
echo "Using the last commit from main for the build:"
HERMES_TAG_SHA=$(git ls-remote https://github.com/$GITHUB_REPOSITORY main | cut -f 1 | tr -d '[:space:]')
echo "VERSION=$HERMES_TAG_SHA" >> "$GITHUB_OUTPUT"
fi
echo "Hermes commit is $HERMES_TAG_SHA"
- name: Get react-native version
id: react-native-version
run: |
VERSION=$(cat packages/react-native/package.json | jq -r '.version')
# Save the react native version we are building in an output variable so we can use that file as part of the cache key.
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
echo "React Native Version is $VERSION"
- name: Cache hermes workspace
uses: actions/cache@v4.0.0
- name: Prepare Hermes Workspace
id: prepare-hermes-workspace
uses: ./.github/actions/prepare-hermes-workspace
with:
path: |
/tmp/hermes/download/
/tmp/hermes/hermes/
key: v1-hermes-${{ steps.hermes-version.outputs.version }}-${{ github.run_number }}
enableCrossOsArchive: true
- name: Yarn- Install Dependencies
run: yarn install --non-interactive
- name: Download Hermes tarball
run: |
node packages/react-native/scripts/hermes/prepare-hermes-for-build ${{ github.event.pull_request.html_url }}
cp packages/react-native/sdks/download/* $HERMES_WS_DIR/download/.
cp -r packages/react-native/sdks/hermes/* $HERMES_WS_DIR/hermes/.
echo ${{ steps.hermes-version.outputs.version }}
HERMES_WS_DIR: ${{ env.HERMES_WS_DIR }}
HERMES_VERSION_FILE: ${{ env.HERMES_VERSION_FILE }}
BUILD_FROM_SOURCE: ${{ env.BUILD_FROM_SOURCE }}
build_hermesc_apple:
runs-on: macos-13
@@ -86,18 +51,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Cache hermes workspace
uses: actions/cache@v4.0.0
with:
path: |
/tmp/hermes/download/
/tmp/hermes/hermes/
key: v1-hermes-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ github.run_number }}
enableCrossOsArchive: true
- name: Setup Hermes workspace
uses: ./.github/actions/setup_hermes_workspace
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Hermes apple cache
uses: actions/cache@v4.0.0
uses: actions/cache/restore@v4.0.0
with:
path: ./packages/react-native/sdks/hermes/build_host_hermesc
key: v2-hermesc-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
@@ -106,6 +63,18 @@ jobs:
cd ./packages/react-native/sdks/hermes || exit 1
. ./utils/build-apple-framework.sh
build_host_hermesc_if_needed
- name: Upload HermesC Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: hermesc-apple
path: ./packages/react-native/sdks/hermes/build_host_hermesc
- name: Cache hermesc apple
uses: actions/cache/save@v4.0.0
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
with:
path: ./packages/react-native/sdks/hermes/build_host_hermesc
key: v2-hermesc-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
enableCrossOsArchive: true
build_apple_slices_hermes:
runs-on: macos-14
@@ -114,6 +83,9 @@ jobs:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
HERMES_OSXBIN_ARTIFACTS_DIR: /tmp/hermes/osx-bin
IOS_DEPLOYMENT_TARGET: "13.4"
XROS_DEPLOYMENT_TARGET: "1.0"
MAC_DEPLOYMENT_TARGET: "10.15"
continue-on-error: true
strategy:
fail-fast: false
@@ -125,33 +97,20 @@ jobs:
uses: actions/checkout@v4.1.1
- name: Setup xcode
uses: ./.github/actions/setup-xcode
- name: Cache setup
id: cache_setup
uses: ./.github/actions/cache_setup
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Restore HermesC Artifact
uses: actions/download-artifact@v4.1.3
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
- name: Setup Hermes workspace
uses: ./.github/actions/setup_hermes_workspace
- name: Check if the required artifacts already exist
id: check_if_apple_artifacts_are_there
run: |
FLAVOR="${{ matrix.flavor }}"
echo "Flavor is $FLAVOR"
OSX_BIN="/tmp/hermes/osx-bin/$FLAVOR"
DSYM="/tmp/hermes/dSYM/$FLAVOR"
HERMES="/tmp/hermes/hermes-runtime-darwin/hermes-ios-$FLAVOR.tar.gz"
if [[ -d "$OSX_BIN" ]] && \
[[ -d "$DSYM" ]] && \
[[ -f "$HERMES" ]]; then
echo "Artifacts are there!"
echo "ARTIFACTS_EXIST=true" >> $GITHUB_ENV
echo "ARTIFACTS_EXIST=true" >> $GITHUB_OUTPUT
fi
name: hermesc-apple
path: ./packages/react-native/sdks/hermes/build_host_hermesc
- name: Restore Slice From Cache
id: restore-slice-cache
uses: actions/cache/restore@v4.0.0
with:
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }}
- name: Build the Hermes ${{ matrix.slice }} frameworks
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
run: |
cd ./packages/react-native/sdks/hermes || exit 1
SLICE=${{ matrix.slice }}
@@ -169,11 +128,20 @@ jobs:
exit 0
fi
export RELEASE_VERSION=${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
# HermesC is used to build hermes, so it has to be executable
chmod +x ./build_host_hermesc/bin/hermesc
if [[ "$SLICE" == "macosx" ]]; then
echo "[HERMES] Building Hermes for MacOS"
chmod +x ./utils/build-mac-framework.sh
BUILD_TYPE="${{ matrix.flavor }}" ./utils/build-mac-framework.sh
else
echo "[HERMES] Building Hermes for iOS: $SLICE"
chmod +x ./utils/build-ios-framework.sh
BUILD_TYPE="${{ matrix.flavor }}" ./utils/build-ios-framework.sh "$SLICE"
fi
@@ -195,9 +163,14 @@ jobs:
echo "Please try again"
exit 1
fi
- name: Upload Artifact for Slice (${{ matrix.slice }}, ${{ matrix.flavor }}}
uses: actions/upload-artifact@v4.3.1
with:
name: slice-${{ matrix.slice }}-${{ matrix.flavor }}
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }}
- name: Save slice cache
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
uses: actions/cache@v4.0.0
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
uses: actions/cache/save@v4.0.0
with:
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }}
@@ -220,14 +193,16 @@ jobs:
uses: ./.github/actions/setup-xcode
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Cache setup
id: cache_setup
uses: ./.github/actions/cache_setup
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Restore Cached Artifacts
uses: actions/cache/restore@v4.0.0
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
- name: Setup Hermes workspace
uses: ./.github/actions/setup_hermes_workspace
key: v2-hermes-osx-bin-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
path: |
/tmp/hermes/osx-bin/${{ matrix.flavor }}
/tmp/hermes/dSYM/${{ matrix.flavor }}
/tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ matrix.flavor }}.tar.gz
- name: Check if the required artifacts already exist
id: check_if_apple_artifacts_are_there
run: |
@@ -246,46 +221,46 @@ jobs:
echo "ARTIFACTS_EXIST=true" >> $GITHUB_OUTPUT
fi
- name: Yarn- Install Dependencies
if: ${{ ! contains(github.event.head_commit.message, 'Bump metro@') && steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
run: yarn install --non-interactive
- name: Slice cache macosx
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
uses: actions/cache@v4.0.0
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4.1.3
with:
path: ./packages/react-native/sdks/hermes/build_macosx_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-macosx-${{ matrix.flavor }}
name: slice-macosx-${{ matrix.flavor }}
- name: Slice cache iphoneos
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
uses: actions/cache@v4.0.0
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4.1.3
with:
path: ./packages/react-native/sdks/hermes/build_iphoneos_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-iphoneos-${{ matrix.flavor }}
name: slice-iphoneos-${{ matrix.flavor }}
- name: Slice cache iphonesimulator
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
uses: actions/cache@v4.0.0
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4.1.3
with:
path: ./packages/react-native/sdks/hermes/build_iphonesimulator_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-iphonesimulator-${{ matrix.flavor }}
name: slice-iphonesimulator-${{ matrix.flavor }}
- name: Slice cache catalyst
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
uses: actions/cache@v4.0.0
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4.1.3
with:
path: ./packages/react-native/sdks/hermes/build_catalyst_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-catalyst-${{ matrix.flavor }}
name: slice-catalyst-${{ matrix.flavor }}
- name: Slice cache xros
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
uses: actions/cache@v4.0.0
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4.1.3
with:
path: ./packages/react-native/sdks/hermes/build_xros_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-xros-${{ matrix.flavor }}
name: slice-xros-${{ matrix.flavor }}
- name: Slice cache xrsimulator
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
uses: actions/cache@v4.0.0
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4.1.3
with:
path: ./packages/react-native/sdks/hermes/build_xrsimulator_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-xrsimulator-${{ matrix.flavor }}
name: slice-xrsimulator-${{ matrix.flavor }}
- name: Move back build folders
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
run: |
ls -l ./packages/react-native/sdks/hermes
cd ./packages/react-native/sdks/hermes || exit 1
@@ -296,19 +271,23 @@ jobs:
mv build_xros_${{ matrix.flavor }} build_xros
mv build_xrsimulator_${{ matrix.flavor }} build_xrsimulator
- name: Prepare destroot folder
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
run: |
cd ./packages/react-native/sdks/hermes || exit 1
chmod +x ./utils/build-apple-framework.sh
. ./utils/build-apple-framework.sh
prepare_dest_root_for_ci
- name: Create fat framework for iOS
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
run: |
cd ./packages/react-native/sdks/hermes || exit 1
echo "[HERMES] Creating the universal framework"
chmod +x ./utils/build-ios-framework.sh
./utils/build-ios-framework.sh build_framework
chmod +x ./destroot/bin/hermesc
- name: Package the Hermes Apple frameworks
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
run: |
BUILD_TYPE="${{ matrix.flavor }}"
echo "Packaging Hermes Apple frameworks for $BUILD_TYPE build type"
@@ -332,18 +311,8 @@ jobs:
mkdir -p /tmp/hermes/osx-bin/${{ matrix.flavor }}
cp ./packages/react-native/sdks/hermes/build_macosx/bin/* /tmp/hermes/osx-bin/${{ matrix.flavor }}
ls -lR /tmp/hermes/osx-bin/
- name: Upload darwin artifacts
uses: actions/upload-artifact@v4.3.1
with:
name: hermes-darwin-bin-${{ matrix.flavor }}
path: /tmp/hermes/hermes-runtime-darwin
- name: Upload osx-bin
uses: actions/upload-artifact@v4.3.1
with:
name: hermes-osx-bin-${{ matrix.flavor }}
path: /tmp/hermes/osx-bin
- name: Create dSYM archive
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
run: |
FLAVOR=${{ matrix.flavor }}
WORKING_DIR="/tmp/hermes_tmp/dSYM/$FLAVOR"
@@ -375,10 +344,32 @@ jobs:
with:
name: hermes-dSYM-${{ matrix.flavor }}
path: /tmp/hermes/dSYM/${{ matrix.flavor }}
- name: Upload hermes Runtime artifacts
uses: actions/upload-artifact@v4.3.1
with:
name: hermes-darwin-bin-${{ matrix.flavor }}
path: /tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ matrix.flavor }}.tar.gz
- name: Upload hermes osx artifacts
uses: actions/upload-artifact@v4.3.1
with:
name: hermes-osx-bin-${{ matrix.flavor }}
path: /tmp/hermes/osx-bin/${{ matrix.flavor }}
- name: Upload Hermes Artifacts
uses: actions/cache/save@v4.0.0
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
with:
key: v2-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
path: |
/tmp/hermes/osx-bin/${{ matrix.flavor }}
/tmp/hermes/dSYM/${{ matrix.flavor }}
/tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ matrix.flavor }}.tar.gz
build_hermesc_linux:
runs-on: ubuntu-latest
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
@@ -387,12 +378,8 @@ jobs:
sudo apt update
sudo apt install -y git openssh-client cmake build-essential \
libreadline-dev libicu-dev jq zip python3
- name: Cache setup
id: cache_setup
uses: ./.github/actions/cache_setup
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Linux cache
uses: actions/cache@v4.0.0
with:
@@ -426,18 +413,25 @@ jobs:
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: 'D:\tmp\hermes'
HERMES_TARBALL_ARTIFACTS_DIR: 'D:\tmp\hermes\hermes-runtime-darwin'
HERMES_OSXBIN_ARTIFACTS_DIR: 'D:\tmp\hermes\osx-bin'
ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip"
MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
CMAKE_DIR: 'C:\Program Files\CMake\bin'
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Cache setup
id: cache_setup
uses: ./.github/actions/cache_setup
- name: Download Previous Artifacts
uses: actions/download-artifact@v4
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
name: hermes-workspace
path: 'D:\tmp\hermes'
- name: Set up workspace
run: |
mkdir -p D:\tmp\hermes\osx-bin
mkdir -p .\packages\react-native\sdks\hermes
cp -r -Force D:\tmp\hermes\hermes\* .\packages\react-native\sdks\hermes\.
cp -r -Force .\packages\react-native\sdks\hermes-engine\utils\* .\packages\react-native\sdks\hermes\.
- name: Windows cache
uses: actions/cache@v4.0.0
with:
@@ -548,6 +542,7 @@ jobs:
name: rntester-apk
path: packages/rn-tester/android/app/build/outputs/apk/
compression-level: 0
build_npm_package:
runs-on: 8-core-ubuntu
needs: [set_release_type, prepare_hermes_workspace, build_hermes_macos, build_hermesc_linux, build_hermesc_windows,build_android]
@@ -578,12 +573,12 @@ jobs:
uses: actions/download-artifact@v4.1.3
with:
name: hermes-osx-bin-Release
path: /tmp/hermes/osx-bin
path: /tmp/hermes/osx-bin/Release
- name: Download osx-bin debug artifacts
uses: actions/download-artifact@v4.1.3
with:
name: hermes-osx-bin-Debug
path: /tmp/hermes/osx-bin
path: /tmp/hermes/osx-bin/Debug
- name: Download darwin-bin release artifacts
uses: actions/download-artifact@v4.1.3
with:
+135 -139
View File
@@ -1,9 +1,9 @@
name: Publish release
name: Publish Release
on:
push:
tags:
- "v0.[0-9]+.[0-9]+(-*)?" # This should match v0.X.Y and v0.X.Y-RC.0
- "v0.*.*" # This should match v0.X.Y
- "v0.*.*-rc.*" # This should match v0.X.Y-RC.0
jobs:
set_release_type:
runs-on: ubuntu-latest
@@ -25,54 +25,19 @@ jobs:
HERMES_WS_DIR: /tmp/hermes
HERMES_VERSION_FILE: packages/react-native/sdks/.hermesversion
BUILD_FROM_SOURCE: true
GRADLE_OPTS: '-Dorg.gradle.daemon=false'
outputs:
react-native-version: ${{ steps.react-native-version.outputs.version }}
hermes-version: ${{ steps.hermes-version.outputs.version }}
react-native-version: ${{ steps.prepare-hermes-workspace.outputs.react-native-version }}
hermes-version: ${{ steps.prepare-hermes-workspace.outputs.hermes-version }}
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Setup hermes version
id: hermes-version
run: |
mkdir -p "/tmp/hermes" "/tmp/hermes/download" "/tmp/hermes/hermes"
if [ -f "$HERMES_VERSION_FILE" ]; then
echo "Hermes Version file found! Using this version for the build:"
echo "VERSION=$(cat $HERMES_VERSION_FILE)" >> "$GITHUB_OUTPUT"
else
echo "Hermes Version file not found!!!"
echo "Using the last commit from main for the build:"
HERMES_TAG_SHA=$(git ls-remote https://github.com/$GITHUB_REPOSITORY main | cut -f 1 | tr -d '[:space:]')
echo "VERSION=$HERMES_TAG_SHA" >> "$GITHUB_OUTPUT"
fi
echo "Hermes commit is $HERMES_TAG_SHA"
- name: Get react-native version
id: react-native-version
run: |
VERSION=$(cat packages/react-native/package.json | jq -r '.version')
# Save the react native version we are building in an output variable so we can use that file as part of the cache key.
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
echo "React Native Version is $VERSION"
- name: Cache hermes workspace
uses: actions/cache@v4.0.0
- name: Prepare Hermes Workspace
id: prepare-hermes-workspace
uses: ./.github/actions/prepare-hermes-workspace
with:
path: |
/tmp/hermes/download/
/tmp/hermes/hermes/
key: v1-hermes-${{ steps.hermes-version.outputs.version }}-${{ github.run_number }}
enableCrossOsArchive: true
- name: Yarn- Install Dependencies
run: yarn install --non-interactive
- name: Download Hermes tarball
run: |
node packages/react-native/scripts/hermes/prepare-hermes-for-build ${{ github.event.pull_request.html_url }}
cp packages/react-native/sdks/download/* $HERMES_WS_DIR/download/.
cp -r packages/react-native/sdks/hermes/* $HERMES_WS_DIR/hermes/.
echo ${{ steps.hermes-version.outputs.version }}
HERMES_WS_DIR: ${{ env.HERMES_WS_DIR }}
HERMES_VERSION_FILE: ${{ env.HERMES_VERSION_FILE }}
BUILD_FROM_SOURCE: ${{ env.BUILD_FROM_SOURCE }}
build_hermesc_apple:
runs-on: macos-13
@@ -83,18 +48,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Cache hermes workspace
uses: actions/cache@v4.0.0
with:
path: |
/tmp/hermes/download/
/tmp/hermes/hermes/
key: v1-hermes-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ github.run_number }}
enableCrossOsArchive: true
- name: Setup Hermes workspace
uses: ./.github/actions/setup_hermes_workspace
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Hermes apple cache
uses: actions/cache@v4.0.0
uses: actions/cache/restore@v4.0.0
with:
path: ./packages/react-native/sdks/hermes/build_host_hermesc
key: v2-hermesc-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
@@ -103,6 +60,18 @@ jobs:
cd ./packages/react-native/sdks/hermes || exit 1
. ./utils/build-apple-framework.sh
build_host_hermesc_if_needed
- name: Upload HermesC Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: hermesc-apple
path: ./packages/react-native/sdks/hermes/build_host_hermesc
- name: Cache hermesc apple
uses: actions/cache/save@v4.0.0
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
with:
path: ./packages/react-native/sdks/hermes/build_host_hermesc
key: v2-hermesc-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
enableCrossOsArchive: true
build_apple_slices_hermes:
runs-on: macos-14
@@ -111,6 +80,9 @@ jobs:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
HERMES_OSXBIN_ARTIFACTS_DIR: /tmp/hermes/osx-bin
IOS_DEPLOYMENT_TARGET: "13.4"
XROS_DEPLOYMENT_TARGET: "1.0"
MAC_DEPLOYMENT_TARGET: "10.15"
continue-on-error: true
strategy:
fail-fast: false
@@ -122,33 +94,20 @@ jobs:
uses: actions/checkout@v4.1.1
- name: Setup xcode
uses: ./.github/actions/setup-xcode
- name: Cache setup
id: cache_setup
uses: ./.github/actions/cache_setup
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Restore HermesC Artifact
uses: actions/download-artifact@v4.1.3
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
- name: Setup Hermes workspace
uses: ./.github/actions/setup_hermes_workspace
- name: Check if the required artifacts already exist
id: check_if_apple_artifacts_are_there
run: |
FLAVOR="${{ matrix.flavor }}"
echo "Flavor is $FLAVOR"
OSX_BIN="/tmp/hermes/osx-bin/$FLAVOR"
DSYM="/tmp/hermes/dSYM/$FLAVOR"
HERMES="/tmp/hermes/hermes-runtime-darwin/hermes-ios-$FLAVOR.tar.gz"
if [[ -d "$OSX_BIN" ]] && \
[[ -d "$DSYM" ]] && \
[[ -f "$HERMES" ]]; then
echo "Artifacts are there!"
echo "ARTIFACTS_EXIST=true" >> $GITHUB_ENV
echo "ARTIFACTS_EXIST=true" >> $GITHUB_OUTPUT
fi
name: hermesc-apple
path: ./packages/react-native/sdks/hermes/build_host_hermesc
- name: Restore Slice From Cache
id: restore-slice-cache
uses: actions/cache/restore@v4.0.0
with:
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }}
- name: Build the Hermes ${{ matrix.slice }} frameworks
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
run: |
cd ./packages/react-native/sdks/hermes || exit 1
SLICE=${{ matrix.slice }}
@@ -166,11 +125,20 @@ jobs:
exit 0
fi
export RELEASE_VERSION=${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
# HermesC is used to build hermes, so it has to be executable
chmod +x ./build_host_hermesc/bin/hermesc
if [[ "$SLICE" == "macosx" ]]; then
echo "[HERMES] Building Hermes for MacOS"
chmod +x ./utils/build-mac-framework.sh
BUILD_TYPE="${{ matrix.flavor }}" ./utils/build-mac-framework.sh
else
echo "[HERMES] Building Hermes for iOS: $SLICE"
chmod +x ./utils/build-ios-framework.sh
BUILD_TYPE="${{ matrix.flavor }}" ./utils/build-ios-framework.sh "$SLICE"
fi
@@ -192,9 +160,14 @@ jobs:
echo "Please try again"
exit 1
fi
- name: Upload Artifact for Slice (${{ matrix.slice }}, ${{ matrix.flavor }}}
uses: actions/upload-artifact@v4.3.1
with:
name: slice-${{ matrix.slice }}-${{ matrix.flavor }}
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }}
- name: Save slice cache
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
uses: actions/cache@v4.0.0
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
uses: actions/cache/save@v4.0.0
with:
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }}
@@ -217,14 +190,16 @@ jobs:
uses: ./.github/actions/setup-xcode
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Cache setup
id: cache_setup
uses: ./.github/actions/cache_setup
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Restore Cached Artifacts
uses: actions/cache/restore@v4.0.0
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
- name: Setup Hermes workspace
uses: ./.github/actions/setup_hermes_workspace
key: v2-hermes-osx-bin-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
path: |
/tmp/hermes/osx-bin/${{ matrix.flavor }}
/tmp/hermes/dSYM/${{ matrix.flavor }}
/tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ matrix.flavor }}.tar.gz
- name: Check if the required artifacts already exist
id: check_if_apple_artifacts_are_there
run: |
@@ -243,46 +218,46 @@ jobs:
echo "ARTIFACTS_EXIST=true" >> $GITHUB_OUTPUT
fi
- name: Yarn- Install Dependencies
if: ${{ ! contains(github.event.head_commit.message, 'Bump metro@') && steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
run: yarn install --non-interactive
- name: Slice cache macosx
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
uses: actions/cache@v4.0.0
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4.1.3
with:
path: ./packages/react-native/sdks/hermes/build_macosx_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-macosx-${{ matrix.flavor }}
name: slice-macosx-${{ matrix.flavor }}
- name: Slice cache iphoneos
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
uses: actions/cache@v4.0.0
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4.1.3
with:
path: ./packages/react-native/sdks/hermes/build_iphoneos_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-iphoneos-${{ matrix.flavor }}
name: slice-iphoneos-${{ matrix.flavor }}
- name: Slice cache iphonesimulator
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
uses: actions/cache@v4.0.0
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4.1.3
with:
path: ./packages/react-native/sdks/hermes/build_iphonesimulator_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-iphonesimulator-${{ matrix.flavor }}
name: slice-iphonesimulator-${{ matrix.flavor }}
- name: Slice cache catalyst
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
uses: actions/cache@v4.0.0
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4.1.3
with:
path: ./packages/react-native/sdks/hermes/build_catalyst_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-catalyst-${{ matrix.flavor }}
name: slice-catalyst-${{ matrix.flavor }}
- name: Slice cache xros
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
uses: actions/cache@v4.0.0
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4.1.3
with:
path: ./packages/react-native/sdks/hermes/build_xros_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-xros-${{ matrix.flavor }}
name: slice-xros-${{ matrix.flavor }}
- name: Slice cache xrsimulator
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
uses: actions/cache@v4.0.0
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4.1.3
with:
path: ./packages/react-native/sdks/hermes/build_xrsimulator_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-xrsimulator-${{ matrix.flavor }}
name: slice-xrsimulator-${{ matrix.flavor }}
- name: Move back build folders
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
run: |
ls -l ./packages/react-native/sdks/hermes
cd ./packages/react-native/sdks/hermes || exit 1
@@ -293,19 +268,23 @@ jobs:
mv build_xros_${{ matrix.flavor }} build_xros
mv build_xrsimulator_${{ matrix.flavor }} build_xrsimulator
- name: Prepare destroot folder
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
run: |
cd ./packages/react-native/sdks/hermes || exit 1
chmod +x ./utils/build-apple-framework.sh
. ./utils/build-apple-framework.sh
prepare_dest_root_for_ci
- name: Create fat framework for iOS
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
run: |
cd ./packages/react-native/sdks/hermes || exit 1
echo "[HERMES] Creating the universal framework"
chmod +x ./utils/build-ios-framework.sh
./utils/build-ios-framework.sh build_framework
chmod +x ./destroot/bin/hermesc
- name: Package the Hermes Apple frameworks
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
run: |
BUILD_TYPE="${{ matrix.flavor }}"
echo "Packaging Hermes Apple frameworks for $BUILD_TYPE build type"
@@ -329,18 +308,8 @@ jobs:
mkdir -p /tmp/hermes/osx-bin/${{ matrix.flavor }}
cp ./packages/react-native/sdks/hermes/build_macosx/bin/* /tmp/hermes/osx-bin/${{ matrix.flavor }}
ls -lR /tmp/hermes/osx-bin/
- name: Upload darwin artifacts
uses: actions/upload-artifact@v4.3.1
with:
name: hermes-darwin-bin-${{ matrix.flavor }}
path: /tmp/hermes/hermes-runtime-darwin
- name: Upload osx-bin
uses: actions/upload-artifact@v4.3.1
with:
name: hermes-osx-bin-${{ matrix.flavor }}
path: /tmp/hermes/osx-bin
- name: Create dSYM archive
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
run: |
FLAVOR=${{ matrix.flavor }}
WORKING_DIR="/tmp/hermes_tmp/dSYM/$FLAVOR"
@@ -372,10 +341,32 @@ jobs:
with:
name: hermes-dSYM-${{ matrix.flavor }}
path: /tmp/hermes/dSYM/${{ matrix.flavor }}
- name: Upload hermes Runtime artifacts
uses: actions/upload-artifact@v4.3.1
with:
name: hermes-darwin-bin-${{ matrix.flavor }}
path: /tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ matrix.flavor }}.tar.gz
- name: Upload hermes osx artifacts
uses: actions/upload-artifact@v4.3.1
with:
name: hermes-osx-bin-${{ matrix.flavor }}
path: /tmp/hermes/osx-bin/${{ matrix.flavor }}
- name: Upload Hermes Artifacts
uses: actions/cache/save@v4.0.0
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
with:
key: v2-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
path: |
/tmp/hermes/osx-bin/${{ matrix.flavor }}
/tmp/hermes/dSYM/${{ matrix.flavor }}
/tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ matrix.flavor }}.tar.gz
build_hermesc_linux:
runs-on: ubuntu-latest
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
@@ -384,12 +375,8 @@ jobs:
sudo apt update
sudo apt install -y git openssh-client cmake build-essential \
libreadline-dev libicu-dev jq zip python3
- name: Cache setup
id: cache_setup
uses: ./.github/actions/cache_setup
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Linux cache
uses: actions/cache@v4.0.0
with:
@@ -423,18 +410,25 @@ jobs:
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: 'D:\tmp\hermes'
HERMES_TARBALL_ARTIFACTS_DIR: 'D:\tmp\hermes\hermes-runtime-darwin'
HERMES_OSXBIN_ARTIFACTS_DIR: 'D:\tmp\hermes\osx-bin'
ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip"
MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
CMAKE_DIR: 'C:\Program Files\CMake\bin'
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Cache setup
id: cache_setup
uses: ./.github/actions/cache_setup
- name: Download Previous Artifacts
uses: actions/download-artifact@v4
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
name: hermes-workspace
path: 'D:\tmp\hermes'
- name: Set up workspace
run: |
mkdir -p D:\tmp\hermes\osx-bin
mkdir -p .\packages\react-native\sdks\hermes
cp -r -Force D:\tmp\hermes\hermes\* .\packages\react-native\sdks\hermes\.
cp -r -Force .\packages\react-native\sdks\hermes-engine\utils\* .\packages\react-native\sdks\hermes\.
- name: Windows cache
uses: actions/cache@v4.0.0
with:
@@ -515,7 +509,9 @@ jobs:
- name: Install dependencies
run: yarn install --non-interactive
- name: Set React Native Version
run: node ./scripts/releases/set-rn-version.js --build-type ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
run: |
git config --global --add safe.directory /__w/react-native/react-native
node ./scripts/releases/set-rn-version.js --build-type ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
- name: Setup gradle
uses: ./.github/actions/setup-gradle
- name: Build and publish all the Android Artifacts to /tmp/maven-local
@@ -576,12 +572,12 @@ jobs:
uses: actions/download-artifact@v4.1.3
with:
name: hermes-osx-bin-Release
path: /tmp/hermes/osx-bin
path: /tmp/hermes/osx-bin/Release
- name: Download osx-bin debug artifacts
uses: actions/download-artifact@v4.1.3
with:
name: hermes-osx-bin-Debug
path: /tmp/hermes/osx-bin
path: /tmp/hermes/osx-bin/Debug
- name: Download darwin-bin release artifacts
uses: actions/download-artifact@v4.1.3
with:
+131 -137
View File
@@ -2,6 +2,7 @@ name: Test All
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
@@ -36,52 +37,18 @@ jobs:
HERMES_VERSION_FILE: packages/react-native/sdks/.hermesversion
BUILD_FROM_SOURCE: true
outputs:
react-native-version: ${{ steps.react-native-version.outputs.version }}
hermes-version: ${{ steps.hermes-version.outputs.version }}
react-native-version: ${{ steps.prepare-hermes-workspace.outputs.react-native-version }}
hermes-version: ${{ steps.prepare-hermes-workspace.outputs.hermes-version }}
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Setup hermes version
id: hermes-version
run: |
mkdir -p "/tmp/hermes" "/tmp/hermes/download" "/tmp/hermes/hermes"
if [ -f "$HERMES_VERSION_FILE" ]; then
echo "Hermes Version file found! Using this version for the build:"
echo "VERSION=$(cat $HERMES_VERSION_FILE)" >> "$GITHUB_OUTPUT"
else
echo "Hermes Version file not found!!!"
echo "Using the last commit from main for the build:"
HERMES_TAG_SHA=$(git ls-remote https://github.com/$GITHUB_REPOSITORY main | cut -f 1 | tr -d '[:space:]')
echo "VERSION=$HERMES_TAG_SHA" >> "$GITHUB_OUTPUT"
fi
echo "Hermes commit is $HERMES_TAG_SHA"
- name: Get react-native version
id: react-native-version
run: |
VERSION=$(cat packages/react-native/package.json | jq -r '.version')
# Save the react native version we are building in an output variable so we can use that file as part of the cache key.
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
echo "React Native Version is $VERSION"
- name: Cache hermes workspace
uses: actions/cache@v4.0.0
- name: Prepare Hermes Workspace
id: prepare-hermes-workspace
uses: ./.github/actions/prepare-hermes-workspace
with:
path: |
/tmp/hermes/download/
/tmp/hermes/hermes/
key: v1-hermes-${{ steps.hermes-version.outputs.version }}-${{ github.run_number }}
enableCrossOsArchive: true
- name: Yarn- Install Dependencies
run: yarn install --non-interactive
- name: Download Hermes tarball
run: |
node packages/react-native/scripts/hermes/prepare-hermes-for-build ${{ github.event.pull_request.html_url }}
cp packages/react-native/sdks/download/* $HERMES_WS_DIR/download/.
cp -r packages/react-native/sdks/hermes/* $HERMES_WS_DIR/hermes/.
echo ${{ steps.hermes-version.outputs.version }}
HERMES_WS_DIR: ${{ env.HERMES_WS_DIR }}
HERMES_VERSION_FILE: ${{ env.HERMES_VERSION_FILE }}
BUILD_FROM_SOURCE: ${{ env.BUILD_FROM_SOURCE }}
build_hermesc_apple:
runs-on: macos-13
@@ -92,18 +59,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Cache hermes workspace
uses: actions/cache@v4.0.0
with:
path: |
/tmp/hermes/download/
/tmp/hermes/hermes/
key: v1-hermes-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ github.run_number }}
enableCrossOsArchive: true
- name: Setup Hermes workspace
uses: ./.github/actions/setup_hermes_workspace
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Hermes apple cache
uses: actions/cache@v4.0.0
uses: actions/cache/restore@v4.0.0
with:
path: ./packages/react-native/sdks/hermes/build_host_hermesc
key: v2-hermesc-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
@@ -112,6 +71,18 @@ jobs:
cd ./packages/react-native/sdks/hermes || exit 1
. ./utils/build-apple-framework.sh
build_host_hermesc_if_needed
- name: Upload HermesC Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: hermesc-apple
path: ./packages/react-native/sdks/hermes/build_host_hermesc
- name: Cache hermesc apple
uses: actions/cache/save@v4.0.0
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
with:
path: ./packages/react-native/sdks/hermes/build_host_hermesc
key: v2-hermesc-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
enableCrossOsArchive: true
build_apple_slices_hermes:
runs-on: macos-14
@@ -120,6 +91,9 @@ jobs:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
HERMES_OSXBIN_ARTIFACTS_DIR: /tmp/hermes/osx-bin
IOS_DEPLOYMENT_TARGET: "13.4"
XROS_DEPLOYMENT_TARGET: "1.0"
MAC_DEPLOYMENT_TARGET: "10.15"
continue-on-error: true
strategy:
fail-fast: false
@@ -131,30 +105,19 @@ jobs:
uses: actions/checkout@v4.1.1
- name: Setup xcode
uses: ./.github/actions/setup-xcode
- name: Cache setup
id: cache_setup
uses: ./.github/actions/cache_setup
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Restore HermesC Artifact
uses: actions/download-artifact@v4.1.3
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
- name: Setup Hermes workspace
uses: ./.github/actions/setup_hermes_workspace
- name: Check if the required artifacts already exist
id: check_if_apple_artifacts_are_there
run: |
FLAVOR="${{ matrix.flavor }}"
echo "Flavor is $FLAVOR"
OSX_BIN="/tmp/hermes/osx-bin/$FLAVOR"
DSYM="/tmp/hermes/dSYM/$FLAVOR"
HERMES="/tmp/hermes/hermes-runtime-darwin/hermes-ios-$FLAVOR.tar.gz"
if [[ -d "$OSX_BIN" ]] && \
[[ -d "$DSYM" ]] && \
[[ -f "$HERMES" ]]; then
echo "Artifacts are there!"
echo "ARTIFACTS_EXIST=true" >> $GITHUB_ENV
fi
name: hermesc-apple
path: ./packages/react-native/sdks/hermes/build_host_hermesc
- name: Restore Slice From Cache
id: restore-slice-cache
uses: actions/cache/restore@v4.0.0
with:
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }}
- name: Build the Hermes ${{ matrix.slice }} frameworks
run: |
cd ./packages/react-native/sdks/hermes || exit 1
@@ -173,11 +136,20 @@ jobs:
exit 0
fi
export RELEASE_VERSION=${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
# HermesC is used to build hermes, so it has to be executable
chmod +x ./build_host_hermesc/bin/hermesc
if [[ "$SLICE" == "macosx" ]]; then
echo "[HERMES] Building Hermes for MacOS"
chmod +x ./utils/build-mac-framework.sh
BUILD_TYPE="${{ matrix.flavor }}" ./utils/build-mac-framework.sh
else
echo "[HERMES] Building Hermes for iOS: $SLICE"
chmod +x ./utils/build-ios-framework.sh
BUILD_TYPE="${{ matrix.flavor }}" ./utils/build-ios-framework.sh "$SLICE"
fi
@@ -199,8 +171,14 @@ jobs:
echo "Please try again"
exit 1
fi
- name: Upload Artifact for Slice (${{ matrix.slice }}, ${{ matrix.flavor }}}
uses: actions/upload-artifact@v4.3.1
with:
name: slice-${{ matrix.slice }}-${{ matrix.flavor }}
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }}
- name: Save slice cache
uses: actions/cache@v4.0.0
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
uses: actions/cache/save@v4.0.0
with:
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }}
@@ -223,14 +201,16 @@ jobs:
uses: ./.github/actions/setup-xcode
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Cache setup
id: cache_setup
uses: ./.github/actions/cache_setup
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Restore Cached Artifacts
uses: actions/cache/restore@v4.0.0
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
- name: Setup Hermes workspace
uses: ./.github/actions/setup_hermes_workspace
key: v3-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
path: |
/tmp/hermes/osx-bin/${{ matrix.flavor }}
/tmp/hermes/dSYM/${{ matrix.flavor }}
/tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ matrix.flavor }}.tar.gz
- name: Check if the required artifacts already exist
id: check_if_apple_artifacts_are_there
run: |
@@ -249,45 +229,46 @@ jobs:
echo "ARTIFACTS_EXIST=true" >> $GITHUB_OUTPUT
fi
- name: Yarn- Install Dependencies
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
run: yarn install --non-interactive
- name: Slice cache macosx
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
uses: actions/cache@v4.0.0
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4.1.3
with:
path: ./packages/react-native/sdks/hermes/build_macosx_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-macosx-${{ matrix.flavor }}
name: slice-macosx-${{ matrix.flavor }}
- name: Slice cache iphoneos
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
uses: actions/cache@v4.0.0
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4.1.3
with:
path: ./packages/react-native/sdks/hermes/build_iphoneos_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-iphoneos-${{ matrix.flavor }}
name: slice-iphoneos-${{ matrix.flavor }}
- name: Slice cache iphonesimulator
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
uses: actions/cache@v4.0.0
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4.1.3
with:
path: ./packages/react-native/sdks/hermes/build_iphonesimulator_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-iphonesimulator-${{ matrix.flavor }}
name: slice-iphonesimulator-${{ matrix.flavor }}
- name: Slice cache catalyst
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
uses: actions/cache@v4.0.0
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4.1.3
with:
path: ./packages/react-native/sdks/hermes/build_catalyst_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-catalyst-${{ matrix.flavor }}
name: slice-catalyst-${{ matrix.flavor }}
- name: Slice cache xros
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
uses: actions/cache@v4.0.0
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4.1.3
with:
path: ./packages/react-native/sdks/hermes/build_xros_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-xros-${{ matrix.flavor }}
name: slice-xros-${{ matrix.flavor }}
- name: Slice cache xrsimulator
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
uses: actions/cache@v4.0.0
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4.1.3
with:
path: ./packages/react-native/sdks/hermes/build_xrsimulator_${{ matrix.flavor }}
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-xrsimulator-${{ matrix.flavor }}
name: slice-xrsimulator-${{ matrix.flavor }}
- name: Move back build folders
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
run: |
ls -l ./packages/react-native/sdks/hermes
cd ./packages/react-native/sdks/hermes || exit 1
@@ -298,19 +279,23 @@ jobs:
mv build_xros_${{ matrix.flavor }} build_xros
mv build_xrsimulator_${{ matrix.flavor }} build_xrsimulator
- name: Prepare destroot folder
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
run: |
cd ./packages/react-native/sdks/hermes || exit 1
chmod +x ./utils/build-apple-framework.sh
. ./utils/build-apple-framework.sh
prepare_dest_root_for_ci
- name: Create fat framework for iOS
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
run: |
cd ./packages/react-native/sdks/hermes || exit 1
echo "[HERMES] Creating the universal framework"
chmod +x ./utils/build-ios-framework.sh
./utils/build-ios-framework.sh build_framework
chmod +x ./destroot/bin/hermesc
- name: Package the Hermes Apple frameworks
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
run: |
BUILD_TYPE="${{ matrix.flavor }}"
echo "Packaging Hermes Apple frameworks for $BUILD_TYPE build type"
@@ -334,18 +319,8 @@ jobs:
mkdir -p /tmp/hermes/osx-bin/${{ matrix.flavor }}
cp ./packages/react-native/sdks/hermes/build_macosx/bin/* /tmp/hermes/osx-bin/${{ matrix.flavor }}
ls -lR /tmp/hermes/osx-bin/
- name: Upload darwin artifacts
uses: actions/upload-artifact@v4.3.1
with:
name: hermes-darwin-bin-${{ matrix.flavor }}
path: /tmp/hermes/hermes-runtime-darwin
- name: Upload osx-bin
uses: actions/upload-artifact@v4.3.1
with:
name: hermes-osx-bin-${{ matrix.flavor }}
path: /tmp/hermes/osx-bin
- name: Create dSYM archive
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
run: |
FLAVOR=${{ matrix.flavor }}
WORKING_DIR="/tmp/hermes_tmp/dSYM/$FLAVOR"
@@ -377,6 +352,25 @@ jobs:
with:
name: hermes-dSYM-${{ matrix.flavor }}
path: /tmp/hermes/dSYM/${{ matrix.flavor }}
- name: Upload hermes Runtime artifacts
uses: actions/upload-artifact@v4.3.1
with:
name: hermes-darwin-bin-${{ matrix.flavor }}
path: /tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ matrix.flavor }}.tar.gz
- name: Upload hermes osx artifacts
uses: actions/upload-artifact@v4.3.1
with:
name: hermes-osx-bin-${{ matrix.flavor }}
path: /tmp/hermes/osx-bin/${{ matrix.flavor }}
- name: Upload Hermes Artifacts
uses: actions/cache/save@v4.0.0
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
with:
key: v3-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
path: |
/tmp/hermes/osx-bin/${{ matrix.flavor }}
/tmp/hermes/dSYM/${{ matrix.flavor }}
/tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ matrix.flavor }}.tar.gz
test_ios_rntester_ruby_3_2_0:
runs-on: macos-13
@@ -446,6 +440,9 @@ jobs:
build_hermesc_linux:
runs-on: ubuntu-latest
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
@@ -454,12 +451,8 @@ jobs:
sudo apt update
sudo apt install -y git openssh-client cmake build-essential \
libreadline-dev libicu-dev jq zip python3
- name: Cache setup
id: cache_setup
uses: ./.github/actions/cache_setup
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Linux cache
uses: actions/cache@v4.0.0
with:
@@ -493,18 +486,25 @@ jobs:
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: 'D:\tmp\hermes'
HERMES_TARBALL_ARTIFACTS_DIR: 'D:\tmp\hermes\hermes-runtime-darwin'
HERMES_OSXBIN_ARTIFACTS_DIR: 'D:\tmp\hermes\osx-bin'
ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip"
MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
CMAKE_DIR: 'C:\Program Files\CMake\bin'
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Cache setup
id: cache_setup
uses: ./.github/actions/cache_setup
- name: Download Previous Artifacts
uses: actions/download-artifact@v4
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
name: hermes-workspace
path: 'D:\tmp\hermes'
- name: Set up workspace
run: |
mkdir -p D:\tmp\hermes\osx-bin
mkdir -p .\packages\react-native\sdks\hermes
cp -r -Force D:\tmp\hermes\hermes\* .\packages\react-native\sdks\hermes\.
cp -r -Force .\packages\react-native\sdks\hermes-engine\utils\* .\packages\react-native\sdks\hermes\.
- name: Windows cache
uses: actions/cache@v4.0.0
with:
@@ -651,12 +651,12 @@ jobs:
uses: actions/download-artifact@v4.1.3
with:
name: hermes-osx-bin-Release
path: /tmp/hermes/osx-bin
path: /tmp/hermes/osx-bin/Release
- name: Download osx-bin debug artifacts
uses: actions/download-artifact@v4.1.3
with:
name: hermes-osx-bin-Debug
path: /tmp/hermes/osx-bin
path: /tmp/hermes/osx-bin/Debug
- name: Download darwin-bin release artifacts
uses: actions/download-artifact@v4.1.3
with:
@@ -689,12 +689,6 @@ jobs:
path: /tmp/hermes/linux64-bin
- name: Show /tmp/hermes directory
run: ls -lR /tmp/hermes
- name: Cache setup
id: cache_setup
uses: ./.github/actions/cache_setup
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
- name: Copy Hermes binaries
shell: bash
run: |
@@ -798,7 +792,7 @@ jobs:
-d "{\"event_type\": \"publish\", \"client_payload\": { \"version\": \"${{ github.ref_name }}\" }}"
test_android_helloworld:
runs-on: ubuntu-latest
runs-on: 4-core-ubuntu
needs: prepare_hermes_workspace
container:
image: reactnativecommunity/react-native-android:latest
+2 -2
View File
@@ -48,8 +48,8 @@
"@definitelytyped/dtslint": "^0.0.127",
"@jest/create-cache-key-function": "^29.6.3",
"@pkgjs/parseargs": "^0.11.0",
"@react-native/metro-babel-transformer": "0.75.0-main",
"@react-native/metro-config": "0.75.0-main",
"@react-native/metro-babel-transformer": "0.75.0-rc.4",
"@react-native/metro-config": "0.75.0-rc.4",
"@tsconfig/node18": "1.0.1",
"@types/react": "^18.2.6",
"@typescript-eslint/parser": "^7.1.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/assets-registry",
"version": "0.75.0-main",
"version": "0.75.0-rc.4",
"description": "Asset support code for React Native.",
"license": "MIT",
"repository": {
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-plugin-codegen",
"version": "0.75.0-main",
"version": "0.75.0-rc.4",
"description": "Babel plugin to generate native module and view manager code for React Native.",
"license": "MIT",
"repository": {
@@ -25,7 +25,7 @@
"index.js"
],
"dependencies": {
"@react-native/codegen": "0.75.0-main"
"@react-native/codegen": "0.75.0-rc.4"
},
"devDependencies": {
"@babel/core": "^7.20.0"
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/community-cli-plugin",
"version": "0.75.0-main",
"version": "0.75.0-rc.4",
"description": "Core CLI commands for React Native",
"keywords": [
"react-native",
@@ -22,10 +22,10 @@
"dist"
],
"dependencies": {
"@react-native-community/cli-server-api": "14.0.0-alpha.2",
"@react-native-community/cli-tools": "14.0.0-alpha.2",
"@react-native/dev-middleware": "0.75.0-main",
"@react-native/metro-babel-transformer": "0.75.0-main",
"@react-native-community/cli-server-api": "14.0.0-alpha.11",
"@react-native-community/cli-tools": "14.0.0-alpha.11",
"@react-native/dev-middleware": "0.75.0-rc.4",
"@react-native/metro-babel-transformer": "0.75.0-rc.4",
"chalk": "^4.0.0",
"execa": "^5.1.1",
"metro": "^0.80.3",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/core-cli-utils",
"version": "0.75.0-main",
"version": "0.75.0-rc.4",
"description": "React Native CLI library for Frameworks to build on",
"license": "MIT",
"main": "./src/index.flow.js",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/debugger-frontend",
"version": "0.75.0-main",
"version": "0.75.0-rc.4",
"description": "Debugger frontend for React Native based on Chrome DevTools",
"keywords": [
"react-native",
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/dev-middleware",
"version": "0.75.0-main",
"version": "0.75.0-rc.4",
"description": "Dev server middleware for React Native",
"keywords": [
"react-native",
@@ -23,7 +23,7 @@
],
"dependencies": {
"@isaacs/ttlcache": "^1.4.1",
"@react-native/debugger-frontend": "0.75.0-main",
"@react-native/debugger-frontend": "0.75.0-rc.4",
"chrome-launcher": "^0.15.2",
"chromium-edge-launcher": "^0.2.0",
"connect": "^3.6.5",
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-config",
"version": "0.75.0-main",
"version": "0.75.0-rc.4",
"description": "ESLint config for React Native",
"license": "MIT",
"repository": {
@@ -22,7 +22,7 @@
"dependencies": {
"@babel/core": "^7.20.0",
"@babel/eslint-parser": "^7.20.0",
"@react-native/eslint-plugin": "0.75.0-main",
"@react-native/eslint-plugin": "0.75.0-rc.4",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"eslint-config-prettier": "^8.5.0",
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-plugin",
"version": "0.75.0-main",
"version": "0.75.0-rc.4",
"description": "ESLint rules for @react-native/eslint-config",
"license": "MIT",
"repository": {
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-plugin-specs",
"version": "0.75.0-main",
"version": "0.75.0-rc.4",
"description": "ESLint rules to validate NativeModule and Component Specs",
"license": "MIT",
"repository": {
@@ -31,7 +31,7 @@
"@babel/eslint-parser": "^7.20.0",
"@babel/plugin-transform-flow-strip-types": "^7.20.0",
"@babel/preset-flow": "^7.20.0",
"@react-native/codegen": "0.75.0-main",
"@react-native/codegen": "0.75.0-rc.4",
"make-dir": "^2.1.0",
"pirates": "^4.0.1",
"source-map-support": "0.5.0"
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "helloworld",
"version": "0.75.0-main",
"version": "0.75.0-rc.4",
"private": true,
"scripts": {
"bootstrap": "node ./cli.js bootstrap",
@@ -13,16 +13,16 @@
},
"dependencies": {
"react": "19.0.0-rc-fb9a90fa48-20240614",
"react-native": "1000.0.0"
"react-native": "0.75.0-rc.4"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/babel-preset": "0.75.0-main",
"@react-native/core-cli-utils": "0.75.0-main",
"@react-native/eslint-config": "0.75.0-main",
"@react-native/metro-config": "0.75.0-main",
"@react-native/babel-preset": "0.75.0-rc.4",
"@react-native/core-cli-utils": "0.75.0-rc.4",
"@react-native/eslint-config": "0.75.0-rc.4",
"@react-native/metro-config": "0.75.0-rc.4",
"babel-jest": "^29.6.3",
"chalk": "^4.1.2",
"commander": "^12.0.0",
@@ -1,6 +1,6 @@
{
"name": "@react-native/hermes-inspector-msggen",
"version": "0.75.0-main",
"version": "0.75.0-rc.4",
"private": true,
"description": "Hermes Inspector Message Generator for React Native",
"license": "MIT",
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/metro-config",
"version": "0.75.0-main",
"version": "0.75.0-rc.4",
"description": "Metro configuration for React Native.",
"license": "MIT",
"repository": {
@@ -26,8 +26,8 @@
"dist"
],
"dependencies": {
"@react-native/js-polyfills": "0.75.0-main",
"@react-native/metro-babel-transformer": "0.75.0-main",
"@react-native/js-polyfills": "0.75.0-rc.4",
"@react-native/metro-babel-transformer": "0.75.0-rc.4",
"metro-config": "^0.80.3",
"metro-runtime": "^0.80.3"
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/normalize-colors",
"version": "0.75.0-main",
"version": "0.75.0-rc.4",
"description": "Color normalization for React Native.",
"license": "MIT",
"repository": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/js-polyfills",
"version": "0.75.0-main",
"version": "0.75.0-rc.4",
"description": "Polyfills for React Native.",
"license": "MIT",
"repository": {
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-preset",
"version": "0.75.0-main",
"version": "0.75.0-rc.4",
"description": "Babel preset for React Native applications",
"main": "src/index.js",
"repository": {
@@ -56,7 +56,7 @@
"@babel/plugin-transform-typescript": "^7.5.0",
"@babel/plugin-transform-unicode-regex": "^7.0.0",
"@babel/template": "^7.0.0",
"@react-native/babel-plugin-codegen": "0.75.0-main",
"@react-native/babel-plugin-codegen": "0.75.0-rc.4",
"babel-plugin-transform-flow-enums": "^0.0.2",
"react-refresh": "^0.14.0"
},
@@ -1,6 +1,6 @@
{
"name": "@react-native/metro-babel-transformer",
"version": "0.75.0-main",
"version": "0.75.0-rc.4",
"description": "Babel transformer for React Native applications.",
"main": "src/index.js",
"repository": {
@@ -16,7 +16,7 @@
"license": "MIT",
"dependencies": {
"@babel/core": "^7.20.0",
"@react-native/babel-preset": "0.75.0-main",
"@react-native/babel-preset": "0.75.0-rc.4",
"hermes-parser": "0.22.0",
"nullthrows": "^1.1.1"
},
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@react-native/bots",
"description": "React Native Bots",
"version": "0.75.0-main",
"version": "0.75.0-rc.4",
"private": true,
"license": "MIT",
"repository": {
@@ -1,6 +1,6 @@
{
"name": "@react-native/codegen-typescript-test",
"version": "0.75.0-main",
"version": "0.75.0-rc.4",
"private": true,
"description": "TypeScript related unit test for @react-native/codegen",
"license": "MIT",
@@ -19,7 +19,7 @@
"prepare": "yarn run build"
},
"dependencies": {
"@react-native/codegen": "0.75.0-main"
"@react-native/codegen": "0.75.0-rc.4"
},
"devDependencies": {
"@babel/core": "^7.20.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/codegen",
"version": "0.75.0-main",
"version": "0.75.0-rc.4",
"description": "Code generation tools for React Native",
"license": "MIT",
"repository": {
@@ -136,11 +136,11 @@ function translateFunctionParamToJavaType(
case 'NumberTypeAnnotation':
return wrapOptional('double', isRequired);
case 'FloatTypeAnnotation':
return wrapOptional('float', isRequired);
return wrapOptional('double', isRequired);
case 'DoubleTypeAnnotation':
return wrapOptional('double', isRequired);
case 'Int32TypeAnnotation':
return wrapOptional('int', isRequired);
return wrapOptional('double', isRequired);
case 'BooleanTypeAnnotation':
return wrapOptional('boolean', isRequired);
case 'EnumDeclaration':
@@ -334,9 +334,9 @@ function translateReturnTypeToJniType(
case 'DoubleTypeAnnotation':
return nullable ? 'Ljava/lang/Double;' : 'D';
case 'FloatTypeAnnotation':
return nullable ? 'Ljava/lang/Float;' : 'F';
return nullable ? 'Ljava/lang/Double;' : 'D';
case 'Int32TypeAnnotation':
return nullable ? 'Ljava/lang/Integer;' : 'I';
return nullable ? 'Ljava/lang/Double;' : 'D';
case 'PromiseTypeAnnotation':
return 'Lcom/facebook/react/bridge/Promise;';
case 'GenericObjectTypeAnnotation':
@@ -1,6 +1,6 @@
{
"name": "@react-native/gradle-plugin",
"version": "0.75.0-main",
"version": "0.75.0-rc.4",
"description": "Gradle Plugin for React Native",
"license": "MIT",
"repository": {
@@ -112,9 +112,15 @@ abstract class ReactSettingsExtension @Inject constructor(val settings: Settings
internal fun getLibrariesToAutolink(buildFile: File): Map<String, File> {
val model = JsonUtils.fromAutolinkingConfigJson(buildFile)
return model?.dependencies?.values?.associate { deps ->
":${deps.nameCleansed}" to File(deps.platforms?.android?.sourceDir)
} ?: emptyMap()
return model
?.dependencies
?.values
// We handle scenarios where there are deps that are
// iOS-only or missing the Android configs.
?.filter { it.platforms?.android?.sourceDir != null }
?.associate { deps ->
":${deps.nameCleansed}" to File(deps.platforms?.android?.sourceDir)
} ?: emptyMap()
}
internal fun computeSha256(lockFile: File) =
@@ -103,6 +103,35 @@ class ReactSettingsExtensionTest {
map[":react-native_oss-library-example"])
}
@Test
fun getLibrariesToAutolink_withiOSOnlyLibrary_returnsEmptyMap() {
val validJsonFile =
createJsonFile(
"""
{
"reactNativeVersion": "1000.0.0",
"dependencies": {
"@react-native/oss-library-example": {
"root": "./node_modules/@react-native/oss-library-example",
"name": "@react-native/oss-library-example",
"platforms": {
"ios": {
"podspecPath": "./node_modules/@react-native/oss-library-example/OSSLibraryExample.podspec",
"version": "0.0.1",
"configurations": [],
"scriptPhases": []
}
}
}
}
}
"""
.trimIndent())
val map = getLibrariesToAutolink(validJsonFile)
assertEquals(0, map.keys.size)
}
@Test
fun checkAndUpdateLockfiles_withNothingToCheck_returnsFalse() {
val project = ProjectBuilder.builder().build()
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "react-native-info",
"version": "1.0.0",
"version": "0.75.0-rc.4",
"main": "build/index.js",
"license": "MIT",
"private": true,
@@ -1,6 +1,6 @@
{
"name": "@react-native/popup-menu-android",
"version": "0.75.0-main",
"version": "0.75.0-rc.4",
"description": "PopupMenu for the Android platform",
"main": "index.js",
"files": [
@@ -17,7 +17,7 @@
],
"license": "MIT",
"devDependencies": {
"@react-native/codegen": "0.75.0-main"
"@react-native/codegen": "0.75.0-rc.4"
},
"peerDependencies": {
"@types/react": "^18.2.6",
@@ -1,6 +1,6 @@
{
"name": "@react-native/oss-library-example",
"version": "0.0.1",
"version": "0.75.0-rc.4",
"private": true,
"description": "Package that includes native module exapmle, native component example, targets both the old and the new architecture. It should serve as an example of a real-world OSS library.",
"license": "MIT",
@@ -26,8 +26,8 @@
],
"devDependencies": {
"@babel/core": "^7.20.0",
"@react-native/babel-preset": "0.75.0-main",
"react-native": "*"
"@react-native/babel-preset": "0.75.0-rc.4",
"react-native": "0.75.0-rc.4"
},
"peerDependencies": {
"react": "*",
@@ -1,7 +1,7 @@
{
"name": "@react-native/test-renderer",
"private": true,
"version": "0.75.0-main",
"version": "0.75.0-rc.4",
"description": "A Test rendering library for React Native",
"license": "MIT",
"devDependencies": {
+3 -3
View File
@@ -14,10 +14,10 @@ const version: $ReadOnly<{
patch: number,
prerelease: string | null,
}> = {
major: 1000,
minor: 0,
major: 0,
minor: 75,
patch: 0,
prerelease: null,
prerelease: 'rc.4',
};
module.exports = {version};
+8
View File
@@ -0,0 +1,8 @@
# Where is the template?
The React Native Template has moved from being shipping inside the [react-native](https://www.npmjs.com/package/react-native) package to it's own package: [@react-native-community/template](https://github.com/react-native-community/template).
## Why has it moved?
The [React Native Frameworks RFC0759](https://github.com/react-native-community/discussions-and-proposals/blob/main/proposals/0759-react-native-frameworks.md#evolving-the-react-native-community-template--cli) provides background information.
## When was it moved?
The 0.75 release.
@@ -21,10 +21,10 @@ NSDictionary* RCTGetReactNativeVersion(void)
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^(void){
__rnVersion = @{
RCTVersionMajor: @(1000),
RCTVersionMinor: @(0),
RCTVersionMajor: @(0),
RCTVersionMinor: @(75),
RCTVersionPatch: @(0),
RCTVersionPrerelease: [NSNull null],
RCTVersionPrerelease: @"rc.4",
};
});
return __rnVersion;
@@ -1,7 +1,7 @@
# Make sure we never publish ReactAndroid/build (Gradle output)
# or ReactAndroid/.cxx (CMake output) to npm.
# Those folders are huge (> 100MB)!
build/
/build/
.cxx/
# Exclude buck config/jars for third-party libraries
src/main/third-party/
@@ -2323,12 +2323,19 @@ public class com/facebook/react/devsupport/ReleaseDevSupportManager : com/facebo
public class com/facebook/react/devsupport/StackTraceHelper {
public static final field COLUMN_KEY Ljava/lang/String;
public static final field FILE_KEY Ljava/lang/String;
public static final field ID_KEY Ljava/lang/String;
public static final field IS_FATAL_KEY Ljava/lang/String;
public static final field LINE_NUMBER_KEY Ljava/lang/String;
public static final field MESSAGE_KEY Ljava/lang/String;
public static final field METHOD_NAME_KEY Ljava/lang/String;
public static final field STACK_KEY Ljava/lang/String;
public fun <init> ()V
public static fun convertJavaStackTrace (Ljava/lang/Throwable;)[Lcom/facebook/react/devsupport/interfaces/StackFrame;
public static fun convertJsStackTrace (Lcom/facebook/react/bridge/ReadableArray;)[Lcom/facebook/react/devsupport/interfaces/StackFrame;
public static fun convertJsStackTrace (Ljava/lang/String;)[Lcom/facebook/react/devsupport/interfaces/StackFrame;
public static fun convertJsStackTrace (Lorg/json/JSONArray;)[Lcom/facebook/react/devsupport/interfaces/StackFrame;
public static fun convertParsedError (Lcom/facebook/react/interfaces/exceptionmanager/ReactJsExceptionHandler$ParsedError;)Lcom/facebook/react/bridge/JavaOnlyMap;
public static fun formatFrameSource (Lcom/facebook/react/devsupport/interfaces/StackFrame;)Ljava/lang/String;
public static fun formatStackTrace (Ljava/lang/String;[Lcom/facebook/react/devsupport/interfaces/StackFrame;)Ljava/lang/String;
}
@@ -3779,8 +3786,8 @@ public abstract class com/facebook/react/runtime/JSRuntimeFactory {
}
public class com/facebook/react/runtime/ReactHostImpl : com/facebook/react/ReactHost {
public fun <init> (Landroid/content/Context;Lcom/facebook/react/runtime/ReactHostDelegate;Lcom/facebook/react/fabric/ComponentFactory;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Lcom/facebook/react/interfaces/exceptionmanager/ReactJsExceptionHandler;ZZ)V
public fun <init> (Landroid/content/Context;Lcom/facebook/react/runtime/ReactHostDelegate;Lcom/facebook/react/fabric/ComponentFactory;ZLcom/facebook/react/interfaces/exceptionmanager/ReactJsExceptionHandler;Z)V
public fun <init> (Landroid/content/Context;Lcom/facebook/react/runtime/ReactHostDelegate;Lcom/facebook/react/fabric/ComponentFactory;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;ZZ)V
public fun <init> (Landroid/content/Context;Lcom/facebook/react/runtime/ReactHostDelegate;Lcom/facebook/react/fabric/ComponentFactory;ZZ)V
public fun addBeforeDestroyListener (Lkotlin/jvm/functions/Function0;)V
public fun addReactInstanceEventListener (Lcom/facebook/react/ReactInstanceEventListener;)V
public fun createSurface (Landroid/content/Context;Ljava/lang/String;Landroid/os/Bundle;)Lcom/facebook/react/interfaces/fabric/ReactSurface;
@@ -1,4 +1,4 @@
VERSION_NAME=1000.0.0
VERSION_NAME=0.75.0-rc.4
react.internal.publishingGroup=com.facebook.react
android.useAndroidX=true
@@ -20,12 +20,14 @@ import java.util.Locale
public object AndroidUnicodeUtils {
@DoNotStrip
@JvmStatic
public fun localeCompare(left: String?, right: String?): Int {
val collator = Collator.getInstance()
return collator.compare(left, right)
}
@DoNotStrip
@JvmStatic
public fun dateFormat(unixtimeMs: Double, formatDate: Boolean, formatTime: Boolean): String {
val format =
when {
@@ -39,6 +41,7 @@ public object AndroidUnicodeUtils {
}
@DoNotStrip
@JvmStatic
public fun convertToCase(input: String, targetCase: Int, useCurrentLocale: Boolean): String {
// Note Java's case conversions use the user's locale. For example "I".toLowerCase()
// will produce a dotless i. From Java's docs: "To obtain correct results for locale
@@ -52,6 +55,7 @@ public object AndroidUnicodeUtils {
}
@DoNotStrip
@JvmStatic
public fun normalize(input: String?, form: Int): String =
when (form) {
FORM_C -> Normalizer.normalize(input, Normalizer.Form.NFC)
@@ -17,7 +17,6 @@ import com.facebook.react.bridge.ReactContext
import com.facebook.react.common.annotations.UnstableReactNativeAPI
import com.facebook.react.common.build.ReactBuildConfig
import com.facebook.react.fabric.ComponentFactory
import com.facebook.react.interfaces.exceptionmanager.ReactJsExceptionHandler
import com.facebook.react.runtime.JSCInstance
import com.facebook.react.runtime.ReactHostImpl
import com.facebook.react.runtime.cxxreactpackage.CxxReactPackage
@@ -74,8 +73,6 @@ public object DefaultReactHost {
reactPackages = packageList,
jsRuntimeFactory = jsRuntimeFactory,
turboModuleManagerDelegateBuilder = defaultTmmDelegateBuilder)
// TODO: T180971255 Improve default exception handler
val reactJsExceptionHandler = ReactJsExceptionHandler { _ -> }
val componentFactory = ComponentFactory()
DefaultComponentsRegistry.register(componentFactory)
// TODO: T164788699 find alternative of accessing ReactHostImpl for initialising reactHost
@@ -85,7 +82,6 @@ public object DefaultReactHost {
defaultReactHostDelegate,
componentFactory,
true /* allowPackagerServerAccess */,
reactJsExceptionHandler,
useDevSupport,
)
.apply {
@@ -8,12 +8,17 @@
package com.facebook.react.devsupport;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.JavaOnlyArray;
import com.facebook.react.bridge.JavaOnlyMap;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.ReadableType;
import com.facebook.react.common.MapBuilder;
import com.facebook.react.devsupport.interfaces.StackFrame;
import com.facebook.react.interfaces.exceptionmanager.ReactJsExceptionHandler.ParsedError;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.json.JSONArray;
@@ -23,8 +28,15 @@ import org.json.JSONObject;
/** Helper class converting JS and Java stack traces into arrays of {@link StackFrame} objects. */
public class StackTraceHelper {
public static final java.lang.String COLUMN_KEY = "column";
public static final java.lang.String LINE_NUMBER_KEY = "lineNumber";
public static final String COLUMN_KEY = "column";
public static final String LINE_NUMBER_KEY = "lineNumber";
public static final String FILE_KEY = "file";
public static final String METHOD_NAME_KEY = "methodName";
public static final String MESSAGE_KEY = "message";
public static final String STACK_KEY = "stack";
public static final String ID_KEY = "id";
public static final String IS_FATAL_KEY = "isFatal";
private static final Pattern STACK_FRAME_PATTERN1 =
Pattern.compile("^(?:(.*?)@)?(.*?)\\:([0-9]+)\\:([0-9]+)$");
@@ -246,4 +258,25 @@ public class StackTraceHelper {
return stackTrace.toString();
}
public static JavaOnlyMap convertParsedError(ParsedError error) {
List<ParsedError.StackFrame> frames = error.getFrames();
List<ReadableMap> readableMapList = new ArrayList<>();
for (ParsedError.StackFrame frame : frames) {
JavaOnlyMap map = new JavaOnlyMap();
map.putDouble(COLUMN_KEY, frame.getColumnNumber());
map.putDouble(LINE_NUMBER_KEY, frame.getLineNumber());
map.putString(FILE_KEY, (String) frame.getFileName());
map.putString(METHOD_NAME_KEY, (String) frame.getMethodName());
readableMapList.add(map);
}
JavaOnlyMap data = new JavaOnlyMap();
data.putString(MESSAGE_KEY, error.getMessage());
data.putArray(STACK_KEY, JavaOnlyArray.from(readableMapList));
data.putInt(ID_KEY, error.getExceptionId());
data.putBoolean(IS_FATAL_KEY, error.isFatal());
return data;
}
}
@@ -15,8 +15,8 @@ import java.util.Map;
public class ReactNativeVersion {
public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
"major", 1000,
"minor", 0,
"major", 0,
"minor", 75,
"patch", 0,
"prerelease", null);
"prerelease", "rc.4");
}
@@ -57,7 +57,6 @@ import com.facebook.react.devsupport.interfaces.DevSupportManager.PausedInDebugg
import com.facebook.react.fabric.ComponentFactory;
import com.facebook.react.fabric.FabricUIManager;
import com.facebook.react.interfaces.TaskInterface;
import com.facebook.react.interfaces.exceptionmanager.ReactJsExceptionHandler;
import com.facebook.react.interfaces.fabric.ReactSurface;
import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags;
import com.facebook.react.modules.appearance.AppearanceModule;
@@ -102,7 +101,6 @@ public class ReactHostImpl implements ReactHost {
private final Context mContext;
private final ReactHostDelegate mReactHostDelegate;
private final ComponentFactory mComponentFactory;
private final ReactJsExceptionHandler mReactJsExceptionHandler;
private final DevSupportManager mDevSupportManager;
private final Executor mBGExecutor;
private final Executor mUIExecutor;
@@ -145,7 +143,6 @@ public class ReactHostImpl implements ReactHost {
ReactHostDelegate delegate,
ComponentFactory componentFactory,
boolean allowPackagerServerAccess,
ReactJsExceptionHandler reactJsExceptionHandler,
boolean useDevSupport) {
this(
context,
@@ -153,7 +150,6 @@ public class ReactHostImpl implements ReactHost {
componentFactory,
Executors.newSingleThreadExecutor(),
Task.UI_THREAD_EXECUTOR,
reactJsExceptionHandler,
allowPackagerServerAccess,
useDevSupport);
}
@@ -164,7 +160,6 @@ public class ReactHostImpl implements ReactHost {
ComponentFactory componentFactory,
Executor bgExecutor,
Executor uiExecutor,
ReactJsExceptionHandler reactJsExceptionHandler,
boolean allowPackagerServerAccess,
boolean useDevSupport) {
mContext = context;
@@ -172,7 +167,6 @@ public class ReactHostImpl implements ReactHost {
mComponentFactory = componentFactory;
mBGExecutor = bgExecutor;
mUIExecutor = uiExecutor;
mReactJsExceptionHandler = reactJsExceptionHandler;
mQueueThreadExceptionHandler = ReactHostImpl.this::handleHostException;
mMemoryPressureRouter = new MemoryPressureRouter(context);
mAllowPackagerServerAccess = allowPackagerServerAccess;
@@ -1074,7 +1068,6 @@ public class ReactHostImpl implements ReactHost {
mComponentFactory,
devSupportManager,
mQueueThreadExceptionHandler,
mReactJsExceptionHandler,
mUseDevSupport,
getOrCreateReactHostInspectorTarget());
mReactInstance = instance;
@@ -10,6 +10,8 @@ package com.facebook.react.runtime;
import android.content.res.AssetManager;
import android.view.View;
import com.facebook.common.logging.FLog;
import com.facebook.fbreact.specs.NativeExceptionsManagerSpec;
import com.facebook.infer.annotation.Assertions;
import com.facebook.infer.annotation.Nullsafe;
import com.facebook.infer.annotation.ThreadConfined;
import com.facebook.infer.annotation.ThreadSafe;
@@ -21,6 +23,7 @@ import com.facebook.react.ViewManagerOnDemandReactPackage;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.JSBundleLoader;
import com.facebook.react.bridge.JSBundleLoaderDelegate;
import com.facebook.react.bridge.JavaOnlyMap;
import com.facebook.react.bridge.JavaScriptContextHolder;
import com.facebook.react.bridge.NativeArray;
import com.facebook.react.bridge.NativeMap;
@@ -35,6 +38,7 @@ import com.facebook.react.bridge.queue.QueueThreadExceptionHandler;
import com.facebook.react.bridge.queue.ReactQueueConfiguration;
import com.facebook.react.bridge.queue.ReactQueueConfigurationImpl;
import com.facebook.react.bridge.queue.ReactQueueConfigurationSpec;
import com.facebook.react.devsupport.StackTraceHelper;
import com.facebook.react.devsupport.interfaces.DevSupportManager;
import com.facebook.react.fabric.Binding;
import com.facebook.react.fabric.BindingImpl;
@@ -110,7 +114,6 @@ final class ReactInstance {
ComponentFactory componentFactory,
DevSupportManager devSupportManager,
QueueThreadExceptionHandler exceptionHandler,
ReactJsExceptionHandler reactExceptionManager,
boolean useDevSupport,
@Nullable ReactHostInspectorTarget reactHostInspectorTarget) {
mBridgelessReactContext = bridgelessReactContext;
@@ -154,6 +157,7 @@ final class ReactInstance {
// Notify JS if profiling is enabled
boolean isProfiling =
Systrace.isTracing(Systrace.TRACE_TAG_REACT_APPS | Systrace.TRACE_TAG_REACT_JS_VM_CALLS);
mHybridData =
initHybrid(
jsRuntimeFactory,
@@ -161,7 +165,7 @@ final class ReactInstance {
nativeModulesMessageQueueThread,
mJavaTimerManager,
jsTimerExecutor,
reactExceptionManager,
new ReactJsExceptionHandlerImpl(nativeModulesMessageQueueThread),
bindingsInstaller,
isProfiling,
reactHostInspectorTarget);
@@ -313,6 +317,29 @@ final class ReactInstance {
return mQueueConfiguration;
}
private class ReactJsExceptionHandlerImpl implements ReactJsExceptionHandler {
private final MessageQueueThread mNativemodulesmessagequeuethread;
ReactJsExceptionHandlerImpl(MessageQueueThread nativeModulesMessageQueueThread) {
this.mNativemodulesmessagequeuethread = nativeModulesMessageQueueThread;
}
@Override
public void reportJsException(ParsedError error) {
JavaOnlyMap data = StackTraceHelper.convertParsedError(error);
// Simulate async native module method call
mNativemodulesmessagequeuethread.runOnQueue(
() -> {
NativeExceptionsManagerSpec exceptionsManager =
(NativeExceptionsManagerSpec)
Assertions.assertNotNull(
mTurboModuleManager.getModule(NativeExceptionsManagerSpec.NAME));
exceptionsManager.reportException(data);
});
}
}
public void loadJSBundle(JSBundleLoader bundleLoader) {
// Load the JS bundle
Systrace.beginSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "ReactInstance.loadJSBundle");
@@ -7,11 +7,15 @@
package com.facebook.react.devsupport
import com.facebook.react.bridge.ReadableMap
import com.facebook.react.common.annotations.UnstableReactNativeAPI
import com.facebook.react.interfaces.exceptionmanager.ReactJsExceptionHandler.*
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
@OptIn(UnstableReactNativeAPI::class)
@RunWith(RobolectricTestRunner::class)
class StackTraceHelperTest {
@Test
@@ -58,4 +62,63 @@ class StackTraceHelperTest {
assertThat(frame.line).isEqualTo(-1)
assertThat(frame.column).isEqualTo(-1)
}
@Test
fun testConvertParsedError() {
val error = getParsedErrorTestData()
val data = StackTraceHelper.convertParsedError(error)
assertThat(data.getString("message")).isEqualTo("error message")
assertThat(data.getInt("id")).isEqualTo(123)
assertThat(data.getBoolean("isFatal")).isEqualTo(true)
val stack = data.getArray("stack")
assertThat(stack).isNotNull()
stack?.let {
assertThat(stack.size()).isEqualTo(2)
assertStackFrameMap(stack.getMap(0), "file1", "method1", 1, 10)
assertStackFrameMap(stack.getMap(1), "file2", "method2", 2, 20)
}
}
private fun assertStackFrameMap(
map: ReadableMap,
filename: String,
methodName: String,
lineNumber: Int,
columnNumber: Int
) {
assertThat(map.getString("file")).isEqualTo(filename)
assertThat(map.getString("methodName")).isEqualTo(methodName)
assertThat(map.getDouble("lineNumber").toInt()).isEqualTo(lineNumber)
assertThat(map.getDouble("column").toInt()).isEqualTo(columnNumber)
}
private fun getParsedErrorTestData(): ParsedError {
val frame1 =
object : ParsedError.StackFrame {
override val fileName = "file1"
override val methodName = "method1"
override val lineNumber = 1
override val columnNumber = 10
}
val frame2 =
object : ParsedError.StackFrame {
override val fileName = "file2"
override val methodName = "method2"
override val lineNumber = 2
override val columnNumber = 20
}
val frames = listOf(frame1, frame2)
return object : ParsedError {
override val frames = frames
override val message = "error message"
override val exceptionId = 123
override val isFatal = true
}
}
}
@@ -84,12 +84,7 @@ class ReactHostTest {
Mockito.doReturn(jSBundleLoader).`when`(reactHostDelegate).jsBundleLoader
reactHost =
ReactHostImpl(
activityController.get().application,
reactHostDelegate,
componentFactory,
false,
{},
false)
activityController.get().application, reactHostDelegate, componentFactory, false, false)
val taskCompletionSource = TaskCompletionSource<Boolean>().apply { setResult(true) }
mockedTaskCompletionSourceCtor =
Mockito.mockConstruction(
@@ -15,10 +15,10 @@
namespace facebook::react {
constexpr struct {
int32_t Major = 1000;
int32_t Minor = 0;
int32_t Major = 0;
int32_t Minor = 75;
int32_t Patch = 0;
std::string_view Prerelease = "";
std::string_view Prerelease = "rc.4";
} ReactNativeVersion;
} // namespace facebook::react
@@ -654,6 +654,20 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
return RD::getHostFunction(f);
};
bool hasNativeState(const Object& o) override {
Around around{with_};
return RD::hasNativeState(o);
};
std::shared_ptr<NativeState> getNativeState(const Object& o) override {
Around around{with_};
return RD::getNativeState(o);
};
void setNativeState(const Object& o, std::shared_ptr<NativeState> state)
override {
Around around{with_};
RD::setNativeState(o, state);
};
Value getProperty(const Object& o, const PropNameID& name) override {
Around around{with_};
return RD::getProperty(o, name);
@@ -410,4 +410,10 @@ SharedDebugStringConvertibleList ShadowNode::getDebugProps() const {
}
#endif
// Explicitly define destructors here, as they need to exist in order to act as
// a "key function" for the ShadowNodeWrapper class -- this allows for RTTI to
// work properly across dynamic library boundaries (i.e. dynamic_cast that is
// used by getNativeState method)
ShadowNodeWrapper::~ShadowNodeWrapper() = default;
} // namespace facebook::react
@@ -282,6 +282,11 @@ struct ShadowNodeWrapper : public jsi::NativeState {
explicit ShadowNodeWrapper(ShadowNode::Shared shadowNode)
: shadowNode(std::move(shadowNode)) {}
// The below method needs to be implemented out-of-line in order for the class
// to have at least one "key function" (see
// https://itanium-cxx-abi.github.io/cxx-abi/abi.html#vague-vtable)
~ShadowNodeWrapper() override;
ShadowNode::Shared shadowNode;
};
+12 -12
View File
@@ -1,6 +1,6 @@
{
"name": "react-native",
"version": "1000.0.0",
"version": "0.75.0-rc.4",
"description": "A framework for building native apps using React",
"license": "MIT",
"repository": {
@@ -109,16 +109,16 @@
},
"dependencies": {
"@jest/create-cache-key-function": "^29.6.3",
"@react-native-community/cli": "14.0.0-alpha.2",
"@react-native-community/cli-platform-android": "14.0.0-alpha.2",
"@react-native-community/cli-platform-ios": "14.0.0-alpha.2",
"@react-native/assets-registry": "0.75.0-main",
"@react-native/codegen": "0.75.0-main",
"@react-native/community-cli-plugin": "0.75.0-main",
"@react-native/gradle-plugin": "0.75.0-main",
"@react-native/js-polyfills": "0.75.0-main",
"@react-native/normalize-colors": "0.75.0-main",
"@react-native/virtualized-lists": "0.75.0-main",
"@react-native-community/cli": "14.0.0-alpha.11",
"@react-native-community/cli-platform-android": "14.0.0-alpha.11",
"@react-native-community/cli-platform-ios": "14.0.0-alpha.11",
"@react-native/assets-registry": "0.75.0-rc.4",
"@react-native/codegen": "0.75.0-rc.4",
"@react-native/community-cli-plugin": "0.75.0-rc.4",
"@react-native/gradle-plugin": "0.75.0-rc.4",
"@react-native/js-polyfills": "0.75.0-rc.4",
"@react-native/normalize-colors": "0.75.0-rc.4",
"@react-native/virtualized-lists": "0.75.0-rc.4",
"abort-controller": "^3.0.0",
"anser": "^1.4.9",
"ansi-regex": "^5.0.0",
@@ -137,7 +137,7 @@
"nullthrows": "^1.1.1",
"pretty-format": "^26.5.2",
"promise": "^8.3.0",
"react-devtools-core": "5.1.0",
"react-devtools-core": "^5.3.1",
"react-refresh": "^0.14.0",
"regenerator-runtime": "^0.13.2",
"scheduler": "0.25.0-rc-fb9a90fa48-20240614",
+2 -2
View File
@@ -31,9 +31,9 @@ program
'npx react-native config',
)
.option('--load-config <string>', 'JSON project config')
.action(async function handleAction(_, options) {
.action(async function handleAction() {
let config = null;
let options = program.opts();
if (options.loadConfig != null) {
config = JSON.parse(
options.loadConfig.replace(/^\W*'/, '').replace(/'\W*$/, ''),
@@ -419,10 +419,10 @@ class NewArchitectureTests < Test::Unit::TestCase
assert_false(is_enabled)
end
def test_newArchEnabled_whenRCTNewArchEnabledIsNotSet_returnTrue
def test_newArchEnabled_whenRCTNewArchEnabledIsNotSet_returnFalse
ENV["RCT_NEW_ARCH_ENABLED"] = nil
is_enabled = NewArchitectureHelper.new_arch_enabled
assert_true(is_enabled)
assert_false(is_enabled)
end
@@ -168,7 +168,7 @@ def link_native_modules!(config)
# Support passing in a path relative to the root of the package
if phase["path"]
phase["script"] = File.read(File.expand_path(phase["path"], package["root"]))
phase["script"] = File.read(File.expand_path(phase["path"], package[:path]))
phase.delete("path")
end
@@ -186,6 +186,6 @@ class NewArchitectureHelper
end
def self.new_arch_enabled
return ENV["RCT_NEW_ARCH_ENABLED"] == nil || ENV["RCT_NEW_ARCH_ENABLED"] == "1"
return ENV["RCT_NEW_ARCH_ENABLED"] == "1"
end
end
@@ -365,7 +365,7 @@ function computeOutputPath(projectRoot, baseOutputPath, pkgJson, platform) {
if (baseOutputPath == null) {
const outputDirFromPkgJson = readOutputDirFromPkgJson(pkgJson, platform);
if (outputDirFromPkgJson != null) {
baseOutputPath = outputDirFromPkgJson;
baseOutputPath = path.join(projectRoot, outputDirFromPkgJson);
} else {
baseOutputPath = projectRoot;
}
@@ -0,0 +1 @@
hermes-2024-07-01-RNv0.75.0-1edbe36ce92fef2c4d427f5c4e104f2758f4b692
-12
View File
@@ -1,12 +0,0 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
module.exports = {
placeholderName: 'HelloWorld',
titlePlaceholder: 'Hello App Display Name',
templateDir: './template',
};
-118
View File
@@ -1,118 +0,0 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
*/
import React from 'react';
import type {PropsWithChildren} from 'react';
import {
SafeAreaView,
ScrollView,
StatusBar,
StyleSheet,
Text,
useColorScheme,
View,
} from 'react-native';
import {
Colors,
DebugInstructions,
Header,
LearnMoreLinks,
ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';
type SectionProps = PropsWithChildren<{
title: string;
}>;
function Section({children, title}: SectionProps): React.JSX.Element {
const isDarkMode = useColorScheme() === 'dark';
return (
<View style={styles.sectionContainer}>
<Text
style={[
styles.sectionTitle,
{
color: isDarkMode ? Colors.white : Colors.black,
},
]}>
{title}
</Text>
<Text
style={[
styles.sectionDescription,
{
color: isDarkMode ? Colors.light : Colors.dark,
},
]}>
{children}
</Text>
</View>
);
}
function App(): React.JSX.Element {
const isDarkMode = useColorScheme() === 'dark';
const backgroundStyle = {
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
};
return (
<SafeAreaView style={backgroundStyle}>
<StatusBar
barStyle={isDarkMode ? 'light-content' : 'dark-content'}
backgroundColor={backgroundStyle.backgroundColor}
/>
<ScrollView
contentInsetAdjustmentBehavior="automatic"
style={backgroundStyle}>
<Header />
<View
style={{
backgroundColor: isDarkMode ? Colors.black : Colors.white,
}}>
<Section title="Step One">
Edit <Text style={styles.highlight}>App.tsx</Text> to change this
screen and then come back to see your edits.
</Section>
<Section title="See Your Changes">
<ReloadInstructions />
</Section>
<Section title="Debug">
<DebugInstructions />
</Section>
<Section title="Learn More">
Read the docs to discover what to do next:
</Section>
<LearnMoreLinks />
</View>
</ScrollView>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
sectionContainer: {
marginTop: 32,
paddingHorizontal: 24,
},
sectionTitle: {
fontSize: 24,
fontWeight: '600',
},
sectionDescription: {
marginTop: 8,
fontSize: 18,
fontWeight: '400',
},
highlight: {
fontWeight: '700',
},
});
export default App;
-8
View File
@@ -1,8 +0,0 @@
source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 2.6.10"
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
-79
View File
@@ -1,79 +0,0 @@
This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli).
# Getting Started
>**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding.
## Step 1: Start the Metro Server
First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native.
To start Metro, run the following command from the _root_ of your React Native project:
```bash
# using npm
npm start
# OR using Yarn
yarn start
```
## Step 2: Start your Application
Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app:
### For Android
```bash
# using npm
npm run android
# OR using Yarn
yarn android
```
### For iOS
```bash
# using npm
npm run ios
# OR using Yarn
yarn ios
```
If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly.
This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.
## Step 3: Modifying your App
Now that you have successfully run the app, let's modify it.
1. Open `App.tsx` in your text editor of choice and edit some lines.
2. For **Android**: Press the <kbd>R</kbd> key twice or select **"Reload"** from the **Developer Menu** (<kbd>Ctrl</kbd> + <kbd>M</kbd> (on Window and Linux) or <kbd>Cmd ⌘</kbd> + <kbd>M</kbd> (on macOS)) to see your changes!
For **iOS**: Hit <kbd>Cmd ⌘</kbd> + <kbd>R</kbd> in your iOS Simulator to reload the app and see your changes!
## Congratulations! :tada:
You've successfully run and modified your React Native App. :partying_face:
### Now what?
- If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps).
- If you're curious to learn more about React Native, check out the [Introduction to React Native](https://reactnative.dev/docs/getting-started).
# Troubleshooting
If you can't get this to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page.
# Learn More
To learn more about React Native, take a look at the following resources:
- [React Native Website](https://reactnative.dev) - learn more about React Native.
- [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment.
- [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**.
- [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts.
- [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native.
@@ -1,17 +0,0 @@
/**
* @format
*/
import 'react-native';
import React from 'react';
import App from '../App';
// Note: import explicitly to use the types shipped with jest.
import {it} from '@jest/globals';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
renderer.create(<App />);
});
@@ -1,2 +0,0 @@
BUNDLE_PATH: "vendor/bundle"
BUNDLE_FORCE_RUBY_PLATFORM: 1
-4
View File
@@ -1,4 +0,0 @@
module.exports = {
root: true,
extends: '@react-native',
};
-74
View File
@@ -1,74 +0,0 @@
# OSX
#
.DS_Store
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
**/.xcode.env.local
# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof
.cxx/
*.keystore
!debug.keystore
# node.js
#
node_modules/
npm-debug.log
yarn-error.log
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/
**/fastlane/report.xml
**/fastlane/Preview.html
**/fastlane/screenshots
**/fastlane/test_output
# Bundle artifact
*.jsbundle
# Ruby / CocoaPods
**/Pods/
/vendor/bundle/
# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*
# testing
/coverage
# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
-7
View File
@@ -1,7 +0,0 @@
module.exports = {
arrowParens: 'avoid',
bracketSameLine: true,
bracketSpacing: false,
singleQuote: true,
trailingComma: 'all',
};
@@ -1 +0,0 @@
{}
@@ -1,119 +0,0 @@
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"
/**
* This is the configuration block to customize your React Native Android app.
* By default you don't need to apply any configuration, just uncomment the lines you need.
*/
react {
/* Folders */
// The root of your project, i.e. where "package.json" lives. Default is '../..'
// root = file("../../")
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
// reactNativeDir = file("../../node_modules/react-native")
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
// codegenDir = file("../../node_modules/@react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
// cliFile = file("../../node_modules/react-native/cli.js")
/* Variants */
// The list of variants to that are debuggable. For those we're going to
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
// debuggableVariants = ["liteDebug", "prodDebug"]
/* Bundling */
// A list containing the node command and its flags. Default is just 'node'.
// nodeExecutableAndArgs = ["node"]
//
// The command to run when bundling. By default is 'bundle'
// bundleCommand = "ram-bundle"
//
// The path to the CLI configuration file. Default is empty.
// bundleConfig = file(../rn-cli.config.js)
//
// The name of the generated asset file containing your JS bundle
// bundleAssetName = "MyApplication.android.bundle"
//
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
// entryFile = file("../js/MyApplication.android.js")
//
// A list of extra flags to pass to the 'bundle' commands.
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
// extraPackagerArgs = []
/* Hermes Commands */
// The hermes compiler command to run. By default it is 'hermesc'
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
//
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]
/* Autolinking */
autolinkLibrariesWithApp()
}
/**
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
*/
def enableProguardInReleaseBuilds = false
/**
* The preferred build flavor of JavaScriptCore (JSC)
*
* For example, to use the international variant, you can use:
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
*
* The international variant includes ICU i18n library and necessary data
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
* give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc:+'
android {
ndkVersion rootProject.ext.ndkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion
namespace "com.helloworld"
defaultConfig {
applicationId "com.helloworld"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
}
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
implementation jscFlavor
}
}
@@ -1,10 +0,0 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
android:usesCleartextTraffic="true"
tools:targetApi="28"
tools:ignore="GoogleAppIndexingWarning"/>
</manifest>
@@ -1,26 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme"
android:supportsRtl="true">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
@@ -1,22 +0,0 @@
package com.helloworld
import com.facebook.react.ReactActivity
import com.facebook.react.ReactActivityDelegate
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
import com.facebook.react.defaults.DefaultReactActivityDelegate
class MainActivity : ReactActivity() {
/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
override fun getMainComponentName(): String = "HelloWorld"
/**
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
*/
override fun createReactActivityDelegate(): ReactActivityDelegate =
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
}
@@ -1,43 +0,0 @@
package com.helloworld
import android.app.Application
import com.facebook.react.PackageList
import com.facebook.react.ReactApplication
import com.facebook.react.ReactHost
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackage
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.soloader.SoLoader
class MainApplication : Application(), ReactApplication {
override val reactNativeHost: ReactNativeHost =
object : DefaultReactNativeHost(this) {
override fun getPackages(): List<ReactPackage> =
PackageList(this).packages.apply {
// Packages that cannot be autolinked yet can be added manually here, for example:
// add(MyReactNativePackage())
}
override fun getJSMainModuleName(): String = "index"
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
}
override val reactHost: ReactHost
get() = getDefaultReactHost(applicationContext, reactNativeHost)
override fun onCreate() {
super.onCreate()
SoLoader.init(this, false)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
}
}
}
@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
android:insetTop="@dimen/abc_edit_text_inset_top_material"
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
>
<selector>
<!--
This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
The item below with state_pressed="false" and state_focused="false" causes a NullPointerException.
NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'
<item android:state_pressed="false" android:state_focused="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
For more info, see https://bit.ly/3CdLStv (react-native/pull/29452) and https://bit.ly/3nxOMoR.
-->
<item android:state_enabled="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
<item android:drawable="@drawable/abc_textfield_activated_mtrl_alpha"/>
</selector>
</inset>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

@@ -1,3 +0,0 @@
<resources>
<string name="app_name">Hello App Display Name</string>
</resources>
@@ -1,9 +0,0 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
</style>
</resources>
@@ -1,21 +0,0 @@
buildscript {
ext {
buildToolsVersion = "34.0.0"
minSdkVersion = 23
compileSdkVersion = 34
targetSdkVersion = 34
ndkVersion = "26.1.10909125"
kotlinVersion = "1.9.24"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
}
}
apply plugin: "com.facebook.react.rootproject"
@@ -1,39 +0,0 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
# ./gradlew <task> -PreactNativeArchitectures=x86_64
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
# Use this property to enable support to the new architecture.
# This will allow you to use TurboModules and the Fabric render in
# your application. You should enable this flag either if you want
# to write custom TurboModules/Fabric components OR use libraries that
# are providing them.
newArchEnabled=true
# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
hermesEnabled=true

Some files were not shown because too many files have changed in this diff Show More