# Package-level declarations

Classes for declaring and using artifacts and artifact dependencies.

## Types

ArtifactCollection
Link copied to clipboard
interface ArtifactCollection : Iterable<T>
A collection of artifacts resolved for a configuration.
ArtifactIdentifier
Link copied to clipboard
interface ArtifactIdentifier
The identifier for a module artifact.
ArtifactRepositoryContainer
Link copied to clipboard
interface ArtifactRepositoryContainer : NamedDomainObjectList<T> , Configurable<T>
A `ResolverContainer` is responsible for managing a set of ArtifactRepository instances.
ArtifactSelectionDetails
Link copied to clipboard
interface ArtifactSelectionDetails
Details about artifact dependency substitution: this class gives access to the original dependency requested artifacts, if any, and gives the opportunity to replace the original requested artifacts with other artifacts.
ArtifactView
Link copied to clipboard
interface ArtifactView : HasAttributes
A view over the artifacts resolved for this set of dependencies.
CacheableRule
Link copied to clipboard
@Documented
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = [ElementType.TYPE])
annotation class CacheableRule
Declares a rule eligible for caching.
CapabilitiesResolution
Link copied to clipboard
interface CapabilitiesResolution
Allows configuring the capabilities resolution strategy.
CapabilityResolutionDetails
Link copied to clipboard
interface CapabilityResolutionDetails
Gives access to the resolution details of a single capability conflict.
ClientModule
Link copied to clipboard
interface ClientModule : ExternalModuleDependency
To model a module in your dependency declarations.
ComponentMetadata
Link copied to clipboard
interface ComponentMetadata : HasAttributes
Provides a read-only view of a resolved component's metadata, which typically originates from a component descriptor (Ivy file, Maven POM).
ComponentMetadataBuilder
Link copied to clipboard
interface ComponentMetadataBuilder
A component metadata builder.
ComponentMetadataContext
Link copied to clipboard
interface ComponentMetadataContext
Provides access to component metadata from a ComponentMetadataRule.
ComponentMetadataDetails
Link copied to clipboard
@NonExtensible
interface ComponentMetadataDetails : ComponentMetadata, HasConfigurableAttributes<SELF>
Describes a resolved component's metadata, which typically originates from a component descriptor (Ivy file, Maven POM).
ComponentMetadataListerDetails
Link copied to clipboard
interface ComponentMetadataListerDetails
Allows a custom version lister to specify the list of versions known for a specific module.
ComponentMetadataRule
Link copied to clipboard
interface ComponentMetadataRule : Action<T>
A rule that modify component metadata.
ComponentMetadataSupplier
Link copied to clipboard
interface ComponentMetadataSupplier : Action<T>
A component metadata rule is responsible for providing the initial metadata of a component from a remote repository, in place of parsing the descriptor.
ComponentMetadataSupplierDetails
Link copied to clipboard
interface ComponentMetadataSupplierDetails
A component metadata rule details, giving access to the identifier of the component being resolved, the metadata builder, and the repository resource accessor for this.
ComponentMetadataVersionLister
Link copied to clipboard
interface ComponentMetadataVersionLister : Action<T>
Interface for custom version listers.
ComponentModuleMetadata
Link copied to clipboard
interface ComponentModuleMetadata
Contains immutable component module metadata information.
ComponentModuleMetadataDetails
Link copied to clipboard
interface ComponentModuleMetadataDetails : ComponentModuleMetadata
Contains and allows configuring component module metadata information.
ComponentSelection
Link copied to clipboard
interface ComponentSelection
Represents a tuple of the component selector of a module and a candidate version to be evaluated in a component selection rule.
ComponentSelectionRules
Link copied to clipboard
interface ComponentSelectionRules
Represents a container for component selection rules.
ComponentVariantIdentifier
Link copied to clipboard
interface ComponentVariantIdentifier
Identifies a variant of a component by component identifier and variant name.
ConfigurablePublishArtifact
Link copied to clipboard
interface ConfigurablePublishArtifact : PublishArtifact
A PublishArtifact whose properties can be modified.
Configuration
Link copied to clipboard
interface Configuration : FileCollection, HasConfigurableAttributes<SELF> , Named
A `Configuration` represents a group of artifacts and their dependencies.
ConfigurationContainer
Link copied to clipboard
@ServiceScope(value = Project::class)
interface ConfigurationContainer : NamedDomainObjectContainer<T>
A `ConfigurationContainer` is responsible for declaring and managing configurations.
ConfigurationPublications
Link copied to clipboard
interface ConfigurationPublications : HasConfigurableAttributes<SELF>
Represents the outgoing artifacts associated with a configuration.
ConfigurationVariant
Link copied to clipboard
interface ConfigurationVariant : Named, HasConfigurableAttributes<SELF>
Represents some variant of an outgoing configuration.
ConsumableConfiguration
Link copied to clipboard
@Incubating
interface ConsumableConfiguration : Configuration
A Configuration which can be consumed via Publishing and Dependency Management.
DependenciesMetadata
Link copied to clipboard
interface DependenciesMetadata<T : DependencyMetadata?> : Collection<E>
Describes metadata about a dependency - direct dependencies or dependency constraints - declared in a resolved component's metadata.
Dependency
Link copied to clipboard
interface Dependency
A `Dependency` represents a dependency on the artifacts from a particular source.
DependencyArtifact
Link copied to clipboard
interface DependencyArtifact
Data class that represents an artifact included in a org.gradle.api.artifacts.Dependency.
DependencyArtifactSelector
Link copied to clipboard
interface DependencyArtifactSelector
Details about an artifact selection in the context of a dependency substitution.
DependencyConstraint
Link copied to clipboard
interface DependencyConstraint : ModuleVersionSelector, HasConfigurableAttributes<SELF>
Represents a constraints over all, including transitive, dependencies.
DependencyConstraintMetadata
Link copied to clipboard
interface DependencyConstraintMetadata : DependencyMetadata<SELF>
Describes a dependency constraint declared in a resolved component's metadata, which typically originates from a component descriptor (Gradle metadata file).
DependencyConstraintSet
Link copied to clipboard
interface DependencyConstraintSet : DomainObjectSet<T>
A set of dependency constraint definitions that are associated with a configuration.
DependencyConstraintsMetadata
Link copied to clipboard
interface DependencyConstraintsMetadata : DependenciesMetadata<T>
Describes the dependency constraints of a variant declared in a resolved component's metadata, which typically originate from a component descriptor (Gradle metadata file).
DependencyMetadata
Link copied to clipboard
interface DependencyMetadata<SELF : DependencyMetadata?>
Describes a metadata about a dependency - direct dependency or dependency constraint - declared in a resolved component's metadata.
DependencyResolutionListener
Link copied to clipboard
interface DependencyResolutionListener
A `DependencyResolutionListener` is notified as dependencies are resolved.
DependencyResolveDetails
Link copied to clipboard
interface DependencyResolveDetails
Provides details about a dependency when it is resolved.
DependencyScopeConfiguration
Link copied to clipboard
@Incubating
interface DependencyScopeConfiguration : Configuration
A Configuration which collects dependencies, dependency constraints, and exclude rules.
DependencySet
Link copied to clipboard
interface DependencySet : DomainObjectSet<T> , Buildable
A set of artifact dependencies.
DependencySubstitution
Link copied to clipboard
interface DependencySubstitution
Provides means to substitute a different dependency during resolution.
DependencySubstitutions
Link copied to clipboard
interface DependencySubstitutions
Allows replacing dependencies with other dependencies.
DirectDependenciesMetadata
Link copied to clipboard
interface DirectDependenciesMetadata : DependenciesMetadata<T>
Describes the dependencies of a variant declared in a resolved component's metadata, which typically originate from a component descriptor (Gradle metadata file, Ivy file, Maven POM).
DirectDependencyMetadata
Link copied to clipboard
interface DirectDependencyMetadata : DependencyMetadata<SELF>
Describes a dependency declared in a resolved component's metadata, which typically originates from a component descriptor (Gradle metadata file, Ivy file, Maven POM).
ExcludeRule
Link copied to clipboard
interface ExcludeRule
An `ExcludeRule` is used to describe transitive dependencies that should be excluded when resolving dependencies.
ExcludeRuleContainer
Link copied to clipboard
interface ExcludeRuleContainer
A container for adding exclude rules for dependencies.
ExternalDependency
Link copied to clipboard
interface ExternalDependency : ModuleDependency, ModuleVersionSelector
An `ExternalDependency` is a Dependency on a source outside the current project hierarchy.
ExternalModuleDependency
Link copied to clipboard
interface ExternalModuleDependency : ExternalDependency
A `ExternalModuleDependency` is a Dependency on a module outside the current project hierarchy.
ExternalModuleDependencyBundle
Link copied to clipboard
interface ExternalModuleDependencyBundle : List<E>
A bundle is a list of dependencies which are always added together.
FileCollectionDependency
Link copied to clipboard
interface FileCollectionDependency : SelfResolvingDependency
A `FileCollectionDependency` is a Dependency on a collection of local files which are not stored in a repository.
LegacyConfiguration
Link copied to clipboard
@Incubating
interface LegacyConfiguration : Configuration
A Configuration with a mutable role, that can potentially perform behavior of a ConsumableConfiguration, a ResolvableConfiguration, or a DependencyScopeConfiguration.
LenientConfiguration
Link copied to clipboard
interface LenientConfiguration
Resolved configuration that does not fail eagerly when some dependencies are not resolved, or some artifacts do not exist.
MinimalExternalModuleDependency
Link copied to clipboard
interface MinimalExternalModuleDependency : ExternalModuleDependency
The minimal information Gradle needs to address an external module.
ModuleDependency
Link copied to clipboard
interface ModuleDependency : Dependency, HasConfigurableAttributes<SELF>
A `ModuleDependency` is a org.gradle.api.artifacts.Dependency on a component that exists outside of the current project.
ModuleDependencyCapabilitiesHandler
Link copied to clipboard
interface ModuleDependencyCapabilitiesHandler
The capabilities requested for a dependency.
ModuleIdentifier
Link copied to clipboard
interface ModuleIdentifier : Serializable
The identifier of a module.
ModuleVersionIdentifier
Link copied to clipboard
interface ModuleVersionIdentifier : Serializable
The identifier of a module version.
ModuleVersionSelector
Link copied to clipboard
interface ModuleVersionSelector
Selects a module version.
MutableVariantFilesMetadata
Link copied to clipboard
interface MutableVariantFilesMetadata
Mutable information about the files that belong to a variant.
MutableVersionConstraint
Link copied to clipboard
interface MutableVersionConstraint : VersionConstraint
A configurable version constraint.
ProjectDependency
Link copied to clipboard
interface ProjectDependency : ModuleDependency, SelfResolvingDependency
A `ProjectDependency` is a Dependency on another project in the current project hierarchy.
PublishArtifact
Link copied to clipboard
interface PublishArtifact : Buildable
A `PublishArtifact` is an artifact produced by a project.
PublishArtifactSet
Link copied to clipboard
interface PublishArtifactSet : DomainObjectSet<T> , Buildable
A set of artifacts to be published.
PublishException
Link copied to clipboard
open class PublishException : GradleException
A `PublishException` is thrown when a dependency configuration cannot be published for some reason.
ResolutionStrategy
Link copied to clipboard
interface ResolutionStrategy
Defines the strategies around dependency resolution.
ResolvableConfiguration
Link copied to clipboard
@Incubating
interface ResolvableConfiguration : Configuration
A Configuration which performs dependency resolution to build dependency graphs and resolve artifacts.
ResolvableDependencies
Link copied to clipboard
interface ResolvableDependencies : ArtifactView
The primary view of the results of resolving a Configuration.
ResolvedArtifact
Link copied to clipboard
interface ResolvedArtifact
Information about a resolved artifact.
ResolvedConfiguration
Link copied to clipboard
interface ResolvedConfiguration
A `ResolvedConfiguration` represents the result of resolving a Configuration, and provides access to both the graph and artifacts of the result.
ResolvedDependency
Link copied to clipboard
interface ResolvedDependency
Information about a resolved dependency.
ResolvedModuleVersion
Link copied to clipboard
interface ResolvedModuleVersion
Represents meta-data about a resolved module version.
ResolveException
Link copied to clipboard
open class ResolveException : DefaultMultiCauseException
An opaque exception, thrown when dependency resolution fails for some reason.
SelfResolvingDependency
Link copied to clipboard
interface SelfResolvingDependency : Dependency, Buildable
A `SelfResolvingDependency` is a Dependency which is able to resolve itself, independent of a repository.
UnknownConfigurationException
Link copied to clipboard
open class UnknownConfigurationException : UnknownDomainObjectException
An `UnknownConfigurationException` is thrown when a configuration referenced by name cannot be found.
UnknownRepositoryException
Link copied to clipboard
open class UnknownRepositoryException : UnknownDomainObjectException
An `UnknownRepositoryException` is thrown when a repository referenced by name cannot be found.
UnresolvedDependency
Link copied to clipboard
interface UnresolvedDependency
Unsuccessfully resolved dependency.
VariantFileMetadata
Link copied to clipboard
interface VariantFileMetadata
Part of a component variant's metadata representing a file and its location.
VariantMetadata
Link copied to clipboard
interface VariantMetadata : HasConfigurableAttributes<SELF>
Represents the metadata of one variant of a component, see withVariant.
VariantSelectionDetails
Link copied to clipboard
interface VariantSelectionDetails
Allows configuring the variant-aware selection aspects of a specific dependency.
VersionCatalog
Link copied to clipboard
@NonNullApi
interface VersionCatalog : Named
Provides access to a version catalog.
VersionCatalogsExtension
Link copied to clipboard
interface VersionCatalogsExtension : Iterable<T>
Gives access to all version catalogs available.
VersionConstraint
Link copied to clipboard
interface VersionConstraint : Describable
Represents a constraint that is used to match module versions to a dependency.