I'm using ProGuard in AndroidStudio 1.2.1.1 with Gradle 1.2.3.
My Gradle's release build is configured like so:
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
shrinkResources true
I would like the private fields of classes to be obfuscated.
Here is my proguard config file (after many tries) as of now:
-allowaccessmodification
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable
-repackageclasses ''
-verbose
[...]
But I end up, after decompiling with androdd
from AndroidGuard, with:
private com.google.android.gms.common.api.GoogleApiClient googleApiClient;
I know the use of this obfuscation is limited, but I would like googleApiClient
to be renamed by ProGuard. How to do so?
Here is the refcard.
Is there any way to do the opposite of -keepclassmembernames
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…