Gradle has several features to investigate and enhance build performance, one of which is the build scans plugin. Build scans are essentially detailed diagnostic information on the build, the various steps and tasks in it, and how long they take.
They can be auto-uploaded to a gradle server, and are useful for identifying bottlenecks and places where better parallelization is possible.
The plugin can be configured to run with every build, and publish as well if desired. To run in the command-line, use the --scan
parameter e.g. gradlew build --scan
. See the docs for details:
Note
|
Some functionality may only be available in the Enterprise version of gradle. |
If build scans are not an option, can get a simpler report via the --profile
flag e.g. gradlew --profile <tasks>
, which generates an HTML report at a conventional location in the build directory.
See https://guides.gradle.org/performance for more info.