Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the minifyEnabled which is declared in gradle file. May I know the meaning and use of following code of block

What is the use and meaning of following code of block?

buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
like image 499
Kailas Bhakade Avatar asked Sep 21 '16 07:09

Kailas Bhakade


People also ask

What is Minifyenabled?

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.

How would you specify in your build Gradle file?

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.

What is the Gradle file and its significance?

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.

What is build type in Gradle?

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.


1 Answers

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

like image 86
Ankush Guhe Avatar answered Oct 07 '22 00:10

Ankush Guhe