本文介绍了使用 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 查找依赖树
发布评论