Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View Gradle dependency tree in Eclipse

Tags:

Is it possible to visualize the dependency tree from inside of Eclipse (e.g. the output of gradle dependencies)? Expanding the Gradle Dependencies tree in Eclipse is a flat view and does not show dependencies for other projects (e.g. if I have a dependency compile project(':project2'), none of project2's dependencies are shown).

Based on this it looks like a tree view is not supported?

Basically I'm looking for the equivalent of this in the maven plugin:

enter image description here

like image 201
Chris K Avatar asked Sep 29 '15 21:09

Chris K


People also ask

How do you read a Gradle dependency tree?

In Gradle dependencies are libraries required to build your code. Each of these libraries may have their own dependencies, adding transitive dependencies to your project. This structure is called the Gradle dependency tree, with its own rules on dependency conflict resolution and more.

How do I print a Gradle dependency tree?

Right-click on gradle task->"Dependency Tree" to print task dependencies.

How can I see dependencies in eclipse?

Right-click the project, then select "Properties", then "Java Build Path". The tabs "Projects" and "Libraries" list what the project depends on. Note that the "Order and Export" tab alllows you to have indirect dependencies. All the information here is saved in a file named .


2 Answers

At the time of writing, neither Spring Eclipse Integration Gradle nor Buildship provide a Dependency Hierarchy view we know from m2e.

I don't know when this has been implemented but you can do a gradle dependencies either on command-line or via Buildship Gradle Tasks view within Eclipse. This prints a nice dependency tree of your project's dependencies to the console.

like image 101
thokuest Avatar answered Oct 16 '22 09:10

thokuest


For me, it was simply one command

in build.gradle add plugin

apply plugin: 'project-report' 

and then go to cmd and run following command

./gradlew htmlDependencyReport 

This give me a HTML report WOW Html report 💕


Or if you want the report in a txt file, to make search easy use following command

gradlew dependencyReport 

enter image description here

That's all my lord.

like image 26
Dupinder Singh Avatar answered Oct 16 '22 08:10

Dupinder Singh