Files
react-native/ReactAndroid
Ramanpreet Nara 608cf6fe09 Make CompositeReactPackage support TurboReactPackage
Summary:
## Description
CompositeReactPackage will now eagerly initialize all NativeModules inside the TurboReactPackages. Before it would just crash the program because calling `createNativeModules()` on the TurboReactPackage instance. Longer term, we should make CompositeReactPackage a TurboReactPackage.

## Why am I making this change?
I made MainReactPackage into a TurboReactPackge. But ExpressWifiTechnician uses MainReactPackage to create a CompositeReactPackage:

**java/com/expresswifi/technician/MainActivity.java**
```
protected ReactPackage getPackage() {
  ReactInstanceManager reactInstanceManager = getReactInstanceManager();
  Nullable DevSupportManager devSupportManager = null;
  if (reactInstanceManager != null) {
    devSupportManager = reactInstanceManager.getDevSupportManager();
  }

  return new CompositeReactPackage(
      super.getPackage(),
      mXWFTechnicianReactPackage,
      new RNFusedLocationPackage(),
      mXWFTechnicialMobileConfigPackageProvider.get(devSupportManager));
}
```

**java/com/facebook/catalyst/shell/MainReactActivity.java**
```
public abstract class MainReactActivity extends AbstractReactActivity {
  protected ReactPackage getPackage() {
    return new MainReactPackage();
  }
}
```

Reviewed By: fkgozali

Differential Revision: D15738677

fbshipit-source-id: 3220dfe6434de56f2917c77fb21acef4cfc79278
2019-06-10 10:52:46 -07:00
..
2018-05-27 15:17:55 -07:00

Building React Native for Android

See the docs on the website.

Running tests

When you submit a pull request CircleCI will automatically run all tests. To run tests locally, see Testing.