Move CoreComponentsRegistry to newarchdefaults (#59220)

Summary:
Pull Request resolved: https://github.com/react/react-native/pull/59220

`CoreComponentsRegistry` pulls every built-in component implementation into `fabric:jni`, preventing those components from depending on Fabric JNI without a cycle.

Move the registry header and implementation into `newarchdefaults:jni`, which already owns default component registration, while preserving both public include paths. Point the registry’s other native consumers at the same shared target.

Changelog: [Internal]

landed-with-radar-review

Reviewed By: lenaic

Differential Revision: D126315162

fbshipit-source-id: 43d7e10703d6967544f5c3ebfdfbe080c3a8d089
This commit is contained in:
Pieter De Baets authored and meta-codesync[bot] committed 2026-10-20 07:39:48 -07:00
1 parent c99c491563
commit 935b952810
5 files changed
+21 -7

No files matched your search

@@ -95,6 +95,10 @@ val preparePrefab by
Pair("../ReactCommon/hermes/inspector-modern/", "hermes/inspector-modern/"),
// fabricjni
Pair("src/main/jni/react/fabric", "react/fabric/"),
Pair(
"src/main/jni/react/newarchdefaults/CoreComponentsRegistry.h",
"react/fabric/",
),
// uimanagerjni
Pair("src/main/jni/react/uimanager", "react/uimanager/"),
// glog
@@ -51,15 +51,8 @@ target_link_libraries(
rrc_legacyviewmanagerinterop
react_utils
reactnativejni
rrc_image
rrc_modal
rrc_progressbar
rrc_root
rrc_safeareaview
rrc_scrollview
rrc_switch
rrc_text
rrc_textinput
rrc_unimplementedview
rrc_view
yoga
@@ -29,6 +29,19 @@ target_link_libraries(react_newarchdefaults
react_nativemodule_featureflags
react_nativemodule_microtasks
react_nativemodule_idlecallbacks
react_renderer_attributedstring
react_renderer_componentregistry
react_renderer_textlayoutmanager
rrc_image
rrc_modal
rrc_progressbar
rrc_safeareaview
rrc_scrollview
rrc_switch
rrc_text
rrc_textinput
rrc_unimplementedview
rrc_view
jsi)
target_compile_reactnative_options(react_newarchdefaults PRIVATE)
@@ -38,6 +38,10 @@ sharedProviderRegistry() {
void addCoreComponents(
std::shared_ptr<const ComponentDescriptorProviderRegistry>
providerRegistry) {
if (providerRegistry == nullptr) {
return;
}
providerRegistry->add(
concreteComponentDescriptorProvider<
AndroidProgressBarComponentDescriptor>());