# ComponentMetadataDetails

@NonExtensible
interface ComponentMetadataDetails : ComponentMetadata, HasConfigurableAttributes<SELF> (source)

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.

#### Since

1.8

## Functions

addVariant
Link copied to clipboard
abstract fun addVariant(name: String, action: Action<in VariantMetadata>)
Add a rule for adding a new empty variant to the component.
abstract fun addVariant(name: String, base: String, action: Action<in VariantMetadata>)
Add a rule for adding a new variant to the component.
allVariants
Link copied to clipboard
abstract fun allVariants(action: Action<in VariantMetadata>)
Add a rule for adjusting all variants of a component.
attributes
Link copied to clipboard
abstract fun attributes(action: Action<in AttributeContainer>): SELF
belongsTo
Link copied to clipboard
abstract fun belongsTo(notation: Any)
Declares that this component belongs to a virtual platform, which should be considered during dependency resolution.
abstract fun belongsTo(notation: Any, virtual: Boolean)
Declares that this component belongs to a platform, which should be considered during dependency resolution.
getAttributes
Link copied to clipboard
abstract fun getAttributes(): AttributeContainer
getId
Link copied to clipboard
abstract fun getId(): ModuleVersionIdentifier
getStatus
Link copied to clipboard
abstract fun getStatus(): String
getStatusScheme
Link copied to clipboard
abstract fun getStatusScheme(): List<String>
isChanging
Link copied to clipboard
abstract fun isChanging(): Boolean
maybeAddVariant
Link copied to clipboard
abstract fun maybeAddVariant(name: String, base: String, action: Action<in VariantMetadata>)
This is the lenient version of addVariant.
setChanging
Link copied to clipboard
abstract fun setChanging(changing: Boolean)
Sets whether the component is changing or immutable.
setStatus
Link copied to clipboard
abstract fun setStatus(status: String)
Sets the status of the component.
setStatusScheme
Link copied to clipboard
abstract fun setStatusScheme(statusScheme: List<String>)
Sets the status scheme of the component.
withVariant
Link copied to clipboard
abstract fun withVariant(name: String, action: Action<in VariantMetadata>)
Add a rule for adjusting an existing variant of the component.