Skip to content

Commit 9a6354f

Browse files
shwantonfacebook-github-bot
authored andcommitted
Annotate DefaultTurboModuleManagerDelegate to avoid redex stripping dep in prod (facebook#46527)
Summary: Pull Request resolved: facebook#46527 Changelog: [Internal] **Context** - `DefaultTurboModuleManagerDelegate.kt` was being stripped by redex since there was no direct dependency. - This was causing a crash in prod builds ``` Trace: java.lang.RuntimeException: Unable to create application com.facebook.mobilehome.MobileHomeAppShell: java.lang.ClassNotFoundException: Didn't find class "com.facebook.react.defaults.DefaultTurboModuleManagerDelegate" on path: DexPathList ``` **Change** - Annotate `DefaultTurboModuleManagerDelegate.kt` with `DoNotStripAny` - Don't strip `DoNotStripAny` annotated classes Reviewed By: mdvacca Differential Revision: D62766339 fbshipit-source-id: 7d9bfa04e252c392b94f739443bacf34f593e481
1 parent 51673e4 commit 9a6354f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultTurboModuleManagerDelegate.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ package com.facebook.react.defaults
99

1010
import com.facebook.jni.HybridData
1111
import com.facebook.proguard.annotations.DoNotStrip
12+
import com.facebook.proguard.annotations.DoNotStripAny
1213
import com.facebook.react.ReactPackage
1314
import com.facebook.react.ReactPackageTurboModuleManagerDelegate
1415
import com.facebook.react.bridge.ReactApplicationContext
@@ -25,6 +26,7 @@ import com.facebook.react.runtime.cxxreactpackage.CxxReactPackage
2526
* TODO(T186951312): Should this be @UnstableReactNativeAPI?
2627
*/
2728
@OptIn(UnstableReactNativeAPI::class)
29+
@DoNotStripAny
2830
public class DefaultTurboModuleManagerDelegate
2931
private constructor(
3032
context: ReactApplicationContext,

0 commit comments

Comments
 (0)