Reputation: 11388
in the build.gradle file i set the minifyEnabled to be true as shown in the code below. my question is how can i see the effect of this statement? or in other words, as i am trying to minify the code and obfuscating it, where can i see the code minified and obfuscated where is the result of this statement.
build.gradle:
buildTypes {
debug {
debuggable true
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Upvotes: 2
Views: 1942
Reputation: 290
You can check it in simple way, just extract your apk, decompile .dex files and look at decompile sources.
Obfuscated code should have changed classes, functions, variables names.
Here is insightful post about how to do it.
Upvotes: 2
Reputation: 6200
The probably easiest way to verify that shrinking and obfuscation has been applied to your project is to check for the existence of the mapping file.
When ProGuard is executed during the android build using gradle, the following files are generated automatically (located in build/outputs/mapping/<buildtype>/
):
-keep
rulesWith the presence and contents of these files you can verify that ProGuard was executed correctly.
Upvotes: 2