Package org.gradle.api.artifacts
Interface ResolvedConfiguration
public interface ResolvedConfiguration
A
ResolvedConfiguration
represents the result of resolving a Configuration
, and provides access
to both the artifacts and the meta-data of the result.-
Method Summary
Modifier and TypeMethodDescriptiongetFiles()
Returns the files for the configuration dependencies.getFiles
(Spec<? super Dependency> dependencySpec) Returns the files for the specified subset of configuration dependencies.Returns theResolvedDependency
instances for each direct dependency of the configuration.getFirstLevelModuleDependencies
(Spec<? super Dependency> dependencySpec) Returns theResolvedDependency
instances for each direct dependency of the configuration that matches the given spec.Provides configuration that does not fail eagerly when some dependencies are not resolved.Returns the set of artifact meta-data for this configuration.boolean
hasError()
Returns whether all dependencies were successfully retrieved or not.void
A resolve of a configuration that is not successful does not automatically throws an exception.
-
Method Details
-
hasError
boolean hasError()Returns whether all dependencies were successfully retrieved or not. -
getLenientConfiguration
LenientConfiguration getLenientConfiguration()Provides configuration that does not fail eagerly when some dependencies are not resolved. -
rethrowFailure
A resolve of a configuration that is not successful does not automatically throws an exception. Such a exception is only thrown if the result of a resolve is accessed. You can force the throwing of such an exception by calling this method.This method does nothing when resolution was successful.
- Throws:
ResolveException
- when the resolve was not successful.
-
getFiles
Returns the files for the configuration dependencies.- Returns:
- The artifact files of the specified dependencies.
- Throws:
ResolveException
- when the resolve was not successful.- Since:
- 3.3
-
getFiles
Returns the files for the specified subset of configuration dependencies.- Parameters:
dependencySpec
- The filter for the configuration dependencies.- Returns:
- The artifact files of the specified dependencies.
- Throws:
ResolveException
- when the resolve was not successful.
-
getFirstLevelModuleDependencies
Returns theResolvedDependency
instances for each direct dependency of the configuration. Via those you have access to allResolvedDependency
instances, including the transitive dependencies of the configuration.- Returns:
- A
ResolvedDependency
instance for each direct dependency. - Throws:
ResolveException
- when the resolve was not successful.
-
getFirstLevelModuleDependencies
Set<ResolvedDependency> getFirstLevelModuleDependencies(Spec<? super Dependency> dependencySpec) throws ResolveException Returns theResolvedDependency
instances for each direct dependency of the configuration that matches the given spec. Via those you have access to allResolvedDependency
instances, including the transitive dependencies of the configuration.- Parameters:
dependencySpec
- A filter for the dependencies to be resolved.- Returns:
- A
ResolvedDependency
instance for each direct dependency. - Throws:
ResolveException
- when the resolve was not successful.
-
getResolvedArtifacts
Returns the set of artifact meta-data for this configuration.- Returns:
- The set of artifacts.
- Throws:
ResolveException
- when the resolve was not successful.
-