# VariantDimension

# VariantDimension

```
interface VariantDimension
```

|--------------------------------------------------------------------------------------------------------------------------------------------------------|
| [com.android.build.api.dsl.VariantDimension](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#) |

|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known Direct Subclasses [ApplicationVariantDimension](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationVariantDimension),[BaseFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/BaseFlavor),[BuildType](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/BuildType),[DynamicFeatureVariantDimension](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DynamicFeatureVariantDimension),[LibraryVariantDimension](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/LibraryVariantDimension),[TestVariantDimension](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/TestVariantDimension) |---------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [ApplicationVariantDimension](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationVariantDimension)       | Shared properties between DSL objects that contribute to an application variant.                                                                                                                                                                                                   | | [BaseFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/BaseFlavor)                                         | Shared properties between DSL objects[ProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ProductFlavor)and[DefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DefaultConfig) | | [BuildType](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/BuildType)                                           | Build types define certain properties that Gradle uses when building and packaging your app, and are typically configured for different stages of your development lifecycle.                                                                                                      | | [DynamicFeatureVariantDimension](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DynamicFeatureVariantDimension) | Shared properties between DSL objects that contribute to an dynamic feature variant.                                                                                                                                                                                               | | [LibraryVariantDimension](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/LibraryVariantDimension)               | Shared properties between DSL objects that contribute to a library variant.                                                                                                                                                                                                        | | [TestVariantDimension](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/TestVariantDimension)                     | Shared properties between DSL objects that contribute to a separate-test-project variant.                                                                                                                                                                                          | |

|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known Indirect Subclasses [ApplicationBaseFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationBaseFlavor),[ApplicationBaseFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationBaseFlavor),[ApplicationBuildType](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationBuildType),[ApplicationBuildType](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationBuildType),[ApplicationDefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationDefaultConfig),[ApplicationDefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationDefaultConfig),[ApplicationDefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationDefaultConfig),[ApplicationProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationProductFlavor),[ApplicationProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationProductFlavor),[ApplicationProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationProductFlavor),[DefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DefaultConfig),[DynamicFeatureBaseFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DynamicFeatureBaseFlavor), and 30 others. |---------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [ApplicationBaseFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationBaseFlavor)             | <br />                                                                                                                                                                                                                                                                                                  | | [ApplicationBaseFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationBaseFlavor)             | <br />                                                                                                                                                                                                                                                                                                  | | [ApplicationBuildType](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationBuildType)               | Build types define certain properties that Gradle uses when building and packaging your app, and are typically configured for different stages of your development lifecycle.                                                                                                                           | | [ApplicationBuildType](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationBuildType)               | Build types define certain properties that Gradle uses when building and packaging your app, and are typically configured for different stages of your development lifecycle.                                                                                                                           | | [ApplicationDefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationDefaultConfig)       | Specifies defaults for properties that the Android application plugin applies to all build variants.                                                                                                                                                                                                    | | [ApplicationDefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationDefaultConfig)       | Specifies defaults for properties that the Android application plugin applies to all build variants.                                                                                                                                                                                                    | | [ApplicationDefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationDefaultConfig)       | Specifies defaults for properties that the Android application plugin applies to all build variants.                                                                                                                                                                                                    | | [ApplicationProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationProductFlavor)       | Encapsulates all product flavors properties for application projects.                                                                                                                                                                                                                                   | | [ApplicationProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationProductFlavor)       | Encapsulates all product flavors properties for application projects.                                                                                                                                                                                                                                   | | [ApplicationProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationProductFlavor)       | Encapsulates all product flavors properties for application projects.                                                                                                                                                                                                                                   | | [DefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DefaultConfig)                             | Specifies defaults for variant properties that the Android plugin applies to all build variants.                                                                                                                                                                                                        | | [DynamicFeatureBaseFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DynamicFeatureBaseFlavor)       | Shared properties between DSL objects[ProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ProductFlavor)and[DefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DefaultConfig)for dynamic features. | | [DynamicFeatureBaseFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DynamicFeatureBaseFlavor)       | Shared properties between DSL objects[ProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ProductFlavor)and[DefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DefaultConfig)for dynamic features. | | [DynamicFeatureBuildType](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DynamicFeatureBuildType)         | Build types define certain properties that Gradle uses when building and packaging your app, and are typically configured for different stages of your development lifecycle.                                                                                                                           | | [DynamicFeatureBuildType](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DynamicFeatureBuildType)         | Build types define certain properties that Gradle uses when building and packaging your app, and are typically configured for different stages of your development lifecycle.                                                                                                                           | | [DynamicFeatureDefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DynamicFeatureDefaultConfig) | Specifies defaults for properties that the Android dynamic-feature plugin applies to all build variants.                                                                                                                                                                                                | | [DynamicFeatureDefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DynamicFeatureDefaultConfig) | Specifies defaults for properties that the Android dynamic-feature plugin applies to all build variants.                                                                                                                                                                                                | | [DynamicFeatureDefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DynamicFeatureDefaultConfig) | Specifies defaults for properties that the Android dynamic-feature plugin applies to all build variants.                                                                                                                                                                                                | | [DynamicFeatureProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DynamicFeatureProductFlavor) | Encapsulates all product flavors properties for dynamic feature projects.                                                                                                                                                                                                                               | | [DynamicFeatureProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DynamicFeatureProductFlavor) | Encapsulates all product flavors properties for dynamic feature projects.                                                                                                                                                                                                                               | | [DynamicFeatureProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DynamicFeatureProductFlavor) | Encapsulates all product flavors properties for dynamic feature projects.                                                                                                                                                                                                                               | | [LibraryBaseFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/LibraryBaseFlavor)                     | <br />                                                                                                                                                                                                                                                                                                  | | [LibraryBaseFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/LibraryBaseFlavor)                     | <br />                                                                                                                                                                                                                                                                                                  | | [LibraryBuildType](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/LibraryBuildType)                       | Build types define certain properties that Gradle uses when building and packaging your library, and are typically configured for different stages of your development lifecycle.                                                                                                                       | | [LibraryBuildType](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/LibraryBuildType)                       | Build types define certain properties that Gradle uses when building and packaging your library, and are typically configured for different stages of your development lifecycle.                                                                                                                       | | [LibraryDefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/LibraryDefaultConfig)               | Specifies defaults for properties that the Android library plugin applies to all build variants.                                                                                                                                                                                                        | | [LibraryDefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/LibraryDefaultConfig)               | Specifies defaults for properties that the Android library plugin applies to all build variants.                                                                                                                                                                                                        | | [LibraryDefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/LibraryDefaultConfig)               | Specifies defaults for properties that the Android library plugin applies to all build variants.                                                                                                                                                                                                        | | [LibraryProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/LibraryProductFlavor)               | Encapsulates all product flavors properties for library projects.                                                                                                                                                                                                                                       | | [LibraryProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/LibraryProductFlavor)               | Encapsulates all product flavors properties for library projects.                                                                                                                                                                                                                                       | | [LibraryProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/LibraryProductFlavor)               | Encapsulates all product flavors properties for library projects.                                                                                                                                                                                                                                       | | [ProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ProductFlavor)                             | Encapsulates all product flavors properties for this project.                                                                                                                                                                                                                                           | | [TestBaseFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/TestBaseFlavor)                           | <br />                                                                                                                                                                                                                                                                                                  | | [TestBaseFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/TestBaseFlavor)                           | <br />                                                                                                                                                                                                                                                                                                  | | [TestBuildType](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/TestBuildType)                             | Build types define certain properties that Gradle uses when building and packaging your library, and are typically configured for different stages of your development lifecycle.                                                                                                                       | | [TestBuildType](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/TestBuildType)                             | Build types define certain properties that Gradle uses when building and packaging your library, and are typically configured for different stages of your development lifecycle.                                                                                                                       | | [TestDefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/TestDefaultConfig)                     | Specifies defaults for properties that the Android test plugin applies to all build variants.                                                                                                                                                                                                           | | [TestDefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/TestDefaultConfig)                     | Specifies defaults for properties that the Android test plugin applies to all build variants.                                                                                                                                                                                                           | | [TestDefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/TestDefaultConfig)                     | Specifies defaults for properties that the Android test plugin applies to all build variants.                                                                                                                                                                                                           | | [TestProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/TestProductFlavor)                     | Encapsulates all product flavors properties for test projects.                                                                                                                                                                                                                                          | | [TestProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/TestProductFlavor)                     | Encapsulates all product flavors properties for test projects.                                                                                                                                                                                                                                          | | [TestProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/TestProductFlavor)                     | Encapsulates all product flavors properties for test projects.                                                                                                                                                                                                                                          | |

Shared properties between DSL objects that contribute to a variant.

That is,[BuildType](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/BuildType)and[ProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ProductFlavor)and[DefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DefaultConfig).

## Summary

|                                                                                                                                                                                                                                                                                                       ### Public methods                                                                                                                                                                                                                                                                                                        ||
|--------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abstract[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [addManifestPlaceholders](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#addManifestPlaceholders(kotlin.collections.Map))`(`manifestPlaceholders:` `[Map](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html),` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)>`)` Adds manifest placeholders.                                        |
| abstract[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [buildConfigField](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#buildConfigField(kotlin.String,%20kotlin.String,%20kotlin.String))`(`type:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `name:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `value:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Adds a new field to the generated BuildConfig class. |
| abstract[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [externalNativeBuild](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#externalNativeBuild(kotlin.Function1))`(`action:` `[ExternalNativeBuildOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ExternalNativeBuildOptions).()` `->` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`)` Encapsulates per-variant CMake and ndk-build configurations for your external native build.                    |
| abstract[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [javaCompileOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#javaCompileOptions(kotlin.Function1))`(`action:` `[JavaCompileOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/JavaCompileOptions).()` `->` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`)` Options for configuring Java compilation.                                                                                        |
| abstract[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [ndk](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#ndk(kotlin.Function1))`(`action:` `[Ndk](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/Ndk).()` `->` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`)` Encapsulates per-variant configurations for the NDK, such as ABI filters.                                                                                                                    |
| abstract[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)   | [proguardFile](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#proguardFile(kotlin.Any))`(`proguardFile:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`)` Adds a new ProGuard configuration file.                                                                                                                                                                                                                                                  |
| abstract[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)   | [proguardFiles](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#proguardFiles(kotlin.Any))`(`vararg` `files:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`)` Adds new ProGuard configuration files.                                                                                                                                                                                                                                               |
| abstract[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [resValue](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#resValue(kotlin.String,%20kotlin.String,%20kotlin.String))`(`type:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `name:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `value:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Adds a new generated resource.                                       |
| abstract[Void](http://docs.oracle.com/javase/8/docs/api/java/lang/Void.html)?        | [setManifestPlaceholders](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#setManifestPlaceholders(kotlin.collections.Map))`(`manifestPlaceholders:` `[Map](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html),` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)>`)` <br />                                                             |
| abstract[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)   | [setProguardFiles](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#setProguardFiles(kotlin.collections.Iterable))`(`proguardFileIterable:` `[Iterable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-iterable/index.html)<*>`)` Replaces the ProGuard configuration files.                                                                                                                                                                                     |
| abstract[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [shaders](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#shaders(kotlin.Function1))`(`action:` `[Shaders](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/Shaders).()` `->` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`)` Configure the shader compiler options.                                                                                                                                       |
| abstract[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)   | [testProguardFile](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#testProguardFile(kotlin.Any))`(`proguardFile:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`)` Adds a proguard rule file to be used when processing test code.                                                                                                                                                                                                                  |
| abstract[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)   | [testProguardFiles](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#testProguardFiles(kotlin.Any))`(`vararg` `proguardFiles:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`)` Adds proguard rule files to be used when processing test code.                                                                                                                                                                                                       |

|                                                                                                                                                                                                                                                                                  ### Properties                                                                                                                                                                                                                                                                                   ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abstract[ExternalNativeBuildOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ExternalNativeBuildOptions)                                                                                                                      | [externalNativeBuild](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#externalNativeBuild:com.android.build.api.dsl.ExternalNativeBuildOptions) Encapsulates per-variant CMake and ndk-build configurations for your external native build. |
| abstract[JavaCompileOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/JavaCompileOptions)                                                                                                                                      | [javaCompileOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#javaCompileOptions:com.android.build.api.dsl.JavaCompileOptions) Options for configuring Java compilation.                                                             |
| abstract[MutableMap](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-map/index.html)\<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html),[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)\> | [manifestPlaceholders](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#manifestPlaceholders:kotlin.collections.MutableMap) The manifest placeholders.                                                                                       |
| abstract[File](http://docs.oracle.com/javase/8/docs/api/java/io/File.html)?                                                                                                                                                                                                  | [multiDexKeepFile](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#multiDexKeepFile:java.io.File) Text file that specifies additional classes that will be compiled into the main dex file.                                                 |
| abstract[File](http://docs.oracle.com/javase/8/docs/api/java/io/File.html)?                                                                                                                                                                                                  | [multiDexKeepProguard](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#multiDexKeepProguard:java.io.File) Text file with additional ProGuard rules to be used to determine which classes are compiled into the main dex file.               |
| abstract[Ndk](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/Ndk)                                                                                                                                                                    | [ndk](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#ndk:com.android.build.api.dsl.Ndk) Encapsulates per-variant configurations for the NDK, such as ABI filters.                                                                          |
| abstract[MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\<[File](http://docs.oracle.com/javase/8/docs/api/java/io/File.html)\>                                                                                        | [proguardFiles](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#proguardFiles:kotlin.collections.MutableList) Specifies the ProGuard configuration files that the plugin should use.                                                        |
| abstract[Shaders](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/Shaders)                                                                                                                                                            | [shaders](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#shaders:com.android.build.api.dsl.Shaders) Options for configuring the shader compiler.                                                                                           |
| abstract[MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\<[File](http://docs.oracle.com/javase/8/docs/api/java/io/File.html)\>                                                                                        | [testProguardFiles](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#testProguardFiles:kotlin.collections.MutableList) The collection of proguard rule files to be used when processing test code.                                           |

## Public methods

### addManifestPlaceholders

```
@Incubating abstract fun addManifestPlaceholders(manifestPlaceholders: Map<String, Any>): Unit
```

Adds manifest placeholders.

See[Inject Build Variables into the Manifest](https://developer.android.com/studio/build/manifest-build-variables.html).  

### buildConfigField

```
@Incubating abstract fun buildConfigField(
    type: String, 
    name: String, 
    value: String
): Unit
```

Adds a new field to the generated BuildConfig class.

The field is generated as:`<type> <name> = <value>;`

This means each of these must have valid Java content. If the type is a String, then the value should include quotes.

|                                                   Parameters                                                   ||
|----------------------------------------------------------------------------------------|------------------------|
| type:[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)  | the type of the field  |
| name:[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)  | the name of the field  |
| value:[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | the value of the field |

### externalNativeBuild

```
@Incubating abstract fun externalNativeBuild(action: ExternalNativeBuildOptions.() -> Unit): Unit
```

Encapsulates per-variant CMake and ndk-build configurations for your external native build.

To learn more, see[Add C and C++ Code to Your Project](http://developer.android.com/studio/projects/add-native-code.html#).  

### javaCompileOptions

```
abstract fun javaCompileOptions(action: JavaCompileOptions.() -> Unit): Unit
```

Options for configuring Java compilation.  

### ndk

```
@Incubating abstract fun ndk(action: Ndk.() -> Unit): Unit
```

Encapsulates per-variant configurations for the NDK, such as ABI filters.  

### proguardFile

```
@Incubating abstract fun proguardFile(proguardFile: Any): Any
```

Adds a new ProGuard configuration file.

`proguardFile getDefaultProguardFile('proguard-android.txt')`

There are two ProGuard rules files that ship with the Android plugin and are used by default:

- proguard-android.txt
- proguard-android-optimize.txt

`proguard-android-optimize.txt`is identical to`proguard-android.txt`, except with optimizations enabled. You can use[getDefaultProguardFileString](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#)to return the full path of the files.

This method has a return value for legacy reasons.  

### proguardFiles

```
@Incubating abstract fun proguardFiles(vararg files: Any): Any
```

Adds new ProGuard configuration files.

There are two ProGuard rules files that ship with the Android plugin and are used by default:

- proguard-android.txt
- proguard-android-optimize.txt

`proguard-android-optimize.txt`is identical to`proguard-android.txt`, except with optimizations enabled. You can use[getDefaultProguardFileString](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#)to return the full path of the files.

This method has a return value for legacy reasons.  

### resValue

```
@Incubating abstract fun resValue(
    type: String, 
    name: String, 
    value: String
): Unit
```

Adds a new generated resource.

This is equivalent to specifying a resource in res/values.

See[Resource Types](http://developer.android.com/guide/topics/resources/available-resources.html).

|                                                    Parameters                                                     ||
|----------------------------------------------------------------------------------------|---------------------------|
| type:[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)  | the type of the resource  |
| name:[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)  | the name of the resource  |
| value:[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | the value of the resource |

### setManifestPlaceholders

```
@Incubating abstract fun setManifestPlaceholders(manifestPlaceholders: Map<String, Any>): Void?
```

**Deprecated.**  

### setProguardFiles

```
@Incubating abstract fun setProguardFiles(proguardFileIterable: Iterable<*>): Any
```

Replaces the ProGuard configuration files.

This method has a return value for legacy reasons.  

### shaders

```
@Incubating abstract fun shaders(action: Shaders.() -> Unit): Unit
```

Configure the shader compiler options.  

### testProguardFile

```
@Incubating abstract fun testProguardFile(proguardFile: Any): Any
```

Adds a proguard rule file to be used when processing test code.

Test code needs to be processed to apply the same obfuscation as was done to main code.

This method has a return value for legacy reasons.  

### testProguardFiles

```
@Incubating abstract fun testProguardFiles(vararg proguardFiles: Any): Any
```

Adds proguard rule files to be used when processing test code.

Test code needs to be processed to apply the same obfuscation as was done to main code.

This method has a return value for legacy reasons.

## Properties

### externalNativeBuild

```
abstract val externalNativeBuild: ExternalNativeBuildOptions
```

Encapsulates per-variant CMake and ndk-build configurations for your external native build.

To learn more, see[Add C and C++ Code to Your Project](http://developer.android.com/studio/projects/add-native-code.html#).  

### javaCompileOptions

```
abstract val javaCompileOptions: JavaCompileOptions
```

Options for configuring Java compilation.  

### manifestPlaceholders

```
abstract val manifestPlaceholders: MutableMap<String, Any>
```

The manifest placeholders.

See[Inject Build Variables into the Manifest](https://developer.android.com/studio/build/manifest-build-variables.html).  

### multiDexKeepFile

```
abstract var multiDexKeepFile: File?
```

**Deprecated.**

Text file that specifies additional classes that will be compiled into the main dex file.

Classes specified in the file are appended to the main dex classes computed using`aapt`.

If set, the file should contain one class per line, in the following format:`com/example/MyClass.class`  

### multiDexKeepProguard

```
abstract var multiDexKeepProguard: File?
```

Text file with additional ProGuard rules to be used to determine which classes are compiled into the main dex file.

If set, rules from this file are used in combination with the default rules used by the build system.  

### ndk

```
abstract val ndk: Ndk
```

Encapsulates per-variant configurations for the NDK, such as ABI filters.  

### proguardFiles

```
abstract val proguardFiles: MutableList<File>
```

Specifies the ProGuard configuration files that the plugin should use.

There are two ProGuard rules files that ship with the Android plugin and are used by default:

- proguard-android.txt
- proguard-android-optimize.txt

`proguard-android-optimize.txt`is identical to`proguard-android.txt`, except with optimizations enabled. You can use[getDefaultProguardFileString](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/VariantDimension#)to return the full path of the files.

| Return ||
|---|---|
| a non-null collection of files. ||

### shaders

```
abstract val shaders: Shaders
```

Options for configuring the shader compiler.  

### testProguardFiles

```
abstract val testProguardFiles: MutableList<File>
```

The collection of proguard rule files to be used when processing test code.

Test code needs to be processed to apply the same obfuscation as was done to main code.