# addVariantsFromConfiguration

abstract fun addVariantsFromConfiguration(outgoingConfiguration: Configuration, action: Action<in ConfigurationVariantDetails>)

Declares an additional variant to publish, corresponding to an additional feature.

This can be used to determine if the variant should be published or not, and to configure various options specific to the publishing format.

#### Parameters

outgoingConfiguration

the configuration corresponding to the variant to use as source of dependencies and artifacts

action

action executed to configure the variant prior to publishing

@Incubating
abstract fun addVariantsFromConfiguration(outgoingConfiguration: Provider<ConsumableConfiguration>, action: Action<in ConfigurationVariantDetails>)

Declares an additional variant to publish, corresponding to an additional feature.

This method behaves the same as addVariantsFromConfiguration but takes a provider of consumable configuration.

#### Since

9.2.0

#### Parameters

outgoingConfiguration

the provider of the configuration corresponding to the variant to use as source of dependencies and artifacts

action

action executed to configure the variant prior to publishing