api / org.gradle.api.artifacts / VariantMetadata

VariantMetadata

@Incubating interface VariantMetadata : HasConfigurableAttributes<VariantMetadata>

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

Since
4.4

Functions

withCapabilities

abstract fun withCapabilities(action: Action<in MutableCapabilitiesMetadata>): Unit

Register a rule that modifies the capabilities of this variant.

withDependencies

abstract fun withDependencies(action: Action<in DirectDependenciesMetadata>): Unit

Register a rule that modifies the dependencies of this variant.

withDependencyConstraints

abstract fun withDependencyConstraints(action: Action<in DependencyConstraintsMetadata>): Unit

Register a rule that modifies the dependency constraints of this variant.

Inherited Functions

attributes

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

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