使用 gradle 查找依赖树 [英] Using gradle to find dependency tree
本文介绍了使用 gradle 查找依赖树的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以使用 gradle 生成依赖于什么的树?
Is it possible to use gradle to produce a tree of what depends on what?
我有一个项目,想找出所有依赖项,以便我可以使用前向声明等对其进行一些修剪.
I have a project and would like to find out all the dependencies so I may be able to prune it a little with forward declarations etc.
推荐答案
无模块:
gradle dependencies
安卓:
gradle app:dependencies
使用 gradle 包装器:
Using gradle wrapper:
./gradlew app:dependencies
注意:将 app
替换为项目模块名称.
Note: Replace app
with the project module name.
此外,如果您想检查某些内容是 compile
vs. testCompile
vs androidTestCompile
依赖项以及将其引入的内容:
Additionally, if you want to check if something is compile
vs. testCompile
vs androidTestCompile
dependency as well as what is pulling it in:
./gradlew :app:dependencyInsight --configuration compile --dependency <name>
./gradlew :app:dependencyInsight --configuration testCompile --dependency <name>
./gradlew :app:dependencyInsight --configuration androidTestCompile --dependency <name>
这篇关于使用 gradle 查找依赖树的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文