有没有办法在Gradle中列出任务依赖关系? [英] Is there a way to list task dependencies in Gradle?
问题描述
./ gradle tasks
列出一些任务。查看
http://gradle.org/docs/current/userguide/java_plugin.html有没有列出的隐藏的。另外,其他插件不会有任务间依赖关系的漂亮图形。
有没有办法
- 列出所有使用gradle的插件中的所有任务
- 列出任务和他们依赖的任务(有点像maven的
depenceny:tree
但是对于任务)
--all标志可以获得更详细的可用任务列表和任务依赖关系
gradle任务 - 全部
编辑:正如Radim在注释中指出的那样,这个命令不报告依赖关系,对于gradle 3.3和更新的版本。
./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
- list all the tasks in all plugins with gradle
- list the tasks and what tasks they depend on (sort of like maven's
depenceny:tree
but for tasks)
you can use the --all flag to get a more detailed listing of the available tasks and the task dependencies
gradle tasks --all
EDIT: as noted by Radim in the comments, this command does not report dependencies, for gradle 3.3 and newer.
这篇关于有没有办法在Gradle中列出任务依赖关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!