./gradle tasks
lists "some" of the tasks. Looking at http://gradle.org/docs/current/userguide/java_plugin.html there are hidden ones not listed. Also, other plugins will not have such a nice pretty graph of the dependencies between tasks.
Is there a way to
dependency:tree
but for tasks)To get an overview of all Gradle tasks in our project, we need to run the tasks task. Since Gradle 5.1, we can use the --group option followed by a group name. Gradle will then show all tasks belonging to the group and not the other tasks in the project.
The dependency tree in a build scan renders the selection reason (conflict resolution) as well as the origin of a dependency if you click on a dependency and select the "Required By" tab. Every Gradle project provides the task dependencyInsight to render the so-called dependency insight report from the command line.
To see which tasks are available for our build we can run Gradle with the command-line option -t or --tasks. Gradle outputs the available tasks from our build script. By default only the tasks which are dependencies on other tasks are shown. To see all tasks we must add the command-line option --all.
list the tasks and what tasks they depend on (sort of like maven's depenceny:tree but for tasks)
for this you can use --dry-run
(or -m
) option which lists tasks which are executed in order for particular command, but does not execute the command, e.g.
gradle assemble --dry-run
you can find more here
Prior to Gradle 3.3, you could use the --all
flag to get a more detailed listing of the available tasks and the task dependencies:
gradle tasks --all
The dependency reporting was removed from this task as of Gradle 3.3 for performance reasons. This change and its rationale was documented in the Gradle 3.3 release notes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With