Package org.gradle.api.artifacts
Interface DependencyResolveDetails
public interface DependencyResolveDetails
Provides details about a dependency when it is resolved.
 Provides means to manipulate dependency metadata when it is resolved.
- Since:
- 1.4
- 
Method SummaryModifier and TypeMethodDescriptionartifactSelection(Action<? super ArtifactSelectionDetails> details) Configures the artifact selection for the target component of this dependency resolution rule.Sets a human readable description for the reason the component is selected.The module, before it is resolved.The target module selector used to resolve the dependency.voidAllows to override the details of the dependency (seegetTarget()) when it is resolved (seegetRequested()).voiduseVersion(String version) Allows to override the version when the dependencygetRequested()is resolved.
- 
Method Details- 
getRequestedModuleVersionSelector getRequested()The module, before it is resolved. The requested module does not change even if there are multiple dependency resolve rules that manipulate the dependency metadata.
- 
useVersionAllows to override the version when the dependencygetRequested()is resolved. Can be used to select a version that is different than requested. Forcing modules viaResolutionStrategy.force(Object...)uses this capability. Configuring a version different than requested will causegetTarget()method return a target module with updated target version.If you need to change not only the version but also group or name please use the useTarget(Object)method.- Parameters:
- version- to use when resolving this dependency, cannot be null. It is valid to configure the same version as requested.
 
- 
useTargetAllows to override the details of the dependency (seegetTarget()) when it is resolved (seegetRequested()). This method can be used to change the dependency before it is resolved, e.g. change group, name or version (or all three of them). In many cases users are interested in changing the version. For such scenario you can use theuseVersion(String)method.- Parameters:
- notation- the notation that gets parsed into an instance of- ModuleVersionSelector. You can pass Strings like 'org.gradle:gradle-core:1.4', Maps like [group: 'org.gradle', name: 'gradle-core', version: '1.4'], or instances of ModuleVersionSelector.
- Since:
- 1.5
 
- 
getTargetModuleVersionSelector getTarget()The target module selector used to resolve the dependency. Never returns null. Target module is updated when methods likeuseVersion(String)are used.
- 
becauseSets a human readable description for the reason the component is selected. The description will only be used if the rule is actually selecting a target, either usinguseVersion(String)oruseTarget(Object)- Parameters:
- description- a description of the selection reason
- Returns:
- this details object
- Since:
- 4.5
 
- 
artifactSelectionConfigures the artifact selection for the target component of this dependency resolution rule.- Parameters:
- details- the artifact selection details
- Since:
- 6.6
 
 
-