What is the use and meaning of following code of block?
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
minify is an Android tool that will decrease the size of your application when you go to build it. It's extremely useful as it means smaller apk files! It detects any code or libraries that aren't being used and ignores them from your final apk.
You can do this by adding extra properties to the ext block in the top-level build.gradle file. // of properties you can define. // You can also create properties to specify versions for dependencies.
It is popular for its ability to build automation in languages like Java, Scala, Android, C/C++, and Groovy. The tool supports groovy based Domain Specific Language over XML. Gradle provides building, testing, and deploying software on several platforms. The tool is popular for building any software and large projects.
Build types define certain properties that Gradle uses when building and packaging your app, and are typically configured for different stages of your development lifecycle. There are two build types defined by default, debug and release , and you can customize them and create additional build types.
Using this code block you can configure your build.gradle
file for proguard implementation and Flag minifyEnabled
stays for ProGuard, and it's turned off by default.
check this for more informations minifyEnabled, ProGuard and What is minifyEnabled
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