Skip to content
Latchkey

gradle dependencies: Usage & Common CI Errors

Print the resolved dependency tree, per configuration.

dependencies is the built-in Gradle report task that prints the dependency tree for each configuration (compileClasspath, runtimeClasspath, testRuntimeClasspath, etc.), showing transitive dependencies and how Gradle resolved version conflicts.

What it does

dependencies lists every configuration and its resolved tree, annotating selected versions (e.g. "1.2 -> 1.4") where conflict resolution upgraded a dependency. Scope it to one configuration with --configuration to cut the noise.

Common usage

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

Common error in CI (and the fix)

Symptom: a NoSuchMethodError or NoClassDefFoundError at runtime from two versions of the same library. Cause: conflicting transitive versions; Gradle picks the highest by default, which may be incompatible. Fix: run dependencies (or dependencyInsight) to see the "X -> Y" upgrade, then pin the version with a constraint in the dependencies block or a resolutionStrategy.force, or exclude the unwanted transitive path.

Related guides

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