mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
f0b7cbe22e
Summary: This is the 2nd iteration of D39468561 (https://github.com/facebook/react-native/commit/4d1a56813c7975c848631de331e424587054fd57). We first check if the `BridgeDevSupportManager` can be used before we return the `PerfTestDevSupportManager`. This is to avoid a breakage of Quantum that happened on the previous diff. Add a `DevSupportManager` that can be used for performance testing. This `DevSupportManager` allows the inspector connection to be established, but leaves everything else disabled. Previously, if Developer Support was enabled on a release build, the application would present an error as it unsuccessfully attempted to use the bridge dev support manager. This is now conceptually the new flow for deciding what DevSupportManager to choose. ``` if (developerSupportEnabled) { if (full support available) { use full support (i.e. bridge) } else { use profiling-only support (i.e. perftest) } } else { disable dev support } ``` The first attempt at this diff erroneously used this logic: ``` if (developerSupportEnabled) { if (debug build) { use full support (i.e. bridge) } else { use profiling-only support (i.e. perftest) } } else { disable dev support } ``` So now we are always checking to see if the `BridgeDevSupportManager` is available, and if it is, we use it. (`enableOnCrease` indicates the development mode setting: https://www.internalfb.com/code/fbsource/[6b8a941fdf2a0fd58d9db36f5a59fa5fb53ad2df]/xplat/js/react-native-github/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java?lines=259) Changelog: [internal] Reviewed By: makovkastar Differential Revision: D40948243 fbshipit-source-id: 50c6b6b905f5b9c5b5ecc090b36edbd6090ea774
Building React Native for Android
See the Building from Source guide on the React Native website.
Running tests
When you submit a pull request CircleCI will automatically run all tests. To run tests locally, see Testing guide on the React Native website.