Category: Gradle
You can display the dependency tree for a project from the command line or by generating a searchable report using the --scan
option.
gradle -q dependencies --configuration testRuntimeClasspath
Note: The dependencies task selector will only execute the dependencies task on a single project. You must include the --project
flag to select a project other than the root project.
Assume you want to see specifics related to a dependency that you think exists across all configurations in your project. For example, the log4j
dependency:
gradle dependencyInsight --dependency log4j
Including the --scan
option will generate a web based searchable report at gradle.org.
gradle dependencyInsight --dependency log4j --scan
See Viewing and debugging dependencies for more details.