mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
c7d969f31b
Summary: Fix https://github.com/facebook/react-native/issues/40560 ## Changelog: [ANDROID] [FIXED] - Ensure that `configureJavaToolChains` is only executed once during configuration Pull Request resolved: https://github.com/facebook/react-native/pull/40757 Test Plan: - Create a fresh `react-native@0.73.0-rc.1` project - Install `react-native-webview` - Apply [this patch](https://github.com/react-native-webview/react-native-webview/pull/3175/files) for `react-native-webview` (caused by another issue https://github.com/facebook/react-native/issues/40559) - Edit `android/gradle.properties` and set `newArchEnabled` to true - Build application - (Expected) Application fail to build - Apply this PR - (Expected) Application build successfully **Additional explanation:** According to the implementation of `configureJavaToolChains`, all the subprojects (both the app and the libraries) will have their toolchains setup in one execution of the method. Therefore, it is okay for the method to be invoked only when configuring the plugin for the app. On the other hand, invoking the method for more than one time will cause the issue stated in https://github.com/facebook/react-native/issues/40560. Reviewed By: cipolleschi Differential Revision: D50361871 Pulled By: cortinico fbshipit-source-id: bd5e18df97988122788d0482dba954e517a0cb5c
@react-native/gradle-plugin
A Gradle Plugin used to support development of React Native applications for Android.
Installation
yarn add @react-native/gradle-plugin
Note: We're using yarn to install deps. Feel free to change commands to use npm 3+ and npx if you like
Testing
To run the tests in this package, run the following commands from the React Native root folder:
yarnto install the dependencies. You just need to run this onceyarn jest packages/react-native-gradle-plugin.