Deprecate com/facebook/react Legacy Architecture classes (#53104)

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

Deprecate com/facebook/react Legacy Architecture classes

changelog: [Android][Changed] Depreacate CoreModulesPackage and NativeModuleRegistryBuilder legacy architecture classes, these classes unused in the new architecture and will be deleted in the future

Reviewed By: shwanton

Differential Revision: D79676942

fbshipit-source-id: a2c447bee251fdac79d3dc81a17851eaf5271413
This commit is contained in:
David Vacca
2025-08-09 04:39:35 -07:00
committed by Facebook GitHub Bot
parent da74d5da2c
commit d3bbbd893a
2 changed files with 7 additions and 1 deletions
@@ -37,6 +37,7 @@ import com.facebook.systrace.Systrace
/**
* This is the basic module to support React Native. The debug modules are now in DebugCorePackage.
*/
@Suppress("DEPRECATION")
@ReactModuleList(
// WARNING: If you modify this list, ensure that the list below in method
// getReactModuleInfoByInitialization is also updated
@@ -54,7 +55,9 @@ import com.facebook.systrace.Systrace
TimingModule::class,
com.facebook.react.uimanager.UIManagerModule::class])
@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR)
@Suppress("DEPRECATION")
@Deprecated(
message = "This class is part of Legacy Architecture and will be removed in a future release",
level = DeprecationLevel.WARNING)
internal class CoreModulesPackage(
private val reactInstanceManager: ReactInstanceManager,
private val hardwareBackBtnHandler: DefaultHardwareBackBtnHandler,
@@ -18,6 +18,9 @@ import com.facebook.react.common.annotations.internal.LegacyArchitectureLogger
/** Helper class to build NativeModuleRegistry. */
@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR)
@Deprecated(
message = "This class is part of Legacy Architecture and will be removed in a future release",
level = DeprecationLevel.WARNING)
public class NativeModuleRegistryBuilder(
private val reactApplicationContext: ReactApplicationContext,
) {