Prev Next

DevOps / Gradle interview questions

What is the dependencyInsight task in Gradle?

Every Gradle project provides the task dependencyInsight to render the so-called dependency insight report from the command line. Given a dependency in the dependency graph, you can identify the selection reason and track down the origin of the dependency selection. You can think of the dependency insight report as the inverse representation of the dependency report for a given dependency.

The dependency insight report answers the below queries.

  • Why is this dependency in the dependency graph?
  • Exactly which dependencies are pulling this dependency into the graph?
  • What is the actual version (i.e. *selected* version) of the dependency that will be used? Is it the same as what was *requested*?
  • Why is the *selected* version of a dependency different to the *requested*
gradle -q dependencyInsight --dependency commons-codec --configuration scm

More Related questions...

Show more question and Answers...


Comments & Discussions