# withVariantsFromConfiguration

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

Further configure previously declared variants.

The action can be used to determine if the variant should be published or not, and to configure various options specific to the publishing format. Note that if multiple actions are added, they are executed in the order they were added.

#### Since

6.0

#### Parameters

outgoingConfiguration

the configuration corresponding to the variant to configure with a given action

action

an additional action to be executed to configure the variant prior to publishing

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

Further configure previously declared variants.

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

#### Since

9.2.0

#### Parameters

outgoingConfiguration

the provider of the configuration corresponding to the variant to configure with a given action

action

an additional action to be executed to configure the variant prior to publishing