Using gradle to find dependency tree

后端 未结 14 1931
-上瘾入骨i
-上瘾入骨i 2020-11-22 03:20

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

14条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-22 03:44

    Often the complete testImplementation, implementation, and androidTestImplementation dependency graph is too much to examine together. If you merely want the implementation dependency graph you can use:

    ./gradlew app:dependencies --configuration implementation
    

    Source: Gradle docs section 4.7.6

    Note: compile has been deprecated in more recent versions of Gradle and in more recent versions you are advised to shift all of your compile dependencies to implementation. Please see this answer here

提交回复
热议问题