Read now

Gradle Command Line flags for android

Gradle Command Line flags allow us to monitor and control the gradle activity performed in the application. We can use various flags to see what is happening and manipulate it, during the build process.

This monitoring and controlling include Logging, Listing Tasks, Profiling and like that.

In this blog, we are going to see how Profiling can be done.

Profiling a build

The --profile command line option will record some useful timing information while your build is running and write a report to the build/reports/profile directory. The report will be named using the time when the build was run.

This report lists summary times and details for both the configuration phase and task execution. The times for configuration and task execution are sorted with the most expensive operations first. The task execution results also indicate if any tasks were skipped (and the reason) or if tasks that were not skipped did no work.

Builds which utilize a buildSrc directory will generate a second profile report for buildSrc in the buildSrc/build directory.


Screenshot from 2016-05-12 20:59:13

Here is the  complete list of Gradle Flag available


We can use GUI to add these gradle command line flags from


File > Settings…(Ctrl _ Alt + S) >  Build, Execution, Deployment > Compiler (Command-line Options)


Screenshot from 2016-05-12 21:03:51

Stay Updated !!




. . .


Add Your Comment

Be the first to comment.

Hire Us!
Brief us about your requirements and we'll get back to you.
Woo! Hooy!
We have just recieved your project brief and our expert will contact you shortly.
Send Again