mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add @DoNotStrip annotation to getConstants()
Summary: NativeModule getConstants() methods on Java might not be used within Java. So, they can be stripped by proguard. This diff adds the DoNotStrip annotation to the getConstants() method. Changelog: [Internal] Reviewed By: keoskate Differential Revision: D26265874 fbshipit-source-id: b405ee32406e829212e5c9641750a6b5795899c3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b474be6cc8
commit
cba6aba2e6
+1
@@ -339,6 +339,7 @@ function buildGetConstantsMethod(
|
||||
return ` protected abstract Map<String, Object> getTypedExportedConstants();
|
||||
|
||||
@Override
|
||||
@DoNotStrip
|
||||
public final @Nullable Map<String, Object> getConstants() {
|
||||
Map<String, Object> constants = getTypedExportedConstants();
|
||||
if (ReactBuildConfig.DEBUG || ReactBuildConfig.IS_INTERNAL_BUILD) {
|
||||
|
||||
Reference in New Issue
Block a user