api / org.gradle.api.artifacts.result / DependencyResult

DependencyResult

@Incubating interface DependencyResult

An edge in the dependency graph. Provides information about the origin of the dependency and the requested component.

See Also
ResolutionResult

Functions

getFrom

abstract fun getFrom(): ResolvedComponentResult

Returns the origin of the dependency.

getRequested

abstract fun getRequested(): ComponentSelector

Returns the requested component.

The return type is declared as an opaque org.gradle.api.artifacts.component.ComponentSelector, however the selector may also implement one of the following interfaces:

  • org.gradle.api.artifacts.component.ProjectComponentSelector for those dependencies that request a component from some other project in the current build.
  • org.gradle.api.artifacts.component.ModuleComponentSelector for those dependencies that request a component to be found in some repository.

Inheritors

ResolvedDependencyResult

interface ResolvedDependencyResult : DependencyResult

A dependency that was resolved successfully.

UnresolvedDependencyResult

interface UnresolvedDependencyResult : DependencyResult

A dependency that could not be resolved.