gradle-dependencyinsight
Gradle dependency tracing tool
TLDR
SYNOPSIS
gradle dependencyInsight [options]
DESCRIPTION
gradle dependencyInsight traces why a specific dependency appears in the build. It shows the path from direct dependencies to the transitive inclusion, revealing how version conflicts are resolved.The --dependency value is matched partially against the group, name, or version of dependencies, so a query like `guava` will match `com.google.guava:guava:31.1-jre`.The task is essential for debugging dependency issues and understanding why specific versions are selected during resolution.
PARAMETERS
--dependency NAME
Required. The dependency to trace. Matches partially against group, name, or version.--configuration NAME
Configuration to inspect (e.g., compileClasspath, runtimeClasspath). Defaults to compileClasspath for Java projects.--singlepath
Show only one path to each dependency instead of all paths. Useful for large dependency graphs.
CAVEATS
The --dependency flag is required. Without --configuration, the task defaults to compileClasspath in Java projects. The dependency value uses partial matching, which may return unexpected results for common names.
SEE ALSO
gradle(1), gradle-dependencies(1)
