If you have a Gradle Java Project and you want to generate a dependency tree for it, you can make use of the Gradle command: ./gradlew dependencies
Example:% ./gradlew dependencies
> Task :dependencies
------------------------------------------------------------
Root project 'java-examples'
------------------------------------------------------------
annotationProcessor - Annotation processors and their dependencies for source set 'main'.
No dependencies
apiElements - API elements for main. (n)
No dependencies
archives - Configuration for archive artifacts. (n)
No dependencies
compileClasspath - Compile classpath for source set 'main'.
\--- com.google.code.gson:gson:2.3.1
compileOnly - Compile only dependencies for source set 'main'. (n)
No dependencies
default - Configuration for default artifacts. (n)
No dependencies
implementation - Implementation only dependencies for source set 'main'. (n)
\--- com.google.code.gson:gson:2.3.1 (n)
runtimeClasspath - Runtime classpath of source set 'main'.
\--- com.google.code.gson:gson:2.3.1
runtimeElements - Elements of runtime for main. (n)
No dependencies
runtimeOnly - Runtime only dependencies for source set 'main'. (n)
No dependencies
testAnnotationProcessor - Annotation processors and their dependencies for source set 'test'.
No dependencies
testCompileClasspath - Compile classpath for source set 'test'.
+--- com.google.code.gson:gson:2.3.1
\--- org.junit.jupiter:junit-jupiter-api:5.8.1
+--- org.junit:junit-bom:5.8.1
| +--- org.junit.jupiter:junit-jupiter-api:5.8.1 (c)
| \--- org.junit.platform:junit-platform-commons:1.8.1 (c)
+--- org.opentest4j:opentest4j:1.2.0
+--- org.junit.platform:junit-platform-commons:1.8.1
| +--- org.junit:junit-bom:5.8.1 (*)
| \--- org.apiguardian:apiguardian-api:1.1.2
\--- org.apiguardian:apiguardian-api:1.1.2
testCompileOnly - Compile only dependencies for source set 'test'. (n)
No dependencies
testImplementation - Implementation only dependencies for source set 'test'. (n)
\--- org.junit.jupiter:junit-jupiter-api:5.8.1 (n)
testRuntimeClasspath - Runtime classpath of source set 'test'.
+--- com.google.code.gson:gson:2.3.1
+--- org.junit.jupiter:junit-jupiter-api:5.8.1
| +--- org.junit:junit-bom:5.8.1
| | +--- org.junit.jupiter:junit-jupiter-api:5.8.1 (c)
| | +--- org.junit.jupiter:junit-jupiter-engine:5.8.1 (c)
| | +--- org.junit.platform:junit-platform-commons:1.8.1 (c)
| | \--- org.junit.platform:junit-platform-engine:1.8.1 (c)
| +--- org.opentest4j:opentest4j:1.2.0
| \--- org.junit.platform:junit-platform-commons:1.8.1
| \--- org.junit:junit-bom:5.8.1 (*)
\--- org.junit.jupiter:junit-jupiter-engine:5.8.1
+--- org.junit:junit-bom:5.8.1 (*)
+--- org.junit.platform:junit-platform-engine:1.8.1
| +--- org.junit:junit-bom:5.8.1 (*)
| +--- org.opentest4j:opentest4j:1.2.0
| \--- org.junit.platform:junit-platform-commons:1.8.1 (*)
\--- org.junit.jupiter:junit-jupiter-api:5.8.1 (*)
testRuntimeOnly - Runtime only dependencies for source set 'test'. (n)
\--- org.junit.jupiter:junit-jupiter-engine:5.8.1 (n)
(c) - dependency constraint
(*) - dependencies omitted (listed previously)
(n) - Not resolved (configuration is not meant to be resolved)
A web-based, searchable dependency report is available by adding the --scan option.
BUILD SUCCESSFUL in 608ms
1 actionable task: 1 executed
More Posts related to Gradle,
- Run only a Single Unit Test using Gradle
- Run IntelliJ Java main method without Gradle build
- How to force re-download Gradle Dependencies
- How to Run Gradle Build Without Unit Test Cases
- Find installed Gradle version command
- Fix: Invalid Gradle JDK configuration found. Could not find the required JavaSDK
- Generate Project Dependency tree using Gradle Command
- Installing Gradle on macOS - Gradle Tutorial
- Gradle FAILURE: Build failed with an exception - Task not found in root project
- [Fix] ./gradlew: Permission denied
- Force Gradle to use specific Java JDK Version
- [fix] Deprecated gradle features were used in this build, making it incompatible with Gradle X.0
- Create a Gradle Java Project in VS Code
- Install Gradle VS Code for Java Projects
- Fix: Unsupported Java. Your build is currently configured to use Java 17.0.5 and Gradle 7.1.
- How to create Gradle Multi-Project in IntelliJ
- Fix: Spring Boot + IntelliJ + Gradle : Unsupported class file major version 64 Error
- Fix: Error: Could not find or load main class org.gradle.wrapper. GradleWrapperMain
- [fix] bash: gradlew: command not found
- [fix] Execution failed for task :core:compileJava - Could not find tools.jar
- Run Gradle Build without test cases
- How to add maven central repository in build.gradle
- Upgrade Gradle in Android Studio
- Task is ambiguous in root project gradle-examples. Candidates are: myTask1, myTask2
- Fix: Deprecated Gradle features were used in this build, making it incompatible with Gradle
More Posts:
- How to Change Notepad++ Toolbar Icons and size - NotepadPlusPlus
- Mac - Steam Needs to Be Online to Update. Please confirm your network connection and try again error - News
- How to resolve Failed to create interpreter PyCharm Error - Python
- Windows 365: Restore Deleted Distribution Group using Admin Center (Active Directory) - Windows
- Fix - ssh-copy-id no identities found error - Linux
- Microsoft Teams Error - You cannot add another work account to Teams at the moment - Teams
- Fix: Failed in attempting to update the source: winget - Windows
- How to Replace delimiter with new line in Notepad++ - NotepadPlusPlus