mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add @DoNotStrip to stop obfuscation of Fabric related classes
Summary: Proguard seems to keep Fabric methods a bit differently from Redex, with method signature lookup with `MountItem` and `StateWrapperImpl` failing in release RNTester builds because of mangled names. Adding these annotations should keep the classes, ensuring lookup from native is correct. Changelog: [Internal] - Add DoNotStrip annotations to Fabric related classes Reviewed By: ryancat Differential Revision: D34726510 fbshipit-source-id: 0c1d8e1fabec75511942943b533ddd8b637a5e19
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a6c2846b37
commit
28291461a8
@@ -24,6 +24,7 @@ import com.facebook.react.uimanager.StateWrapper;
|
||||
* the Bindings.cpp, where the pointer to the C++ event emitter is set.
|
||||
*/
|
||||
@SuppressLint("MissingNativeLoadLibrary")
|
||||
@DoNotStrip
|
||||
public class StateWrapperImpl implements StateWrapper {
|
||||
static {
|
||||
FabricSoLoader.staticInit();
|
||||
|
||||
+2
@@ -10,8 +10,10 @@ package com.facebook.react.fabric.mounting.mountitems;
|
||||
import androidx.annotation.AnyThread;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.UiThread;
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
import com.facebook.react.fabric.mounting.MountingManager;
|
||||
|
||||
@DoNotStrip
|
||||
public interface MountItem {
|
||||
|
||||
/** Execute this {@link MountItem} into the operation queue received by parameter. */
|
||||
|
||||
Reference in New Issue
Block a user