Using gradle to find dependency tree

后端 未结 14 1743
-上瘾入骨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:41

    For recent versions of Gradle (I tested with the 6.4.1 version):

    gradle dependencies --configuration compileClasspath
    

    or if you're using the Gradle Wrapper:

    gradlew dependencies --configuration compileClasspath
    

    When building for Android with the 'debug' and 'release' compilation profiles, the debugCompileClasspath and releaseCompileClasspath configurations can be used instead of compileClasspath.

提交回复
热议问题