I am Facing problem to obfuscate my android App.My application have 3 Modules. i enabled proguard in my app using android studio.
My gradle.build file is below:-
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.scconline"
minSdkVersion 14
targetSdkVersion 14
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile project(':androidHorizontalListView')
compile project(':library')
// compile 'com.google.code.gson:gson:2.2'
compile files('libs/eventbus-2.4.0.jar')
compile files('libs/fastjson.jar')
compile files('libs/itextpdf-5.5.4.jar')
compile files('libs/jsoup-1.8.1.jar')
compile files('libs/ksoap2-android-assembly-3.1.1-jar-with- dependencies.jar')
compile files('libs/mockito-all-1.9.0.jar')
compile files('libs/xmlworker-5.5.4.jar')
compile files('libs/gson-2.2.4.jar')
compile files('libs/gson-2.2.4-javadoc.jar')
compile files('libs/gson-2.2.4-sources.jar')
}
My proguard rule file is below:-
-dontshrink
-dontoptimize
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-keepattributes *Annotation*
-keep public class com.scconline.**
-dontnote com.itextpdf.**
-dontnote org.mockito.**
-dontwarn com.itextpdf.**
-dontwarn org.mockito.**
-dontwarn android.**
-dontwarn android.support.**
-keep class android.support.** { *; }
-keep interface android.support.** { *; }
-keep class android.support.design.widget.** { *; }
-keep interface android.support.design.widget.** { *; }
-dontwarn android.support.design.*
-dontwarn org.objenesis.**
-keep public class * extends android.view.View {
public <init>(android.content.Context);
public <init>(android.content.Context, android.util.AttributeSet);
public <init>(android.content.Context, android.util.AttributeSet, int);
public void set*(...);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers class * extends android.content.Context {
public void *(android.view.View);
public void *(android.view.MenuItem);
}
-keepclassmembers class * implements android.os.Parcelable {
static ** CREATOR;
}
-keepclassmembers class **.R$* {
public static <fields>;
}
-keepclassmembers class * {
@android.webkit.JavascriptInterface <methods>;
}
i use above rule file in my main module and rest two module use default rule file, i enable proguard in rest to module also.
Please help!! i would be highly obliged...