Groovy Documentation

org.gradle.api.artifacts.result
[Java] Interface ResolutionResult


@Incubating
public interface ResolutionResult

Contains the information about the resolution result. Gives access to the resolved dependency graph. In future it will contain more convenience methods and other useful information about the resolution results.


Method Summary
void allDependencies(Action action)

Applies given action for each dependency.

void allDependencies(Closure closure)

Applies given closure for each dependency.

void allModuleVersions(Action action)

Applies given action for each module.

void allModuleVersions(Closure closure)

Applies given closure for each module.

Set getAllDependencies()

Retrieves all dependencies, including unresolved dependencies.

Set getAllModuleVersions()

Retrieves all instances of ResolvedModuleVersionResult from the graph, e.g. all nodes of the dependency graph.

ResolvedModuleVersionResult getRoot()

Gives access to the resolved dependency graph.

 

Method Detail

allDependencies

public void allDependencies(Action action)
Applies given action for each dependency. An instance of DependencyResult is passed as parameter to the action.
Parameters:
action - - action that is applied for each dependency


allDependencies

public void allDependencies(Closure closure)
Applies given closure for each dependency. An instance of DependencyResult is passed as parameter to the closure.
Parameters:
closure - - closure that is applied for each dependency


allModuleVersions

public void allModuleVersions(Action action)
Applies given action for each module. An instance of ResolvedModuleVersionResult is passed as parameter to the action.
Parameters:
action - - action that is applied for each module


allModuleVersions

public void allModuleVersions(Closure closure)
Applies given closure for each module. An instance of ResolvedModuleVersionResult is passed as parameter to the closure.
Parameters:
closure - - closure that is applied for each module


getAllDependencies

public Set getAllDependencies()
Retrieves all dependencies, including unresolved dependencies. Resolved dependencies are represented by instances of ResolvedDependencyResult, unresolved dependencies by UnresolvedDependencyResult. In dependency graph terminology, this method returns the edges of the graph.
Returns:
all dependencies, including unresolved dependencies.


getAllModuleVersions

public Set getAllModuleVersions()
Retrieves all instances of ResolvedModuleVersionResult from the graph, e.g. all nodes of the dependency graph.
Returns:
all nodes of the dependency graph.


getRoot

public ResolvedModuleVersionResult getRoot()
Gives access to the resolved dependency graph. You can walk the graph recursively from the root to obtain information about resolved dependencies. For example, Gradle's built-in 'dependencies' uses it to render the dependency tree.
Returns:
the root node of the resolved dependency graph


 

Gradle API 1.8