enable proguard

// FREEBIE
master
Jake McGinty 2014-10-29 10:55:35 -07:00
parent 7df49811b7
commit ad1d55f12d
2 changed files with 42 additions and 0 deletions

View File

@ -82,6 +82,17 @@ android {
}
android {
buildTypes {
debug {
runProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
}
release {
runProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'

31
proguard.cfg 100644
View File

@ -0,0 +1,31 @@
-dontobfuscate
## Support
-keep class android.support.v4.app.** { *; }
-keep interface android.support.v4.app.** { *; }
-keep class android.support.v7.internal.** { *; }
-keep interface android.support.v7.internal.** { *; }
-keep class android.support.v7.** { *; }
-keep interface android.support.v7.** { *; }
-keep public class * extends android.support.v7.app.ActionBarActivity { *; }
-keep class android.support.v7.widget.** { *; }
-keepattributes *Annotation*
## Protobuf
-keep class com.google.protobuf.** { *; }
## GSON
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature
# For using GSON @Expose annotation
-keepattributes *Annotation*
# Gson specific classes
-keep class sun.misc.Unsafe { *; }
#-keep class com.google.gson.stream.** { *; }