有没有办法在Gradle中列出任务依赖关系? [英] Is there a way to list task dependencies in Gradle?

查看:556
本文介绍了有没有办法在Gradle中列出任务依赖关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

./ gradle tasks 列出一些任务。查看
http://gradle.org/docs/current/userguide/java_plugin.html有没有列出的隐藏的。另外,其他插件不会有任务间依赖关系的漂亮图形。



有没有办法


  1. 列出所有使用gradle的插件中的所有任务

  2. 列出任务和他们依赖的任务(有点像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

  1. list all the tasks in all plugins with gradle
  2. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆