Skip to content

Commit

Permalink
Add new DoNotStrip class to proguard config (#27934)
Browse files Browse the repository at this point in the history
Summary:
JNI now comes from https://github.com/facebookincubator/fbjni and it uses a different DoNotStrip class (https://github.com/facebookincubator/fbjni/blob/master/java/com/facebook/jni/annotations/DoNotStrip.java) so we need to include it in the proguard config.

## Changelog

[Android] [Fixed] - Add new DoNotStrip class to proguard config
Pull Request resolved: #27934

Test Plan: Test that it fixes a crash related to missing NativeRunnable class in release builds.

Differential Revision: D19690580

Pulled By: cpojer

fbshipit-source-id: cb4e2eaae35fb3a9d68f04c57cc973914207be73
  • Loading branch information
janicduplessis authored and facebook-github-bot committed Feb 3, 2020
1 parent ff3b839 commit cfcf5eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ReactAndroid/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@
-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
-keep,allowobfuscation @interface com.facebook.jni.annotations.DoNotStrip

# Do not strip any method/class that is annotated with @DoNotStrip
-keep @com.facebook.proguard.annotations.DoNotStrip class *
-keep @com.facebook.common.internal.DoNotStrip class *
-keep @com.facebook.jni.annotations.DoNotStrip class *
-keepclassmembers class * {
@com.facebook.proguard.annotations.DoNotStrip *;
@com.facebook.common.internal.DoNotStrip *;
@com.facebook.jni.annotations.DoNotStrip *;
}

-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
Expand Down

0 comments on commit cfcf5eb

Please sign in to comment.