api / org.gradle.api.attributes / HasConfigurableAttributes

HasConfigurableAttributes

@Incubating interface HasConfigurableAttributes<SELF : Any> : HasAttributes

Represents something that carries attributes by utilizing an AttributeContainer that is configurable.

Parameters

- type extending this interface

Since
3.4

Functions

attributes

abstract fun attributes(action: Action<in AttributeContainer>): SELF

Configure the attribute container that provides the attributes associated with this domain object.

Inherited Functions

getAttributes

abstract fun getAttributes(): AttributeContainer

Returns the attributes

Inheritors

ComponentMetadataDetails

interface ComponentMetadataDetails : ComponentMetadata, HasConfigurableAttributes<ComponentMetadataDetails>

Describes a resolved component's metadata, which typically originates from a component descriptor (Ivy file, Maven POM). Some parts of the metadata can be changed via metadata rules (see org.gradle.api.artifacts.dsl.ComponentMetadataHandler.

Configuration

interface Configuration : FileCollection, HasConfigurableAttributes<Configuration>

A Configuration represents a group of artifacts and their dependencies. Find more information about declaring dependencies to a configuration or about managing configurations in docs for ConfigurationContainer

Configuration is an instance of a FileCollection that contains all dependencies (see also #getAllDependencies()) but not artifacts. If you want to refer to the artifacts declared in this configuration please use #getArtifacts() or #getAllArtifacts(). Read more about declaring artifacts in the configuration in docs for org.gradle.api.artifacts.dsl.ArtifactHandler Please see the Managing Dependency Configurations User Guide chapter for more information.

ConfigurationPublications

interface ConfigurationPublications : HasConfigurableAttributes<ConfigurationPublications>

Represents the outgoing artifacts associated with a configuration. These artifacts are used when the configuration is referenced during dependency resolution.

You can use this interface associate artifacts with a configuration using the #artifact(Object) methods. You can also define several variants of the configuration's artifacts. Each variant represents a set of artifacts that form some mutually exclusive usage of the component.

An implicit variant is defined for a configuration whenever any artifacts are attached directly to this object or inherited from another configuration.

ConfigurationVariant

interface ConfigurationVariant : Named, HasConfigurableAttributes<ConfigurationVariant>

Represents some variant of an outgoing configuration.

DependencyConstraint

interface DependencyConstraint : ModuleVersionSelector, HasConfigurableAttributes<DependencyConstraint>

Represents a constraints over all, including transitive, dependencies.

ModuleDependency

interface ModuleDependency : Dependency, HasConfigurableAttributes<ModuleDependency>

A ModuleDependency is a org.gradle.api.artifacts.Dependency on a module outside the current project.

For examples on configuring the exclude rules please refer to #exclude(java.util.Map).

VariantMetadata

interface VariantMetadata : HasConfigurableAttributes<VariantMetadata>

Represents the metadata of one variant of a component, see ComponentMetadataDetails#withVariant(String, Action).

ViewConfiguration

interface ViewConfiguration : HasConfigurableAttributes<ViewConfiguration>

Configuration for a defined artifact view.