Interface VariantMetadata

All Superinterfaces:
HasAttributes, HasConfigurableAttributes<VariantMetadata>

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

    Modifier and Type
    Method
    Description
    void
    withCapabilities(ActionMutableCapabilitiesMetadata> action)
    Register a rule that modifies the capabilities of this variant.
    void
    withDependencies(ActionDirectDependenciesMetadata> action)
    Register a rule that modifies the dependencies of this variant.
    void
    withDependencyConstraints(ActionDependencyConstraintsMetadata> action)
    Register a rule that modifies the dependency constraints of this variant.
    void
    withFiles(ActionMutableVariantFilesMetadata> action)
    Register a rule that modifies the artifacts of this variant.

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

    getAttributes

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

    attributes
  • Method Details

    • withDependencies

      void withDependencies(ActionDirectDependenciesMetadata> action)
      Register a rule that modifies the dependencies of this variant.
      Parameters:
      action - the action that performs the dependencies adjustment
    • withDependencyConstraints

      void withDependencyConstraints(ActionDependencyConstraintsMetadata> 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
    • withCapabilities

      void withCapabilities(ActionMutableCapabilitiesMetadata> action)
      Register a rule that modifies the capabilities of this variant.
      Parameters:
      action - the action that performs the capabilities adjustment
      Since:
      4.7
    • withFiles

      void withFiles(ActionMutableVariantFilesMetadata> action)
      Register a rule that modifies the artifacts of this variant.
      Parameters:
      action - the action that performs the files adjustment
      Since:
      6.0