react-native-macos/ReactAndroid
Ramanpreet Nara b978308519 Introduce ReactContext.getNativeModules()
Summary:
## Rationale
The CatalystInstance exposes a public API that returns a list of all instantiated NativeModules: [CatalystInstance.getNativeModules()](https://www.internalfb.com/code/fbsource/[d9cd2e5dd41fc3e3022bfb777c8b31c92af8c537]/xplat/js/react-native-github/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstance.java?lines=73).

This enables a use-case: process all NativeModules that conform to a particular interface, to, for example, remove sensitive data before logging out.

## Changes
This diff moves that CatalystInstance.getNativeModules() API into the ReactContext. This allows us to migrate NativeModules leveraging this use-case off of ReactContext.getCatalystInstance(), which makes them bridgeless-mode compatible.

Changelog: [Android][Added] Introduce ReactContext.getNativeModules()

Reviewed By: sshic

Differential Revision: D35286940

fbshipit-source-id: 1b64351aa3f65ee59e6438a7a95974e219ccc69c
2022-04-01 21:14:22 -07:00
..
hermes-engine Use `findByName` instead of `named` when applying Gradle task dependencies 2022-03-22 04:48:52 -07:00
libs Upgrade Android support library to version 28 in RN 2019-01-22 10:44:53 -08:00
src Introduce ReactContext.getNativeModules() 2022-04-01 21:14:22 -07:00
.npmignore Do not bundle ReactAndroid/.cxx inside the npm package 2022-03-24 05:02:28 -07:00
Android-prebuilt.mk Separate folly into runtime + folly_futures specific for hermes inspector 2022-03-13 15:15:21 -07:00
DevExperience.md Fix Dead links to documents in the comments (#32619) 2021-11-22 03:31:10 -08:00
README.md docs: Fix dead links in README for rn-tester (#31901) 2021-07-27 11:01:47 -07:00
build.gradle Reintroduce missing dependency between configureCMakeDebug and preBuild 2022-03-30 07:22:09 -07:00
gradle.properties build(deps): Bump android Appcompat to 1.4.1 (#33072) 2022-02-10 09:52:59 -08:00
proguard-rules.pro Cleanup OSS proguard rules and add @DoNotStripAny 2022-02-02 12:54:34 -08:00

README.md

Building React Native for Android

See the docs on the wiki.

Running tests

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