Prograd rules and Security for android code & Minified

March 04, 2016 , 0 Comments

this we will add on this Gradle file


android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

}

After add this proguard file must be at there :

proguard-rules.pro

In this file add some different rules what ever you want to add on that.

Sample Pro file: (This is not minified gson model only accept all activity all class will be minified.)

# For using GSON @Expose annotation
-keepattributes Signature
-keepattributes *Annotation*
# Gson specific classes
-keep class sun.misc.Unsafe { *; }
-keep class com.google.gson.examples.android.model.** { *; }

Contributer

Some say he’s half man half fish, others say he’s more of a seventy/thirty split. Either way he’s a fishy bastard. Google

0 comments:

Popular Posts