mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
c085068d7b
Summary: Introduced `architecture.gradle` that sets up pluggable build-time codegen steps for Gradle so that: * Libraries, including core ReactAndroid, can produce the new architecture codegen (NativeModule **Java** specs in this diff) during build time * Hosting app (e.g. RNTester) can produce its own set of codegen specs separately **Please note that this is still work in progress, hence app templates have not been updated to use it yet.** In order to activate this setup, the env variable `USE_CODEGEN=1` must be set. Eventually, this var will be removed from the logic. With this change, RNTester: * Will see all the generated specs populated in the Gradle build dir, which should be equivalent to the currently [**checked in version**](https://github.com/facebook/react-native/tree/master/ReactAndroid/src/main/java/com/facebook/fbreact/specs). * The specs will compile, but **have not been validated** vs the existing NativeModule .java classes through out the core -- that will be the next step * The specs are under `com.facebook.fbreact.specs.beta` namespace, which will be configurable in the future. `.beta` is added to avoid conflict with the existing files in the repo. ### Is this all we need to enable TurboModule in Android? No. There are a few more pieces needed: * C++ codegen output for JNI layer for each NativeModule spec * The C++ module lookup for TurboModule Manager * The JNI build setup in Gradle for these C++ output * Toggle to enable TurboModule system in the entire app Changelog: [Internal] Reviewed By: JoshuaGross Differential Revision: D22838581 fbshipit-source-id: d972e2fbb37bdbd3354e72b014fc8bb27a33b9ac
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.