Comparable<Task>
, org.gradle.api.internal.DynamicObjectAware
, org.gradle.api.internal.TaskInternal
, ExtensionAware
, Task
, org.gradle.util.Configurable<Task>
public class DependencyInsightReportTask extends DefaultTask
While the regular dependencies report (DependencyReportTask
) shows the path from the top level dependencies down through the transitive dependencies,
the dependency insight report shows the path from a particular dependency to the dependencies that pulled it in.
That is, it is an inverted view of the regular dependencies report.
The task requires setting the dependency spec and the configuration.
For more information on how to configure those please refer to docs for
setDependencySpec(Object)
and
setConfiguration(String)
.
The task can also be configured from the command line.
For more information please refer to setDependencySpec(Object)
and setConfiguration(String)
Task.Namer
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
Constructor | Description |
---|---|
DependencyInsightReportTask() |
Modifier and Type | Method | Description |
---|---|---|
protected org.gradle.api.internal.attributes.ImmutableAttributesFactory |
getAttributesFactory() |
An injected
ImmutableAttributesFactory . |
Configuration |
getConfiguration() |
Configuration to look the dependency in
|
Spec<DependencyResult> |
getDependencySpec() |
Selects the dependency (or dependencies if multiple matches found) to show the report for.
|
protected org.gradle.internal.logging.text.StyledTextOutputFactory |
getTextOutputFactory() |
|
protected org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.VersionComparator |
getVersionComparator() |
|
protected org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.VersionParser |
getVersionParser() |
|
protected org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.VersionSelectorScheme |
getVersionSelectorScheme() |
|
boolean |
isShowSinglePathToDependency() |
Tells if the report should only show one path to each dependency.
|
void |
report() |
|
void |
setConfiguration(String configurationName) |
Sets the configuration (via name) to look the dependency in.
|
void |
setConfiguration(Configuration configuration) |
Sets the configuration to look the dependency in.
|
void |
setDependencySpec(Object dependencyInsightNotation) |
Configures the dependency to show the report for.
|
void |
setDependencySpec(Spec<DependencyResult> dependencySpec) |
The dependency spec selects the dependency (or dependencies if multiple matches found) to show the report for.
|
void |
setShowSinglePathToDependency(boolean showSinglePathToDependency) |
Tells if the report should only display a single path to each dependency, which
can be useful when the graph is large.
|
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService
appendParallelSafeAction, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getOnlyIf, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, prependParallelSafeAction, setImpliesSubProjects
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConvention
@Internal public Spec<DependencyResult> getDependencySpec()
public void setDependencySpec(Spec<DependencyResult> dependencySpec)
DependencyResult
as parameter.public void setDependencySpec(Object dependencyInsightNotation)
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(Spec)
This method is exposed to the command line interface. Example usage:
gradle dependencyInsight --dependency slf4j
@Internal public Configuration getConfiguration()
public void setConfiguration(Configuration configuration)
public void setConfiguration(String configurationName)
This method is exposed to the command line interface. Example usage:
gradle dependencyInsight --configuration runtime --dependency slf4j
@Internal public boolean isShowSinglePathToDependency()
public void setShowSinglePathToDependency(boolean showSinglePathToDependency)
@Inject protected org.gradle.internal.logging.text.StyledTextOutputFactory getTextOutputFactory()
@Inject protected org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.VersionSelectorScheme getVersionSelectorScheme()
@Inject protected org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.VersionComparator getVersionComparator()
@Inject protected org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.VersionParser getVersionParser()
@Inject protected org.gradle.api.internal.attributes.ImmutableAttributesFactory getAttributesFactory()
ImmutableAttributesFactory
.public void report()