diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstance.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstance.kt index a2325c6b95c6..b6c763689a07 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstance.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstance.kt @@ -9,7 +9,6 @@ package com.facebook.react.bridge import com.facebook.proguard.annotations.DoNotStrip import com.facebook.react.bridge.queue.ReactQueueConfiguration -import com.facebook.react.common.annotations.DeprecatedInNewArchitecture import com.facebook.react.common.annotations.VisibleForTesting import com.facebook.react.internal.turbomodule.core.interfaces.TurboModuleRegistry import com.facebook.react.turbomodule.core.interfaces.CallInvokerHolder @@ -20,6 +19,9 @@ import com.facebook.react.turbomodule.core.interfaces.NativeMethodCallInvokerHol * the invocation of JavaScript methods and lets a set of Java APIs be invocable from JavaScript as * well. */ +@Deprecated( + message = + "This class is deprecated, please to migrate to new architecture using [com.facebook.react.defaults.DefaultReactHost] instead.") @DoNotStrip public interface CatalystInstance : MemoryPressureListener, JSInstance, JSBundleLoaderDelegate { public fun runJSBundle() @@ -117,21 +119,18 @@ public interface CatalystInstance : MemoryPressureListener, JSInstance, JSBundle */ public val nativeMethodCallInvokerHolder: NativeMethodCallInvokerHolder - @DeprecatedInNewArchitecture( + @Deprecated( message = - "This method will be deprecated later as part of Stable APIs with bridge removal and not" + - " encouraged usage.") + "This method is deprecated, please to migrate to new architecture using [com.facebook.react.defaults.DefaultReactHost] instead.") public fun setTurboModuleRegistry(turboModuleRegistry: TurboModuleRegistry) - @DeprecatedInNewArchitecture( + @Deprecated( message = - "This method will be deprecated later as part of Stable APIs with bridge removal and not" + - " encouraged usage.") + "This method is deprecated, please to migrate to new architecture using [com.facebook.react.defaults.DefaultReactHost] instead.") public fun setFabricUIManager(fabricUIManager: UIManager) - @DeprecatedInNewArchitecture( + @Deprecated( message = - "This method will be deprecated later as part of Stable APIs with bridge removal and not" + - " encouraged usage.") + "This method is deprecated, please to migrate to new architecture using [com.facebook.react.defaults.DefaultReactHost] instead.") public fun getFabricUIManager(): UIManager? } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessCatalystInstance.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessCatalystInstance.kt index 99c3296c5e7a..07279d4806c9 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessCatalystInstance.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessCatalystInstance.kt @@ -5,6 +5,10 @@ * LICENSE file in the root directory of this source tree. */ +// TODO T207169925: Migrate CatalystInstance to Reacthost and remove the Suppress("DEPRECATION") +// annotation +@file:Suppress("DEPRECATION") + package com.facebook.react.runtime import android.content.res.AssetManager diff --git a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/bridge/ReactTestHelper.kt b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/bridge/ReactTestHelper.kt index 8de19b6fd588..e82a9d8db9c5 100644 --- a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/bridge/ReactTestHelper.kt +++ b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/bridge/ReactTestHelper.kt @@ -5,6 +5,10 @@ * LICENSE file in the root directory of this source tree. */ +// TODO T207169925: Migrate CatalystInstance to Reacthost and remove the Suppress("DEPRECATION") +// annotation +@file:Suppress("DEPRECATION") + package com.facebook.react.bridge import com.facebook.react.bridge.queue.MessageQueueThreadSpec diff --git a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/modules/network/NetworkingModuleTest.kt b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/modules/network/NetworkingModuleTest.kt index 683f52ad3f62..cadc66401d03 100644 --- a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/modules/network/NetworkingModuleTest.kt +++ b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/modules/network/NetworkingModuleTest.kt @@ -5,6 +5,10 @@ * LICENSE file in the root directory of this source tree. */ +// TODO T207169925: Migrate CatalystInstance to Reacthost and remove the Suppress("DEPRECATION") +// annotation +@file:Suppress("DEPRECATION") + package com.facebook.react.modules.network import com.facebook.react.bridge.Arguments diff --git a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/modules/timing/TimingModuleTest.kt b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/modules/timing/TimingModuleTest.kt index 2d36284234bf..7faa5085e22a 100644 --- a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/modules/timing/TimingModuleTest.kt +++ b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/modules/timing/TimingModuleTest.kt @@ -5,6 +5,10 @@ * LICENSE file in the root directory of this source tree. */ +// TODO T207169925: Migrate CatalystInstance to Reacthost and remove the Suppress("DEPRECATION") +// annotation +@file:Suppress("DEPRECATION") + package com.facebook.react.modules.timing import android.content.Context diff --git a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/uimanager/SimpleViewPropertyTest.kt b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/uimanager/SimpleViewPropertyTest.kt index 749e523a8469..f6922883f506 100644 --- a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/uimanager/SimpleViewPropertyTest.kt +++ b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/uimanager/SimpleViewPropertyTest.kt @@ -5,6 +5,10 @@ * LICENSE file in the root directory of this source tree. */ +// TODO T207169925: Migrate CatalystInstance to Reacthost and remove the Suppress("DEPRECATION") +// annotation +@file:Suppress("DEPRECATION") + package com.facebook.react.uimanager import android.view.View diff --git a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/views/image/ReactImagePropertyTest.kt b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/views/image/ReactImagePropertyTest.kt index faa427a52dd2..6704f4755ac7 100644 --- a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/views/image/ReactImagePropertyTest.kt +++ b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/views/image/ReactImagePropertyTest.kt @@ -5,6 +5,10 @@ * LICENSE file in the root directory of this source tree. */ +// TODO T207169925: Migrate CatalystInstance to Reacthost and remove the Suppress("DEPRECATION") +// annotation +@file:Suppress("DEPRECATION") + package com.facebook.react.views.image import android.graphics.Color diff --git a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/views/textinput/ReactTextInputPropertyTest.kt b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/views/textinput/ReactTextInputPropertyTest.kt index 109bcd6d91fb..91aabb17f3b8 100644 --- a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/views/textinput/ReactTextInputPropertyTest.kt +++ b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/views/textinput/ReactTextInputPropertyTest.kt @@ -5,6 +5,10 @@ * LICENSE file in the root directory of this source tree. */ +// TODO T207169925: Migrate CatalystInstance to Reacthost and remove the Suppress("DEPRECATION") +// annotation +@file:Suppress("DEPRECATION") + package com.facebook.react.views.textinput import android.graphics.Color