Interface Variant

All Superinterfaces:
org.gradle.api.Named
All Known Implementing Classes:
VariantImpl

@NonExtendable public interface Variant extends org.gradle.api.Named
Template variant.

Composed of:

  • Name: used to map values from properties file
  • Source files: files that will be loaded
  • Runtime properties: set in the buildscript, will override anything set in source files
Since:
2.0.0
  • Nested Class Summary

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

    org.gradle.api.Named.Namer
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull String
     
    @NotNull org.gradle.api.provider.MapProperty<String,Object>
    Runtime properties for inserting into templates.
    @NotNull org.gradle.api.file.ConfigurableFileCollection
    Data files containing template parameters.
    default void
    properties(@NotNull org.gradle.api.Action<org.gradle.api.provider.MapProperty<String,Object>> configureAction)
    Register multiple properties for this variant.
  • Method Details

    • getName

      @Input @NotNull @NotNull String getName()
      Specified by:
      getName in interface org.gradle.api.Named
    • getPropertyFiles

      @InputFiles @NotNull @NotNull org.gradle.api.file.ConfigurableFileCollection getPropertyFiles()
      Data files containing template parameters.
      Returns:
      the data files to read
      Since:
      2.0.0
    • getProperties

      @Input @NotNull @NotNull org.gradle.api.provider.MapProperty<String,Object> getProperties()
      Runtime properties for inserting into templates.
      Returns:
      the properties map
      Since:
      2.0.0
    • properties

      default void properties(@NotNull @NotNull org.gradle.api.Action<org.gradle.api.provider.MapProperty<String,Object>> configureAction)
      Register multiple properties for this variant.
      Parameters:
      configureAction - action to configure properties
      Since:
      2.0.0