使用 gradle 查找依赖树

编程入门 行业动态 更新时间:2024-10-27 02:30:45
本文介绍了使用 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 查找依赖树

本文发布于:2023-11-14 04:57:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1586282.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:gradle

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!