Bug 1262273 - Keep appcompat-v7 from getting Proguarded out. r?mcomella draft
authorNick Alexander <nalexander@mozilla.com>
Tue, 05 Apr 2016 11:56:50 -0700
changeset 348177 b46a59f95a0bb3d93e040d25bbb82901fc412f6b
parent 348176 b8dd54498a867d31948cad1cef38060b6110ef54
child 348178 e7f37d06786a5727820e2c0bba5d247f9754067f
push id14768
push usernalexander@mozilla.com
push dateWed, 06 Apr 2016 20:29:14 +0000
reviewersmcomella
bugs1262273
milestone48.0a1
Bug 1262273 - Keep appcompat-v7 from getting Proguarded out. r?mcomella MozReview-Commit-ID: HNcSaCEBlwX
mobile/android/config/proguard/appcompat-v7-keeps.cfg
mobile/android/config/proguard/proguard.cfg
new file mode 100644
--- /dev/null
+++ b/mobile/android/config/proguard/appcompat-v7-keeps.cfg
@@ -0,0 +1,11 @@
+# Avoid https://code.google.com/p/android/issues/detail?id=187611 and
+# http://stackoverflow.com/q/32813894 when building with Gradle.  Why
+# these aren't defined in appcompat-v7.aar/proguard.txt is beyond me.
+
+-keep public class android.support.v7.widget.** { *; }
+-keep public class android.support.v7.internal.widget.** { *; }
+-keep public class android.support.v7.internal.view.menu.** { *; }
+
+-keep public class * extends android.support.v4.view.ActionProvider {
+    public <init>(android.content.Context);
+}
--- a/mobile/android/config/proguard/proguard.cfg
+++ b/mobile/android/config/proguard/proguard.cfg
@@ -245,8 +245,9 @@
 # Don't print spurious warnings from the support library.
 # See: http://stackoverflow.com/questions/22441366/note-android-support-v4-text-icucompatics-cant-find-dynamically-referenced-cl
 -dontnote android.support.**
 
 -include "adjust-keeps.cfg"
 
 -include "leakcanary-keeps.cfg"
 
+-include "appcompat-v7-keeps.cfg"