Named
, SoftwareComponent
public interface AdhocComponentWithVariants extends SoftwareComponent
Named.Namer
Modifier and Type | Method | Description |
---|---|---|
void |
addVariantsFromConfiguration(Configuration outgoingConfiguration,
Action<? super ConfigurationVariantDetails> action) |
Declares an additional variant to publish, corresponding to an additional feature.
|
void |
withVariantsFromConfiguration(Configuration outgoingConfiguration,
Action<? super ConfigurationVariantDetails> action) |
Further configure previously declared variants.
|
void addVariantsFromConfiguration(Configuration outgoingConfiguration, Action<? super ConfigurationVariantDetails> action)
This can be used to determine if the variant should be published or not, and to configure various options specific to the publishing format.
outgoingConfiguration
- the configuration corresponding to the variant to use as source of dependencies and artifactsaction
- action executed to configure the variant prior to publishingvoid withVariantsFromConfiguration(Configuration outgoingConfiguration, Action<? super ConfigurationVariantDetails> action)
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.
outgoingConfiguration
- the configuration corresponding to the variant to configure with a given actionaction
- an additional action to be executed to configure the variant prior to publishingInvalidUserDataException
- if the specified variant was not already added to this component