AdhocComponentWithVariants (Gradle API 5.6.1)
Date: 2019-09-03

Package org.gradle.api.component

## Interface AdhocComponentWithVariants

- All Superinterfaces:
    `Named`, `SoftwareComponent`

      @Incubating
      public interface AdhocComponentWithVariants
      extends SoftwareComponent

  A component which can declare additional variants corresponding to features. When published to Maven POMs, the dependencies of those variants are exposed as optional dependencies. When published to Gradle metadata, the variants are published as is.
  Since:
    5.3

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.gradle.api.Named

      `Named.Namer`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addVariantsFromConfiguration​(Configuration outgoingConfiguration, Action<? super ConfigurationVariantDetails> action)` | Declares an additional variant to publish, corresponding to an additional feature.

    - ### Methods inherited from interface org.gradle.api.Named

      `getName`

- - ### Method Detail

    - #### addVariantsFromConfiguration

          void addVariantsFromConfiguration​(Configuration outgoingConfiguration,
                                            Action<? super ConfigurationVariantDetails> action)

      Declares an additional variant to publish, corresponding to an additional feature.
      Parameters:
        `outgoingConfiguration` - the configuration corresponding to the variant to use as source of dependencies and artifacts
        `action` - the action to execute in order to determine if a configuration variant should be published or not