api / org.gradle.api.artifacts.result / UnresolvedDependencyResult

UnresolvedDependencyResult

@Incubating interface UnresolvedDependencyResult : DependencyResult

A dependency that could not be resolved.

Functions

getAttempted

abstract fun getAttempted(): ComponentSelector

Returns the selector that was attempted to be resolved. This may not be the same as the requested component.

getAttemptedReason

abstract fun getAttemptedReason(): ComponentSelectionReason

Returns the reasons why the failed selector was attempted.

getFailure

abstract fun getFailure(): Throwable

The failure that occurred.

Inherited 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.