# setDependencySpec

open fun setDependencySpec(@Nullable dependencyInsightNotation: @Nullable Any)

Configures the dependency to show the report for. Multiple notation formats are supported: Strings, instances of Spec and groovy closures. Spec and closure receive DependencyResult as parameter. Examples of String notation: 'org.slf4j:slf4j-api', 'slf4j-api', or simply: 'slf4j'. The input may potentially match multiple dependencies. See also setDependencySpec

This method is exposed to the command line interface. Example usage:

    gradle dependencyInsight --dependency slf4j

Content copied to clipboard

open fun setDependencySpec(@Nullable dependencySpec: @Nullable Spec<DependencyResult>)

The dependency spec selects the dependency (or dependencies if multiple matches found) to show the report for. The spec receives an instance of DependencyResult as parameter.