Updated 24 January 2024
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.
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.
Here is the complete list of Gradle Flag available
https://docs.gradle.org/current/userguide/gradle_command_line.html
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 !!
If you have more details or questions, you can reply to the received confirmation email.
Back to Home
Be the first to comment.