org.gradle.api.artifacts

## Interface VariantMetadata

- All Superinterfaces:
    HasAttributes, HasConfigurableAttributes<VariantMetadata>

      @Incubating
      public interface VariantMetadata
      extends HasConfigurableAttributes<VariantMetadata>

  Represents the metadata of one variant of a component, see `ComponentMetadataDetails.withVariant(String, Action)`.
  Since:
    4.4

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `withDependencies(Action<? super DirectDependenciesMetadata> action)` Register a rule that modifies the dependencies of this variant.
    `void` | `withDependencyConstraints(Action<? super DependencyConstraintsMetadata> action)` Register a rule that modifies the dependency constraints of this variant.

    - ### Methods inherited from interface org.gradle.api.attributes.HasConfigurableAttributes

      `attributes`

    - ### Methods inherited from interface org.gradle.api.attributes.HasAttributes

      `getAttributes`

- - ### Method Detail

    - #### withDependencies

          void withDependencies(Action<? super DirectDependenciesMetadata> action)

      Register a rule that modifies the dependencies of this variant.
      Parameters:
        `action` - the action that performs the dependencies adjustment

    - #### withDependencyConstraints

          void withDependencyConstraints(Action<? super DependencyConstraintsMetadata> action)

      Register a rule that modifies the dependency constraints of this variant.
      Parameters:
        `action` - the action that performs the dependency constraints adjustment
      Since:
        4.5