Package org.gradle.api.artifacts
Interface ArtifactCollection
-
- All Superinterfaces:
java.lang.Iterable<ResolvedArtifactResult>
public interface ArtifactCollection extends java.lang.Iterable<ResolvedArtifactResult>
A collection of artifacts resolved for a configuration. The configuration is resolved on demand when the collection is queried.- Since:
- 3.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FileCollection
getArtifactFiles()
A file collection containing the files for all artifacts in this collection.java.util.Set<ResolvedArtifactResult>
getArtifacts()
Returns the resolved artifacts, performing the resolution if required.java.util.Collection<java.lang.Throwable>
getFailures()
Returns any failures to resolve the artifacts for this collection.Provider<java.util.Set<ResolvedArtifactResult>>
getResolvedArtifacts()
Returns the resolved artifacts as aProvider
ofResolvedArtifactResult
instances.
-
-
-
Method Detail
-
getArtifactFiles
FileCollection getArtifactFiles()
A file collection containing the files for all artifacts in this collection. This is primarily useful to wire this artifact collection as a task input.
-
getArtifacts
java.util.Set<ResolvedArtifactResult> getArtifacts()
Returns the resolved artifacts, performing the resolution if required. This will resolve the artifact metadata and download the artifact files as required.- Throws:
ResolveException
- On failure to resolve or download any artifact.
-
getResolvedArtifacts
Provider<java.util.Set<ResolvedArtifactResult>> getResolvedArtifacts()
Returns the resolved artifacts as aProvider
ofResolvedArtifactResult
instances. The returnedProvider
is live, and tracks the producer tasks of this artifact collection. The provider will resolve the artifact metadata and download the artifact files as required.- Since:
- 7.4
-
getFailures
java.util.Collection<java.lang.Throwable> getFailures()
Returns any failures to resolve the artifacts for this collection.- Returns:
- A collection of exceptions, one for each failure in resolution.
- Since:
- 4.0
-
-