Skip to content
Latchkey

gradle dependencies: Print the Dependency Tree

gradle dependencies prints the full resolved dependency tree for each configuration, showing which versions won conflict resolution.

When a transitive version is not what you expect, dependencies is the report task to run. Filter to one configuration to keep the output readable.

What it does

The dependencies task is a report task that lists every configuration and the resolved tree under it. Annotations explain resolution: (*) marks an already-shown subtree, -> shows a version upgrade chosen by conflict resolution, and (c) (with constraints) or (n) (not resolved) appear depending on Gradle version.

Common usage

Terminal
./gradlew dependencies
./gradlew dependencies --configuration runtimeClasspath
./gradlew :app:dependencies --configuration compileClasspath

Flags

FlagWhat it does
--configuration <name>Show only one configuration (e.g. runtimeClasspath)
:<project>:dependenciesRun for a specific subproject
--console=plainAvoid console rewriting in the captured log

In CI

Capture ./gradlew dependencies --configuration runtimeClasspath output as a job artifact when debugging a version drift. The -> arrows tell you exactly which requested version was bumped, which is the fastest way to explain a surprise upgrade.

Common errors in CI

"Could not resolve all dependencies for configuration" means the report itself hit a resolution failure (missing artifact or repo auth); fix the dependency before reading the tree. "Configuration 'X' not found" means the name is wrong; run ./gradlew dependencies with no filter first to list valid configuration names.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →