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.
--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
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)
Stay Updated !!
Be the first to comment.