# VariantDimension

# VariantDimension

```
@Incubating interface VariantDimension
```

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

|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known Direct Subclasses [ApplicationVariantDimension](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ApplicationVariantDimension),[BaseFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/BaseFlavor),[BuildType](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/BuildType),[DynamicFeatureVariantDimension](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/DynamicFeatureVariantDimension),[LibraryVariantDimension](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/LibraryVariantDimension),[TestVariantDimension](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/TestVariantDimension) |---------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [ApplicationVariantDimension](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ApplicationVariantDimension)       | <br />                                                                                                                                                                                                                                                                             | | [BaseFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/BaseFlavor)                                         | Shared properties between DSL objects[ProductFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ProductFlavor)and[DefaultConfig](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/DefaultConfig) | | [BuildType](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/BuildType)                                           | DSL object to configure build types.                                                                                                                                                                                                                                               | | [DynamicFeatureVariantDimension](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/DynamicFeatureVariantDimension) | <br />                                                                                                                                                                                                                                                                             | | [LibraryVariantDimension](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/LibraryVariantDimension)               | <br />                                                                                                                                                                                                                                                                             | | [TestVariantDimension](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/TestVariantDimension)                     | <br />                                                                                                                                                                                                                                                                             | |

|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known Indirect Subclasses [ApplicationBaseFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ApplicationBaseFlavor),[ApplicationBaseFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ApplicationBaseFlavor),[ApplicationBuildType](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ApplicationBuildType),[ApplicationBuildType](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ApplicationBuildType),[ApplicationDefaultConfig](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ApplicationDefaultConfig),[ApplicationDefaultConfig](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ApplicationDefaultConfig),[ApplicationDefaultConfig](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ApplicationDefaultConfig),[ApplicationProductFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ApplicationProductFlavor),[ApplicationProductFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ApplicationProductFlavor),[ApplicationProductFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ApplicationProductFlavor),[DefaultConfig](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/DefaultConfig),[DynamicFeatureBaseFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/DynamicFeatureBaseFlavor), and 30 others. |---------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------| | [ApplicationBaseFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ApplicationBaseFlavor)             | <br />                                                                                           | | [ApplicationBaseFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ApplicationBaseFlavor)             | <br />                                                                                           | | [ApplicationBuildType](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ApplicationBuildType)               | <br />                                                                                           | | [ApplicationBuildType](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ApplicationBuildType)               | <br />                                                                                           | | [ApplicationDefaultConfig](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ApplicationDefaultConfig)       | <br />                                                                                           | | [ApplicationDefaultConfig](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ApplicationDefaultConfig)       | <br />                                                                                           | | [ApplicationDefaultConfig](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ApplicationDefaultConfig)       | <br />                                                                                           | | [ApplicationProductFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ApplicationProductFlavor)       | <br />                                                                                           | | [ApplicationProductFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ApplicationProductFlavor)       | <br />                                                                                           | | [ApplicationProductFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ApplicationProductFlavor)       | <br />                                                                                           | | [DefaultConfig](https://developer.android.com/reference/tools/gradle-api/4.2/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/4.2/com/android/build/api/dsl/DynamicFeatureBaseFlavor)       | <br />                                                                                           | | [DynamicFeatureBaseFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/DynamicFeatureBaseFlavor)       | <br />                                                                                           | | [DynamicFeatureBuildType](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/DynamicFeatureBuildType)         | <br />                                                                                           | | [DynamicFeatureBuildType](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/DynamicFeatureBuildType)         | <br />                                                                                           | | [DynamicFeatureDefaultConfig](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/DynamicFeatureDefaultConfig) | <br />                                                                                           | | [DynamicFeatureDefaultConfig](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/DynamicFeatureDefaultConfig) | <br />                                                                                           | | [DynamicFeatureDefaultConfig](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/DynamicFeatureDefaultConfig) | <br />                                                                                           | | [DynamicFeatureProductFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/DynamicFeatureProductFlavor) | <br />                                                                                           | | [DynamicFeatureProductFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/DynamicFeatureProductFlavor) | <br />                                                                                           | | [DynamicFeatureProductFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/DynamicFeatureProductFlavor) | <br />                                                                                           | | [LibraryBaseFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/LibraryBaseFlavor)                     | <br />                                                                                           | | [LibraryBaseFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/LibraryBaseFlavor)                     | <br />                                                                                           | | [LibraryBuildType](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/LibraryBuildType)                       | <br />                                                                                           | | [LibraryBuildType](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/LibraryBuildType)                       | <br />                                                                                           | | [LibraryDefaultConfig](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/LibraryDefaultConfig)               | <br />                                                                                           | | [LibraryDefaultConfig](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/LibraryDefaultConfig)               | <br />                                                                                           | | [LibraryDefaultConfig](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/LibraryDefaultConfig)               | <br />                                                                                           | | [LibraryProductFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/LibraryProductFlavor)               | <br />                                                                                           | | [LibraryProductFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/LibraryProductFlavor)               | <br />                                                                                           | | [LibraryProductFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/LibraryProductFlavor)               | <br />                                                                                           | | [ProductFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ProductFlavor)                             | Encapsulates all product flavors properties for this project.                                    | | [TestBaseFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/TestBaseFlavor)                           | <br />                                                                                           | | [TestBaseFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/TestBaseFlavor)                           | <br />                                                                                           | | [TestBuildType](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/TestBuildType)                             | <br />                                                                                           | | [TestBuildType](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/TestBuildType)                             | <br />                                                                                           | | [TestDefaultConfig](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/TestDefaultConfig)                     | <br />                                                                                           | | [TestDefaultConfig](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/TestDefaultConfig)                     | <br />                                                                                           | | [TestDefaultConfig](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/TestDefaultConfig)                     | <br />                                                                                           | | [TestProductFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/TestProductFlavor)                     | <br />                                                                                           | | [TestProductFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/TestProductFlavor)                     | <br />                                                                                           | | [TestProductFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/TestProductFlavor)                     | <br />                                                                                           | |

Shared properties between DSL objects that contribute to a variant.

That is,[BuildType](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/BuildType)and[ProductFlavor](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/ProductFlavor)and[DefaultConfig](https://developer.android.com/reference/tools/gradle-api/4.2/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/4.2/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/4.2/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/4.2/com/android/build/api/dsl/VariantDimension#externalNativeBuild(kotlin.Function1))`(`action:` `[ExternalNativeBuildOptions](https://developer.android.com/reference/tools/gradle-api/4.2/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/4.2/com/android/build/api/dsl/VariantDimension#javaCompileOptions(kotlin.Function1))`(`action:` `[JavaCompileOptions](https://developer.android.com/reference/tools/gradle-api/4.2/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/4.2/com/android/build/api/dsl/VariantDimension#ndk(kotlin.Function1))`(`action:` `[Ndk](https://developer.android.com/reference/tools/gradle-api/4.2/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/4.2/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/4.2/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/4.2/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[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [shaders](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/VariantDimension#shaders(kotlin.Function1))`(`action:` `[Shaders](https://developer.android.com/reference/tools/gradle-api/4.2/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/4.2/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/4.2/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/4.2/com/android/build/api/dsl/ExternalNativeBuildOptions)                                                                                                                      | [externalNativeBuild](https://developer.android.com/reference/tools/gradle-api/4.2/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/4.2/com/android/build/api/dsl/JavaCompileOptions)                                                                                                                                      | [javaCompileOptions](https://developer.android.com/reference/tools/gradle-api/4.2/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/4.2/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/4.2/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/4.2/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/4.2/com/android/build/api/dsl/Ndk)                                                                                                                                                                    | [ndk](https://developer.android.com/reference/tools/gradle-api/4.2/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/4.2/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/4.2/com/android/build/api/dsl/Shaders)                                                                                                                                                            | [shaders](https://developer.android.com/reference/tools/gradle-api/4.2/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/4.2/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

```
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

```
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

```
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

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

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

### proguardFile

```
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/4.2/com/android/build/api/dsl/VariantDimension#)to return the full path of the files.

This method has a return value for legacy reasons.  

### proguardFiles

```
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/4.2/com/android/build/api/dsl/VariantDimension#)to return the full path of the files.

This method has a return value for legacy reasons.  

### resValue

```
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 |

### shaders

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

Configure the shader compiler options.  

### testProguardFile

```
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

```
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?
```

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/4.2/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.