Interface LenientConfiguration


public interface LenientConfiguration
Resolved configuration that does not fail eagerly when some dependencies are not resolved, or some artifacts do not exist.

This is a legacy API. Avoid this class for new code. Lenient artifacts can be acquired through a lenient ArtifactView. This API will be deprecated and removed in future Gradle versions.

  • This class is not configuration-cache compatible.
  • Returned file sets do not track task dependencies.
  • The returned types do not reflect the variant-aware nature of the dependency resolution engine.
  • Method Details

    • getFirstLevelModuleDependencies

      Set<ResolvedDependency> getFirstLevelModuleDependencies()
      Returns successfully resolved direct dependencies.

      Prefer ResolutionResult for traversing the resolved graph or ArtifactView.getArtifacts() for accessing the resolved artifacts.

      Returns:
      only resolved dependencies
      Since:
      3.3
    • getFirstLevelModuleDependencies

      @Deprecated Set<ResolvedDependency> getFirstLevelModuleDependencies(Spec<? super Dependency> dependencySpec)
      Returns successfully resolved dependencies that match the given spec.
      Parameters:
      dependencySpec - dependency spec
      Returns:
      only resolved dependencies
    • getAllModuleDependencies

      Set<ResolvedDependency> getAllModuleDependencies()
      Returns all successfully resolved dependencies including transitive dependencies.

      Prefer ResolutionResult for traversing the resolved graph or ArtifactView.getArtifacts() for accessing the resolved artifacts.

      Returns:
      all resolved dependencies
      Since:
      3.1
    • getUnresolvedModuleDependencies

      Set<UnresolvedDependency> getUnresolvedModuleDependencies()
      returns dependencies that were attempted to resolve but failed. If empty then all dependencies are neatly resolved.

      Prefer ResolutionResult.

      Returns:
      only unresolved dependencies
    • getFiles

      @Deprecated Set<File> getFiles()
      Deprecated.
      Use a lenient ArtifactView instead.
      Returns successfully resolved files. Ignores dependencies or files that cannot be resolved.
      Returns:
      resolved dependencies files
      Since:
      3.3
    • getFiles

      @Deprecated Set<File> getFiles(Spec<? super Dependency> dependencySpec)
      Deprecated.
      Use a lenient ArtifactView with a componentFilter instead.
      Returns successfully resolved files. Ignores dependencies or files that cannot be resolved.
      Parameters:
      dependencySpec - dependency spec
      Returns:
      resolved dependencies files
    • getArtifacts

      Set<ResolvedArtifact> getArtifacts()
      Gets successfully resolved artifacts. Ignores dependencies or files that cannot be resolved.

      Prefer ArtifactView.getArtifacts().

      Returns:
      successfully resolved artifacts
      Since:
      3.3
    • getArtifacts

      @Deprecated Set<ResolvedArtifact> getArtifacts(Spec<? super Dependency> dependencySpec)
      Deprecated.
      Use a lenient ArtifactView with a componentFilter instead.
      Gets successfully resolved artifacts. Ignores dependencies or files that cannot be resolved.
      Parameters:
      dependencySpec - dependency spec
      Returns:
      successfully resolved artifacts for dependencies that match given dependency spec