mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Buck, etc. changes that enable persisted, sync settings for DevTools (#35163)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/35163 # What This diff contains all the changes from D40333083 (https://github.com/facebook/react-native/commit/0fac9817df403e31d8256befe52409c948614706) (aka https://github.com/facebook/react-native/pull/34964), **except** the change to `setUpReactDevTools.js`, which actually uses the new files. # Why * We want to ship the Buck, C++, etc. changes before the JavaScript changes that depend on those files. * Otherwise, apps can fail at startup with the message: ``` `TurboModuleRegistry.getEnforcing(...): '${name}' could not be found. ` + 'Verify that a module by this name is registered in the native binary.', ``` * Note that this only occurs if you are using a previously-built version of the C++, Obj C, etc. files in RN, but a more recent version of the JavaScript files. If you are building from matching sources, this does not occur. * After a few days, we can land the JS files. ## Changelog Changelog [General][Added] Add, but don't use, DevTools Settings Manager. Reviewed By: NickGerleman Differential Revision: D40873390 fbshipit-source-id: c7bac6ae65f85666b8616443db278ebb175b691b
This commit is contained in:
1 parent
7203187c80
commit
6152763398
10 files changed
+155
-1
No files matched your search
@@ -37,6 +37,7 @@ rn_android_library(
|
||||
react_native_target("java/com/facebook/react/modules/clipboard:clipboard"),
|
||||
react_native_target("java/com/facebook/react/modules/core:core"),
|
||||
react_native_target("java/com/facebook/react/modules/debug:debug"),
|
||||
react_native_target("java/com/facebook/react/modules/devtoolssettings:devtoolssettings"),
|
||||
react_native_target("java/com/facebook/react/modules/dialog:dialog"),
|
||||
react_native_target("java/com/facebook/react/modules/fresco:fresco"),
|
||||
react_native_target("java/com/facebook/react/modules/i18nmanager:i18nmanager"),
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.facebook.react.modules.blob.BlobModule;
|
||||
import com.facebook.react.modules.blob.FileReaderModule;
|
||||
import com.facebook.react.modules.camera.ImageStoreManager;
|
||||
import com.facebook.react.modules.clipboard.ClipboardModule;
|
||||
import com.facebook.react.modules.devtoolssettings.DevToolsSettingsManagerModule;
|
||||
import com.facebook.react.modules.dialog.DialogModule;
|
||||
import com.facebook.react.modules.fresco.FrescoModule;
|
||||
import com.facebook.react.modules.i18nmanager.I18nManagerModule;
|
||||
@@ -141,6 +142,8 @@ public class MainReactPackage extends TurboReactPackage {
|
||||
return new VibrationModule(context);
|
||||
case WebSocketModule.NAME:
|
||||
return new WebSocketModule(context);
|
||||
case DevToolsSettingsManagerModule.NAME:
|
||||
return new DevToolsSettingsManagerModule(context);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
@@ -181,7 +184,8 @@ public class MainReactPackage extends TurboReactPackage {
|
||||
Class.forName("com.facebook.react.shell.MainReactPackage$$ReactModuleInfoProvider");
|
||||
return (ReactModuleInfoProvider) reactModuleInfoProviderClass.newInstance();
|
||||
} catch (ClassNotFoundException e) {
|
||||
// In OSS case, the annotation processor does not run. We fall back on creating this byhand
|
||||
// In the OSS case, the annotation processor does not run. We fall back to creating this by
|
||||
// hand
|
||||
Class<? extends NativeModule>[] moduleList =
|
||||
new Class[] {
|
||||
AccessibilityInfoModule.class,
|
||||
@@ -199,6 +203,7 @@ public class MainReactPackage extends TurboReactPackage {
|
||||
NativeAnimatedModule.class,
|
||||
NetworkingModule.class,
|
||||
PermissionsModule.class,
|
||||
DevToolsSettingsManagerModule.class,
|
||||
ShareModule.class,
|
||||
StatusBarModule.class,
|
||||
SoundManagerModule.class,
|
||||
|
||||
Reference in new issue
Block a user