Add @DoNotStrip to JavaScriptModule interfaces

Summary: Adding `DoNotStrip` to all the interfaces that extend `JavaScriptModule` to ensure they don't get stripped from release builds (because they have no Java implementors).

Reviewed By: emma0303

Differential Revision: D17534719

fbshipit-source-id: a793764caf17040bf1252be7ec4c72176d6989d4
This commit is contained in:
Emily Janzer
2019-09-24 09:36:16 -07:00
committed by Facebook Github Bot
parent 990c9ea5ec
commit 6464ef0a92
4 changed files with 8 additions and 0 deletions
@@ -9,6 +9,7 @@ package com.facebook.react.modules.core;
import android.net.Uri;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.facebook.proguard.annotations.DoNotStrip;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.JavaScriptModule;
import com.facebook.react.bridge.ReactApplicationContext;
@@ -23,6 +24,7 @@ import com.facebook.react.module.annotations.ReactModule;
public class DeviceEventManagerModule extends ReactContextBaseJavaModule {
public static final String NAME = "DeviceEventManager";
@DoNotStrip
public interface RCTDeviceEventEmitter extends JavaScriptModule {
void emit(@NonNull String eventName, @Nullable Object data);
}
@@ -6,9 +6,11 @@
*/
package com.facebook.react.modules.core;
import com.facebook.proguard.annotations.DoNotStrip;
import com.facebook.react.bridge.JavaScriptModule;
import com.facebook.react.bridge.WritableArray;
@DoNotStrip
public interface JSTimers extends JavaScriptModule {
void callTimers(WritableArray timerIDs);
@@ -7,9 +7,11 @@
package com.facebook.react.modules.core;
import androidx.annotation.Nullable;
import com.facebook.proguard.annotations.DoNotStrip;
import com.facebook.react.bridge.JavaScriptModule;
/** Module that handles global application events. */
@DoNotStrip
public interface RCTNativeAppEventEmitter extends JavaScriptModule {
void emit(String eventName, @Nullable Object data);
}
@@ -7,10 +7,12 @@
package com.facebook.react.uimanager.events;
import androidx.annotation.Nullable;
import com.facebook.proguard.annotations.DoNotStrip;
import com.facebook.react.bridge.JavaScriptModule;
import com.facebook.react.bridge.WritableArray;
import com.facebook.react.bridge.WritableMap;
@DoNotStrip
public interface RCTEventEmitter extends JavaScriptModule {
void receiveEvent(int targetTag, String eventName, @Nullable WritableMap event);