So iv'e been enabling Pro-Guard to a project and after building the apk i decompiled it to make sure Pro-Guard did he's job and notices that it adds, for example, to the BaseAdapter class -
/* compiled from: BaseAdapter */
See picture -
Now I'm asking, doesn't it lose the point of the Pro-Guard if it says what class that was?
Is there any way to tell the Pro-Guard not to add this info line at all the classes?
My code where i added Pro-Guard -
buildTypes {
debug {
debuggable true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
shrinkResources true
}
release {
signingConfig signingConfigs.somethingsomething
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
shrinkResources true
}
}
Thanks.
Proguard is not adding this line.
/* compiled from: BaseAdapter */
The decompiler is doing mapping of obfuscated name with original name. You are seeing it as you might be using jadx or online service like this
You can try using dex2jar and jd-gui to look at decompiled code. This line will not be present there.
Make sure that 'proguard-rules.pro' file does not have following attributes in it.
-keepattributes SourceFile
If you add this statement no decompiler will be able make this mapping.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With