From 7549db8dedec2e69a29f6938fb2d456910c25586 Mon Sep 17 00:00:00 2001 From: Sungyu Kang Date: Sun, 16 Feb 2025 14:24:14 +0900 Subject: [PATCH] fix(android): new arch ProGuard (#108) * fix(android): new arch proguard * fix: proguard * fix: ** --- .../react-native/android/proguard-rules.pro | 29 +++++++------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/packages/react-native/android/proguard-rules.pro b/packages/react-native/android/proguard-rules.pro index b0df6809..d16c46eb 100644 --- a/packages/react-native/android/proguard-rules.pro +++ b/packages/react-native/android/proguard-rules.pro @@ -1,22 +1,15 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - +# Old Architecture # Invoked via reflection, when setting js bundle. -keepclassmembers class com.facebook.react.ReactInstanceManager { private final ** mBundleLoader; +} + +# New Architecture +# Keep fields accessed via reflection in ReactHost +-keepclassmembers class com.facebook.react.runtime.ReactHostImpl { + private final ** mReactHostDelegate; +} + +-keepclassmembers class * implements com.facebook.react.runtime.ReactHostDelegate { + ** jsBundleLoader; } \ No newline at end of file