# consumable

@Incubating
abstract fun consumable(name: String): NamedDomainObjectProvider<ConsumableConfiguration>(source)

Registers a new ConsumableConfiguration with an immutable role. Consumable configurations are meant to act as a variant in the context of Dependency Management and Publishing.

#### Return

A provider which creates a new consumable configuration.

#### Since

8.4

#### Parameters

name

The name of the configuration to register.

#### Throws

InvalidUserDataException

If a configuration with the given `name` already exists in this container.

@Incubating
abstract fun consumable(name: String, action: Action<in ConsumableConfiguration>): NamedDomainObjectProvider<ConsumableConfiguration>(source)

Registers a ConsumableConfiguration via consumable and then configures it with the provided action.

#### Return

A provider which creates a new consumable configuration.

#### Since

8.4

#### Parameters

name

The name of the configuration to register.

action

The action to apply to the configuration.

#### Throws

InvalidUserDataException

If a configuration with the given `name` already exists in this container.