Groovy Documentation

org.gradle.api.artifacts
[Java] Interface DependencyResolveDetails


@Incubating
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 Summary
ModuleVersionSelector getRequested()

The module, before it is resolved.

ModuleVersionSelector getTarget()

The target module selector used to resolve the dependency.

void useVersion(String version)

Allows to override the version when the dependency getRequested() is resolved.

 

Method Detail

getRequested

public ModuleVersionSelector 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.


getTarget

public ModuleVersionSelector getTarget()
The target module selector used to resolve the dependency. Never returns null. Target module is updated when methods like useVersion(String) are used.


useVersion

public void useVersion(String version)
Allows to override the version when the dependency getRequested() is resolved. Can be used to select a version that is different than requested. Forcing modules via ResolutionStrategy.force uses this capability. Configuring a version different than requested will cause getTarget() method return a target module with updated target version. It is valid to configure the same version as requested.
Parameters:
version - to use when resolving this dependency, cannot be null


 

Gradle API 1.4