Fix build error and runtime error after proguard enabled.

Summary:
Fix:
1. :app:packageRelease FAILED caused by proguard exception: `java.io.IOException: Please correct the above warnings first.`
2. Fix runtime exception
```
java.lang.ExceptionInInitializerError
   at com.facebook.react.ReactInstanceManagerImpl.recreateReactContextInBackgroundFromBundleFile(ReactInstanceManagerImpl.java:308)
```
Closes https://github.com/facebook/react-native/pull/5146

Reviewed By: svcscm

Differential Revision: D2807252

Pulled By: mkonicek

fb-gh-sync-id: 03d004405c7cca14a71230086b95351cfacbc055
This commit is contained in:
tdzl2003 2016-01-07 08:35:17 -08:00 committed by facebook-github-bot-3
parent cb94d997ca
commit 5f3d08d524
1 changed files with 7 additions and 0 deletions

View File

@ -40,10 +40,13 @@
-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
-keep class * extends com.facebook.react.bridge.NativeModule { *; }
-keepclassmembers,includedescriptorclasses class * { native <methods>; }
-keepclassmembers class * { @com.facebook.react.uimanager.UIProp <fields>; }
-keepclassmembers class * { @com.facebook.react.uimanager.ReactProp <methods>; }
-keepclassmembers class * { @com.facebook.react.uimanager.ReactPropGroup <methods>; }
-dontwarn com.facebook.react.**
# okhttp
-keepattributes Signature
@ -58,3 +61,7 @@
-dontwarn java.nio.file.*
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
-dontwarn okio.**
# stetho
-dontwarn com.facebook.stetho.**