From 670fef2fa8c97193057087f90e6dd83317b68973 Mon Sep 17 00:00:00 2001 From: Michael Keppler Date: Tue, 22 Apr 2014 13:16:30 +0200 Subject: convert proguard configuration of tests to recommended format It is recommended to include the premade android configuration instead of creating all rules from scratch. --- tests/proguard-project.txt | 40 ++++++++++++++++++++++++++++++++++++++++ tests/proguard.cfg | 40 ---------------------------------------- tests/project.properties | 3 +++ 3 files changed, 43 insertions(+), 40 deletions(-) create mode 100644 tests/proguard-project.txt delete mode 100644 tests/proguard.cfg (limited to 'tests') diff --git a/tests/proguard-project.txt b/tests/proguard-project.txt new file mode 100644 index 0000000..f0b04dc --- /dev/null +++ b/tests/proguard-project.txt @@ -0,0 +1,40 @@ +-optimizationpasses 5 +-dontusemixedcaseclassnames +-dontskipnonpubliclibraryclasses +-dontpreverify +-verbose +-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* + +-keep public class * extends android.app.Activity +-keep public class * extends android.app.Application +-keep public class * extends android.app.Service +-keep public class * extends android.content.BroadcastReceiver +-keep public class * extends android.content.ContentProvider +-keep public class * extends android.app.backup.BackupAgentHelper +-keep public class * extends android.preference.Preference +-keep public class com.android.vending.licensing.ILicensingService + +-keepclasseswithmembernames class * { + native ; +} + +-keepclasseswithmembers class * { + public (android.content.Context, android.util.AttributeSet); +} + +-keepclasseswithmembers class * { + public (android.content.Context, android.util.AttributeSet, int); +} + +-keepclassmembers class * extends android.app.Activity { + public void *(android.view.View); +} + +-keepclassmembers enum * { + public static **[] values(); + public static ** valueOf(java.lang.String); +} + +-keep class * implements android.os.Parcelable { + public static final android.os.Parcelable$Creator *; +} diff --git a/tests/proguard.cfg b/tests/proguard.cfg deleted file mode 100644 index f0b04dc..0000000 --- a/tests/proguard.cfg +++ /dev/null @@ -1,40 +0,0 @@ --optimizationpasses 5 --dontusemixedcaseclassnames --dontskipnonpubliclibraryclasses --dontpreverify --verbose --optimizations !code/simplification/arithmetic,!field/*,!class/merging/* - --keep public class * extends android.app.Activity --keep public class * extends android.app.Application --keep public class * extends android.app.Service --keep public class * extends android.content.BroadcastReceiver --keep public class * extends android.content.ContentProvider --keep public class * extends android.app.backup.BackupAgentHelper --keep public class * extends android.preference.Preference --keep public class com.android.vending.licensing.ILicensingService - --keepclasseswithmembernames class * { - native ; -} - --keepclasseswithmembers class * { - public (android.content.Context, android.util.AttributeSet); -} - --keepclasseswithmembers class * { - public (android.content.Context, android.util.AttributeSet, int); -} - --keepclassmembers class * extends android.app.Activity { - public void *(android.view.View); -} - --keepclassmembers enum * { - public static **[] values(); - public static ** valueOf(java.lang.String); -} - --keep class * implements android.os.Parcelable { - public static final android.os.Parcelable$Creator *; -} diff --git a/tests/project.properties b/tests/project.properties index 56eb572..90d918c 100644 --- a/tests/project.properties +++ b/tests/project.properties @@ -9,3 +9,6 @@ # Project target. target=Google Inc.:Google APIs:19 + +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt -- cgit v1.1