org.gradle.api.artifacts.result
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<? super DependencyResult> action)
          Applies given action for each dependency.
 void allDependencies(Closure closure)
          Applies given closure for each dependency.
 void allModuleVersions(Action<? super ResolvedModuleVersionResult> action)
          Applies given action for each module.
 void allModuleVersions(Closure closure)
          Applies given closure for each module.
 Set<? extends DependencyResult> getAllDependencies()
          Retrieves all dependencies, including unresolved dependencies.
 Set<ResolvedModuleVersionResult> getAllModuleVersions()
          Retrieves all instances of ResolvedModuleVersionResult from the graph, e.g.
 ResolvedModuleVersionResult getRoot()
          Gives access to the resolved dependency graph.
 

Method Detail

getRoot

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

getAllDependencies

Set<? extends DependencyResult> 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.

allDependencies

void allDependencies(Action<? super DependencyResult> 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

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

getAllModuleVersions

Set<ResolvedModuleVersionResult> getAllModuleVersions()
Retrieves all instances of ResolvedModuleVersionResult from the graph, e.g. all nodes of the dependency graph.

Returns:
all nodes of the dependency graph.

allModuleVersions

void allModuleVersions(Action<? super ResolvedModuleVersionResult> 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

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