Summary:
The `:reactNativePath` provided by `use_native_modules!` is the rn module path relative to the installation root (usually `./ios`). However, when executing cocoapods from a dir thats not the installation root, packages that use the relative `:reactNativePath` variable in their path must also consider the relative to pwd installation root.
This fixes usage of cocoapods with the `--project-directory` flag like
```bash
bundle exec pod install --project-directory=ios
```
## Changelog
[iOS] [Fixed] - Fix usage of cocoapods with --project-directory flag and new arch
Pull Request resolved: https://github.com/facebook/react-native/pull/33399
Test Plan:
1) Enable the new arch
2) Execute from the projects root dir
```bash
bundle exec pod install --project-directory=ios
```
3) It will fail with
```
[!] Invalid `Podfile` file: [codegen] Couldn't not find react-native-codegen..
```
4) Apply the patch
5) Execute from the projects root dir
```bash
bundle exec pod install --project-directory=ios
```
6) It will succeed
Reviewed By: ShikaSD
Differential Revision: D34784966
Pulled By: dmitryrykun
fbshipit-source-id: d6d5e71bc2fcd32f2cd60a498f39e6f772fc9005
Summary:
Rearranges folly_futures configuration into a static library only required for `hermes-inspector` + `folly_runtime` which merges `folly_json` and mutex-related implementations `folly_futures` was used for. As `hermes-executor-debug` is removed by `vmCleanup` configurations later, it allows to shave additional 300KB from the release APK size.
Changelog: [Internal] - Rearrange folly build to reduce APK size
Reviewed By: cortinico
Differential Revision: D34342514
fbshipit-source-id: b646680343e6b9a7674019506b87b96f6007caf2
Summary:
Due to a bug with AGP, the configureNdkBuild* tasks are not depending on
preBuild tasks. We need to manually fix this otherwise the build will fail the
first time the NDK is invoked.
More on this here: https://issuetracker.google.com/issues/207403732
Changelog:
[Android] [Fixed] - Make sure configureNdkBuild* tasks are depending on
preBuild in the Android template.
Reviewed By: passy
Differential Revision: D34578860
fbshipit-source-id: 5d4caa7d2b7a976b1c9caa6dce8e186c1486cafa
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33196
Fixes compilation of Android template and renames the field according to Java guidelines.
Changelog: [Android][Changed] - Rename field with default values for ReactConfig to DEFAULT_CONFIG
Reviewed By: cortinico
Differential Revision: D34523356
fbshipit-source-id: 46ed703e7ca8ab5e05879dd93e8e4d2d816c2d03
Summary:
While React Native depends on the `metro` package indirectly (via the CLI package), it depends on some secondary Metro packages directly. This diff updates those direct dependencies to use [Metro 0.69.0](https://github.com/facebook/metro/releases/tag/v0.69.0).
Changelog:
[General] Update direct Metro dependencies to 0.69.0
Reviewed By: motiz88
Differential Revision: D34520074
fbshipit-source-id: 93b9f5fa8ccc65132c9c96b23080edb5a339d5ce
Summary:
See https://docs.fastlane.tools/best-practices/source-control/
This commit reflects the best practices as outlined by fastlane.
## Changelog
[iOS] [Fixed] - Improved template fastlane gitignore
Pull Request resolved: https://github.com/facebook/react-native/pull/33186
Test Plan: no test plan
Reviewed By: cortinico
Differential Revision: D34518831
Pulled By: motiz88
fbshipit-source-id: eee1d332f24caa37bc48fd058bf0eb0e73f6bc1b
Summary:
Doing this patch level bump to ensure that all packages consuming `react-native` will get `7.0.3` and not lower 7.x versions.
This is because this new patch contains this fix: https://github.com/react-native-community/cli/pull/1560
(thanks NickGerleman & thymikee for your work!)
We'll have to cherry-pick this into the 0.68 branch.
While at it, I've also done a cheeky `npx yarn-deduplicate` to clean up the `yarn.lock` a bit.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[General] [Changed] - Bump RN CLI to v7.0.3 to address web debugging issue
Pull Request resolved: https://github.com/facebook/react-native/pull/33156
Test Plan:
CI + some local testing via `test-manual-e2e`:
<img width="1779" alt="Screenshot 2022-02-21 at 11 40 54" src="https://user-images.githubusercontent.com/16104054/154948695-8c40bb56-87eb-4326-a740-49930994c08b.png">
Reviewed By: cortinico
Differential Revision: D34385503
Pulled By: motiz88
fbshipit-source-id: f0d8c4e0e92f83c0d819eeaa0fbec27820145968
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33134
When a user is enabling New Architecture, we should make sure they don't accidentally mix
imports of React Native from source vs prebuilts.
With this resolution strategy, we'll make sure all the import of `com.facebook.react:react-native:+`
will be resolved to the correct dependency.
Changelog:
[Android] [Fixed] - Set a resolution strategy for com.facebook.react:react-native when on New Architecture
Reviewed By: ShikaSD
Differential Revision: D34303267
fbshipit-source-id: 492fec59175c5887571e1b09ca8e233584b45dd1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33108
The codegen config is optional and can be removed from the default package.json configuration in the template to simplify 0.68 upgrade for people who are not opted-in to the new arch.
Changelog: [Internal] - Remove optional codegenConfig field from template
Reviewed By: cortinico
Differential Revision: D34216988
fbshipit-source-id: 5c448472eed99bc112aef204c4025454171a83c5
Summary:
While React Native depends on the `metro` package indirectly (via the CLI package), it depends on some secondary Metro packages directly. This diff updates those direct dependencies to use [Metro 0.68.0](https://github.com/facebook/metro/releases/tag/v0.68.0).
Changelog:
[General] Update direct Metro dependencies to 0.68.0
Reviewed By: motiz88
Differential Revision: D34108380
fbshipit-source-id: 06bddfcc16e0f715d6d120e48b37c64fda300c38
Summary:
We should now be able to remove the explicit `react-native-gradle-plugin` dependency
from the `template/package.json` file.
Changelog:
[Android] [Changed] - Remove `react-native-gradle-plugin` as a dependency from template's package.json
Reviewed By: motiz88
Differential Revision: D34050589
fbshipit-source-id: c8d4e4fba481af6b56723906b71411132d60aded
Summary:
Probably my smallest PR yet, this just fixes a comment in the template's Java files.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[CATEGORY] [TYPE] - Message
Pull Request resolved: https://github.com/facebook/react-native/pull/33050
Reviewed By: christophpurrer
Differential Revision: D34045805
Pulled By: cortinico
fbshipit-source-id: a7355b4dbae84b79ee9d68e2524393d03cda67fc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33038
While rolling out RN 0.68.x we noticed that `libhermes.so` and `libjsc.so` were included
inside the final .aar we publish to NPM. This forced users (on both old or new arch) to
specify a `pickFirst` directive inside their packaging option (which is unpractical and
risky as the two .so might not be compatible each other if they're coming from
different Hermes/JSC versions).
Changelog:
[Android] [Fixed] - Do not bundle libhermes.so or libjsc.so inside the React Native Android AAR
Reviewed By: ShikaSD
Differential Revision: D33979107
fbshipit-source-id: 0b71d59f210b8bc9903cd0f30ed6e2120aab99e0
Summary:
Updates maximum heap size for the gradle build to account for building RN from source when new architecture is enabled.
Changelog: [Changed][Android] - Use 2g as a default heap size for gradle builds
Reviewed By: cortinico
Differential Revision: D33947090
fbshipit-source-id: 2f551e688f2d92c3092e053086f6933779cd6f63
Summary:
While React Native depends on the `metro` package indirectly (via the CLI package), it depends on some secondary Metro packages directly. This diff updates those direct dependencies to use [Metro 0.67.0](https://github.com/facebook/metro/releases/tag/v0.67.0).
Changelog:
[General] Update direct Metro dependencies to 0.67.0
Reviewed By: GijsWeterings
Differential Revision: D33828217
fbshipit-source-id: e4e9ba4cf43a8588f8db43885f67d4dc606198f5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32923
As our Flipper version is quite old, let's bump it to one of the latest stable: 0.125.0
This required to update also the following:
- Flipper-Folly to 2.6.10 - This was needed as I aligned the versions to https://github.com/facebook/flipper/blob/v0.125.0/react-native/ReactNativeFlipperExample/ios/Podfile
- OpenSSL-Universal to 1.1.1100 - This was required with the `pod update` command
I've picked 0.125.0 as 0.127.x and following are crashing on Android
and will potentially require a bump of the NDK to r23:
See: https://github.com/facebook/flipper/issues/3245
Changelog:
[General] [Changed] - Bump Flipper to 0.125.0
allow-large-files
Reviewed By: mdvacca
Differential Revision: D33583090
fbshipit-source-id: 2a2020c3213273087ec4a152076f846e35e275c5
Summary:
I'm bumping the Gradle Plugin to the latest stable. That's needed as the newest
plugin now specifies a Maven `group` and can leverage implicit dependency substitution.
Changelog:
[Internal] [Changed] - Bump gradle-plugin to 0.0.4
Reviewed By: ShikaSD
Differential Revision: D33530286
fbshipit-source-id: 904f0a6585b468322f611ed82c57cee7025305d7
Summary:
Previously we asked users to specify a dependency substitution
rule to properly use the React Native Gradle Plugin.
Here I'm updating the Gradle Plugins setup to allow to use implicit
dependency substitution. This requires to specify a Maven Group and Artifact
Name (through the project name).
This is backward compatible as users will still be allowed to specify a
dependency substitution rule if they wish.
Changelog:
[Android] [Changed] - Leverage Gradle implicit dependency substitution for Gradle Plugin
Reviewed By: ShikaSD
Differential Revision: D33404948
fbshipit-source-id: 3323f8e0738fd579ce8ae344cbdc0e4356e7dbd8
Summary:
Let's keep our Gradle infra deps up to date.
I'm bumping Gradle to 7.3.3 which fixes several Log4j CVEs,
AGP to 7.0.4 and the Download Task plugin to 4.1.2
Changelog:
[Android] [Changed] - Bump Gradle to 7.3.3 and AGP to 7.0.4
Reviewed By: mdvacca
Differential Revision: D33430789
fbshipit-source-id: b8f260beb4a9cc962ea3743610bfb4ead004d6cb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32790
As the name says, I've added a `newArchEnabled` property that can be used to toggle the
New Architecture in the new app template. Users can use this to try the New Architecture in their
project by either:
* Set `newArchEnabled` to true inside the `gradle.properties` file
* Invoke gradle with `-PnewArchEnabled=true`
* Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
The Project property will also control if:
* ReactNative dependency should be built from source or not.
* The NDK should be enabled or not.
Please note that this requires RN 0.68.x to run properly (it won't work with 0.67 RCs) or a Nightly version of React Native.
Changelog:
[Android] [Added] - Setup a `newArchEnabled` property to Opt-in the New Architecture in the template
Reviewed By: ShikaSD
Differential Revision: D33065373
fbshipit-source-id: 32085f5b071d6243936bafd91425b5b43e5b5101
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32777
Changelog: [iOS][Added] Added the new architecture support to the new app template. To apply this change to your project, you will need to update your Podfile. You can try it by using "RCT_NEW_ARCH_ENABLE=1 pod instal" command which updates necessary C++ flags and enable the new codegen discovery required for the new architecture. As context, We've modified the iOS template to have code required to enable the new architecture (aka Turbo modules and fabric / renderer) which requires updating AppDelegate. We also added the support in RNTester as well. We will be sharing more documentation about the new architecture.
Reviewed By: dmitryrykun
Differential Revision: D33154825
fbshipit-source-id: a46b98308e9d29780b6a5245e8faa8be1e257802
Summary:
Changelog: [internal] Refactor RCTAppSetupUtils to c functions.
Since RCTAppSetupUtils doesn't retain any states, we don't need it to be a class.
Reviewed By: philIip
Differential Revision: D33084352
fbshipit-source-id: 1372a2737eafffa46ee6e5164a970dd12699c71c
Summary: Changelog: [internal] Changed teh new architecture flag in the new app template to RCT_NEW_ARCH_ENABLED
Reviewed By: philIip
Differential Revision: D33083694
fbshipit-source-id: f2cc6c564c724b4ebed7b465a533464b6717ac27
Summary:
Changelog: [internal] Added fabric option to the default app template.
Use RCT_TM_FABRIC_ENABLED C++ flag to enable fabric.
Reviewed By: sammy-SC
Differential Revision: D33052956
fbshipit-source-id: 28313829c80abcf02baa521bdb0b70213c94a97f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32752
Changelog: [internal] Add an optional support for Turbomodule. Define RCT_TM_FABRIC_ENABLED to enable the new architecture.
Reviewed By: philIip
Differential Revision: D33052777
fbshipit-source-id: 6d32790586bb51f9c9244344522c95245c912114
Summary: Changelog: [internal] removed babel-plugin-codegen from the dependency. The dependency will exist in the app template.
Reviewed By: lunaleaps
Differential Revision: D33138950
fbshipit-source-id: f71fa4ca55d13715ccd1ade1424bc3cddbb10d1a
Summary:
Changelog: [internal] Move initital setups in AppDelegate to util classes.
This will make it easy to apply the new architecture changes in the future.
Reviewed By: cortinico
Differential Revision: D33051517
fbshipit-source-id: 16e326b7816fae83df65450c545e7dce1a93b9d0
Summary:
Changelog: [Internal] changing the extention from AppDelegate.m to AppDelegate.mm in the app template to support the new architecture.
Most changes were generated when opening the xcworkspace.
Reviewed By: cortinico
Differential Revision: D33051442
fbshipit-source-id: f472a9df26db11a02fc9f7d0544f0207e7c3e7ca
Summary:
Bump Android Gradle Plugin to 7.
## Changelog
[Android] [Changed] - Bump Android Gradle Plugin to 7.
This will make Java 11 a requirement for users that are either:
* Cloning react-native to contribute
* Using react-native while building from source.
* Creating new project from the template.
Pull Request resolved: https://github.com/facebook/react-native/pull/32589
Test Plan: CI is green
Reviewed By: ShikaSD
Differential Revision: D32427945
Pulled By: cortinico
fbshipit-source-id: c1ea464d87c3e397616c55154b3d8b1c3ea6c592
Summary:
Bump Gradle to 7.3, also configure gradle cache key to include gradle version so that we don't keep cache for other versions and have smaller cache, faster CI.
## Changelog
[Android] [Changed] - Bump Gradle to 7.3
Pull Request resolved: https://github.com/facebook/react-native/pull/32588
Test Plan: CI is green
Reviewed By: ShikaSD
Differential Revision: D32427806
Pulled By: cortinico
fbshipit-source-id: 776406ef3aa7962cf3a4abc178e3c8a4762a01e0
Summary:
Upgrades ESLint to v7.28.0. This is the latest version before v8.0.0, which would be a more involved upgrade.
Upgrades all ESLint-related dependencies to their latest version, except for [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype/). This is because eslint-plugin-flowtype@8.0.0 dropped support for ESLint v7.
Configures ESLint for Metro to extend `plugin:prettier/recommended`.
## Changelog
[General][Changed] - Upgraded packages to the latest versions for ESLint v7.
Pull Request resolved: https://github.com/facebook/react-native/pull/32560
Test Plan:
Run this on an open source checkout of `facebook/react-native`:
```
# See no new errors or warnings.
$ yarn run lint
```
Run this internally:
```
$ js1 test xplat/js/tools/__tests__/dependency-constraints-test.js
```
Verify linting works:
```
js1 lint xplat/js/RKJSModules/Libraries/Core/
```
Reviewed By: lunaleaps
Differential Revision: D32258399
Pulled By: yungsters
fbshipit-source-id: d11b3fc3e33770157a90f3dee352cf80b39c442c