Schnittstelle ResolvedComponentResult

Alle Superschnittstellen:
ComponentResult

public interface ResolvedComponentResult extends ComponentResult
Represents a component instance in the resolved dependency graph. Provides some basic identity and dependency information about the component.
  • Methodendetails

    • getDependencies

      Set<? extends DependencyResult> getDependencies()

      Returns the dependencies of this component. Includes resolved and unresolved dependencies (if any).

      The elements of the returned collection are declared as DependencyResult, however the dependency instances will also implement one of the following interfaces:

      Gibt zurück:
      the dependencies of this component
    • getDependents

      Set<? extends ResolvedDependencyResult> getDependents()
      Returns the incoming dependencies of this component.
      Gibt zurück:
      the dependents of this component
    • getSelectionReason

      ComponentSelectionReason getSelectionReason()
      Returns the reason why this particular component was selected in the result. Useful if multiple candidate components were found during dependency resolution.
      Gibt zurück:
      the reason for selecting the component
    • getModuleVersion

      Returns the module version which this component belongs to, if any. A component will belong to a module version if it was found in some repository, or if the module version for the component has been declared, usually by declaring how the component should be published.
      Gibt zurück:
      the module version of the component, or null if this component has no associated module version.
    • getVariants

      List<ResolvedVariantResult> getVariants()
      Returns the variants that were selected for this component. When Gradle metadata is not used, this usually only refers to the target "configuration" (for an Ivy dependency) or "scope" (for a Maven dependency).
      Gibt zurück:
      the resolved variants for this component
      Seit:
      5.2
    • getDependenciesForVariant

      List<DependencyResult> getDependenciesForVariant(ResolvedVariantResult variant)
      Returns the dependencies of a specific variant. It is possible for a component to be selected multiple times with different variants (for example, the main component and its test fixtures). The dependencies of each variant are different, but the method doesn't give access to each variant individual dependencies.

      The variant must be a selected variant of this component.

      Parameter:
      variant - the variant to find the dependencies for
      Löst aus:
      IllegalStateException - if the variant is not a selected variant of this component
      Seit:
      5.6