Package org.gradle.api.artifacts
Interface ResolvedConfiguration
-
public interface ResolvedConfigurationAResolvedConfigurationrepresents the result of resolving aConfiguration, and provides access to both the graph and artifacts of the result.This is a legacy API. Avoid this class for new code. Prefer accessing resolution outputs via
Configuration.getIncoming(). 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 Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.util.Set<java.io.File>getFiles()Deprecated.UseResolvableDependencies.getFiles()instead.java.util.Set<java.io.File>getFiles(Spec<? super Dependency> dependencySpec)Deprecated.Use anArtifactViewwith acomponentFilterinstead.java.util.Set<ResolvedDependency>getFirstLevelModuleDependencies()Returns theResolvedDependencyinstances for each direct dependency of the configuration.java.util.Set<ResolvedDependency>getFirstLevelModuleDependencies(Spec<? super Dependency> dependencySpec)Deprecated.LenientConfigurationgetLenientConfiguration()Provides configuration that does not fail eagerly when some dependencies are not resolved.java.util.Set<ResolvedArtifact>getResolvedArtifacts()Returns the set of artifact meta-data for this configuration.booleanhasError()Returns whether all dependencies were successfully retrieved or not.voidrethrowFailure()A resolve of a configuration that is not successful does not automatically throws an exception.
-
-
-
Method Detail
-
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
void rethrowFailure() throws ResolveExceptionA 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
@Deprecated java.util.Set<java.io.File> getFiles() throws ResolveExceptionDeprecated.UseResolvableDependencies.getFiles()instead.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
@Deprecated java.util.Set<java.io.File> getFiles(Spec<? super Dependency> dependencySpec) throws ResolveException
Deprecated.Use anArtifactViewwith acomponentFilterinstead.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
java.util.Set<ResolvedDependency> getFirstLevelModuleDependencies() throws ResolveException
Returns theResolvedDependencyinstances for each direct dependency of the configuration. Via those you have access to allResolvedDependencyinstances, including the transitive dependencies of the configuration.Prefer
ResolutionResultfor traversing the resolved graph orResolvableDependencies.getArtifacts()for accessing the resolved artifacts.- Returns:
- A
ResolvedDependencyinstance for each direct dependency. - Throws:
ResolveException- when the resolve was not successful.
-
getFirstLevelModuleDependencies
@Deprecated java.util.Set<ResolvedDependency> getFirstLevelModuleDependencies(Spec<? super Dependency> dependencySpec) throws ResolveException
Deprecated.Returns theResolvedDependencyinstances for each direct dependency of the configuration that matches the given spec. Via those you have access to allResolvedDependencyinstances, including the transitive dependencies of the configuration.- Parameters:
dependencySpec- A filter for the dependencies to be resolved.- Returns:
- A
ResolvedDependencyinstance for each direct dependency. - Throws:
ResolveException- when the resolve was not successful.
-
getResolvedArtifacts
java.util.Set<ResolvedArtifact> getResolvedArtifacts() throws ResolveException
Returns the set of artifact meta-data for this configuration.- Returns:
- The set of artifacts.
- Throws:
ResolveException- when the resolve was not successful.
-
-