Using gradle to find dependency tree

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

    If you find it hard to navigate console output of gradle dependencies, you can add the Project reports plugin:

    apply plugin: 'project-report'
    

    And generate a HTML report using:

    $ ./gradlew htmlDependencyReport
    

    Report can normally be found in build/reports/project/dependencies/index.html

    It looks like this:

提交回复
热议问题