@Incubating interface MutableCapabilitiesMetadata : CapabilitiesMetadata
Describes the capabilities of a component in a mutable way. This interface can be used to adjust the capabilities of a published component via metadata rules (see org.gradle.api.artifacts.dsl.ComponentMetadataHandler.
Since
4.7
abstract fun addCapability(group: String, name: String, version: String): Unit
Adds a new capability. If a capability of the same (group, name) is found with a different version, an error will be thrown. |
|
abstract fun asImmutable(): CapabilitiesMetadata
Returns an immutable vew of the capabilities. |
|
abstract fun removeCapability(group: String, name: String): Unit
Removes a capability. |
abstract fun getCapabilities(): MutableList<out Capability>
Returns an immutable view of the capabilities. |