[Android] proguard: no optims, keep everything

Thomas Guillem git at videolan.org
Tue Oct 13 14:52:00 CEST 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Oct 13 14:47:25 2015 +0200| [83562ecaba1288011916496e51c02adb32a4cc39] | committer: Thomas Guillem

proguard: no optims, keep everything

Not tested on samsung/wiko/qmobile...

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=83562ecaba1288011916496e51c02adb32a4cc39
---

 vlc-android/proguard.cfg |   21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/vlc-android/proguard.cfg b/vlc-android/proguard.cfg
index 4859c16..3338d79 100644
--- a/vlc-android/proguard.cfg
+++ b/vlc-android/proguard.cfg
@@ -1,13 +1,16 @@
--optimizationpasses 5
--dontusemixedcaseclassnames
+# Samsung/Wiko/Qmobile shit workaround
+# see https://code.google.com/p/android/issues/detail?id=78377
+-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod
 -dontskipnonpubliclibraryclasses
 -dontobfuscate
 -dontpreverify
 -verbose
--optimizations !code/simplification/arithmetic,!field/*,!class/merging/*,!code/allocation/variable
+-dontoptimize
 
-# Do not optimize/shrink LibVLC, because of native code
+# Keep our code
 -keep class org.videolan.libvlc.** { *; }
+-keep class org.videolan.vlc.** { *; }
+-keep class com.android.widget.** { *; }
 
 -keep public class * extends android.app.Activity
 -keep public class * extends android.app.Application
@@ -18,9 +21,13 @@
 -keep public class * extends android.preference.Preference
 -keep public class com.android.vending.licensing.ILicensingService
 
-# Samsung shit workaround
-# see https://code.google.com/p/android/issues/detail?id=78377#c160
--keep class !android.support.v7.internal.view.menu.**, android.support.v7.** { *; }
+# Samsung/Wiko/Qmobile shit workaround
+-keep class android.support.v4.app.** { *; }
+-keep interface android.support.v4.app.** { *; }
+-keep class android.support.v7.app.** { *; }
+-keep interface android.support.v7.app.** { *; }
+-keep class android.support.v7.widget.** { *; }
+-keep interface android.support.v7.widget.** { *; }
 
 -keepclasseswithmembernames class * {
     native <methods>;



More information about the Android mailing list