Using the following configuration
-dontoptimize
-dontobfuscate
-keepattributes SourceFile,LineNumberTable -keep class org.whispersystems.** { *; }
-keep class org.thoughtcrime.securesms.** { *; }
-keepclassmembers class ** { public void onEvent*(**); }
after adding the above lines of code, my whole app code is not getting obfuscated now because of just these two lines
-dontoptimize
-dontobfuscate.
If I remove these two configuration options my app crashes during serialization of signal protocol classes.
my configuration in build.gradle
file
release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile( proguard-android-optimize.txt'), 'proguard-rules.pro', 'proguard.cfg' useProguard true debuggable false } debug { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile( 'proguard-android-optimize.txt'), 'proguard-rules.pro', 'proguard.cfg' useProguard true debuggable false }
I tried adding rules for signal in separate file proguard.cfg
, as you can see above. but no luck
kindly let me know how to obfuscate my app.