# VariantDimension

# VariantDimension

<br />

```
interface VariantDimension
```

<br />

Known direct subclasses  
[ApplicationVariantDimension](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/ApplicationVariantDimension),[BaseFlavor](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/BaseFlavor),[BuildType](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/BuildType),[DynamicFeatureVariantDimension](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/DynamicFeatureVariantDimension),[LibraryVariantDimension](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/LibraryVariantDimension),[TestVariantDimension](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/TestVariantDimension)  

|---------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ApplicationVariantDimension](https://developer.android.com/reference/tools/gradle-api/7.2/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.2/com/android/build/api/dsl/BaseFlavor)                                         | Shared properties between DSL objects[ProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/ProductFlavor)and[DefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/DefaultConfig) |
| [BuildType](https://developer.android.com/reference/tools/gradle-api/7.2/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.2/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.2/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.2/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.2/com/android/build/api/dsl/ApplicationBaseFlavor),[ApplicationBuildType](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/ApplicationBuildType),[ApplicationDefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/ApplicationDefaultConfig),[ApplicationProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/ApplicationProductFlavor),[DefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/DefaultConfig),[DynamicFeatureBaseFlavor](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/DynamicFeatureBaseFlavor),[DynamicFeatureBuildType](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/DynamicFeatureBuildType),[DynamicFeatureDefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/DynamicFeatureDefaultConfig),[DynamicFeatureProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/DynamicFeatureProductFlavor),[LibraryBaseFlavor](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/LibraryBaseFlavor),[LibraryBuildType](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/LibraryBuildType),[LibraryDefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/LibraryDefaultConfig),[LibraryProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/LibraryProductFlavor),[ProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/ProductFlavor),[TestBaseFlavor](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/TestBaseFlavor),[TestBuildType](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/TestBuildType),[TestDefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/TestDefaultConfig),[TestProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/TestProductFlavor)  

|---------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ApplicationBaseFlavor](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/ApplicationBaseFlavor)             |                                                                                                                                                                                                                                                                                                         |
| [ApplicationBuildType](https://developer.android.com/reference/tools/gradle-api/7.2/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.2/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.2/com/android/build/api/dsl/ApplicationProductFlavor)       | Encapsulates all product flavors properties for application projects.                                                                                                                                                                                                                                   |
| [DefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.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/7.2/com/android/build/api/dsl/DynamicFeatureBaseFlavor)       | Shared properties between DSL objects[ProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/ProductFlavor)and[DefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/DefaultConfig)for dynamic features. |
| [DynamicFeatureBuildType](https://developer.android.com/reference/tools/gradle-api/7.2/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.2/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.2/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.2/com/android/build/api/dsl/LibraryBaseFlavor)                     |                                                                                                                                                                                                                                                                                                         |
| [LibraryBuildType](https://developer.android.com/reference/tools/gradle-api/7.2/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.2/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.2/com/android/build/api/dsl/LibraryProductFlavor)               | Encapsulates all product flavors properties for library projects.                                                                                                                                                                                                                                       |
| [ProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/ProductFlavor)                             | Encapsulates all product flavors properties for this project.                                                                                                                                                                                                                                           |
| [TestBaseFlavor](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/TestBaseFlavor)                           |                                                                                                                                                                                                                                                                                                         |
| [TestBuildType](https://developer.android.com/reference/tools/gradle-api/7.2/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.2/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.2/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.2/com/android/build/api/dsl/BuildType)and[ProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/ProductFlavor)and[DefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/DefaultConfig).

## Summary

|                                                                                                                                                                                                                                                                                                                                                                                                        ### Public functions                                                                                                                                                                                                                                                                                                                                                                                                        ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                | [addManifestPlaceholders](https://developer.android.com/reference/tools/gradle-api/7.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.                                                                                                                                       |
| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                | [buildConfigField](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/VariantDimension#buildConfigField(kotlin.String,kotlin.String,kotlin.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.                                                                                                            |
| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                | [externalNativeBuild](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/VariantDimension#externalNativeBuild(kotlin.Function1))`(action: (@`[ExtensionFunctionType](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html)` `[ExternalNativeBuildOptions](https://developer.android.com/reference/tools/gradle-api/7.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. |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                          | [javaCompileOptions](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/VariantDimension#javaCompileOptions(kotlin.Function1))`(action: (@`[ExtensionFunctionType](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html)` `[JavaCompileOptions](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/JavaCompileOptions)`.() `->` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`)?)` Options for configuring Java compilation.                                                                     |
| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                | [ndk](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/VariantDimension#ndk(kotlin.Function1))`(action: (@`[ExtensionFunctionType](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html)` `[Ndk](https://developer.android.com/reference/tools/gradle-api/7.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.                                                                                                 |
| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                  | [proguardFile](https://developer.android.com/reference/tools/gradle-api/7.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.                                                                                                                                                                                                                                                                                                                                                     |
| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                  | [proguardFiles](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/VariantDimension#proguardFiles(kotlin.Array))`(vararg files: `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`?)` Adds new ProGuard configuration files.                                                                                                                                                                                                                                                                                                                                                  |
| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                | [resValue](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/VariantDimension#resValue(kotlin.String,kotlin.String,kotlin.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.                                                                                                                                                  |
| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Void](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html)`?` | ~~[setManifestPlaceholders](https://developer.android.com/reference/tools/gradle-api/7.2/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)`?>?)` **This function is deprecated.**Use manifestPlaceholders property instead                                                                                     |
| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                  | [setProguardFiles](https://developer.android.com/reference/tools/gradle-api/7.2/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.                                                                                                                                                                                                                                                                                        |
| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                | [shaders](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/VariantDimension#shaders(kotlin.Function1))`(action: (@`[ExtensionFunctionType](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html)` `[Shaders](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/Shaders)`.() `->` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`)?)` Configure the shader compiler options.                                                                                                                    |
| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                  | [testProguardFile](https://developer.android.com/reference/tools/gradle-api/7.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.                                                                                                                                                                                                                                                                                                                     |
| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                  | [testProguardFiles](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/VariantDimension#testProguardFiles(kotlin.Array))`(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.                                                                                                                                                                                                                                                                                                          |

|                                                                                                                                                                                                                                                                 ### Public properties                                                                                                                                                                                                                                                                 ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ExternalNativeBuildOptions](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/ExternalNativeBuildOptions)                                                                                                                           | [externalNativeBuild](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/VariantDimension#externalNativeBuild()) Encapsulates per-variant CMake and ndk-build configurations for your external native build.                           |
| [JavaCompileOptions](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/JavaCompileOptions)                                                                                                                                           | [javaCompileOptions](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/VariantDimension#javaCompileOptions()) Options for configuring Java compilation.                                                                               |
| [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.2/com/android/build/api/dsl/VariantDimension#manifestPlaceholders()) The manifest placeholders.                                                                                          |
| [File](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html)`?`                                                                                                                                                                                 | [multiDexKeepFile](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/VariantDimension#multiDexKeepFile()) **This property is deprecated.**This property is deprecated.                                                                |
| [File](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html)`?`                                                                                                                                                                                 | [multiDexKeepProguard](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/VariantDimension#multiDexKeepProguard()) Text file with additional ProGuard rules to be used to determine which classes are compiled into the main dex file. |
| [Ndk](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/Ndk)                                                                                                                                                                         | [ndk](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/VariantDimension#ndk()) Encapsulates per-variant configurations for the NDK, such as ABI filters.                                                                             |
| [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)`<`[File](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html)`>`                                                                       | [proguardFiles](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/VariantDimension#proguardFiles()) Specifies the ProGuard configuration files that the plugin should use.                                                            |
| [Shaders](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/Shaders)                                                                                                                                                                 | [shaders](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/VariantDimension#shaders()) Options for configuring the shader compiler.                                                                                                  |
| [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)`<`[File](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html)`>`                                                                       | [testProguardFiles](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/VariantDimension#testProguardFiles()) The collection of proguard rule files to be used when processing test code.                                               |

## Public functions

### addManifestPlaceholders

```
@Incubating
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
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
fun externalNativeBuild(action: (@ExtensionFunctionType 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

```
fun javaCompileOptions(action: (@ExtensionFunctionType JavaCompileOptions.() -> Unit)?): Unit
```

Options for configuring Java compilation.  

### ndk

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

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

### proguardFile

```
@Incubating
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 getDefaultProguardFile(String) to return the full path of the files.

This method has a return value for legacy reasons.  

### proguardFiles

```
@Incubating
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 getDefaultProguardFile(String) to return the full path of the files.

This method has a return value for legacy reasons.  

### resValue

```
@Incubating
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
fun [setManifestPlaceholders](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/VariantDimension#setManifestPlaceholders(kotlin.collections.Map))(manifestPlaceholders: Map<String?, Any?>?): Void?
```
| **This function is deprecated.**   
Use manifestPlaceholders property instead  

### setProguardFiles

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

Replaces the ProGuard configuration files.

This method has a return value for legacy reasons.  

### shaders

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

Configure the shader compiler options.  

### testProguardFile

```
@Incubating
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
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.

## Public properties

### externalNativeBuild

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

```
val javaCompileOptions: JavaCompileOptions
```

Options for configuring Java compilation.  

### manifestPlaceholders

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

```
val multiDexKeepFile: File?
```
| **This property is deprecated.**   
| This property is deprecated. Migrate to multiDexKeepProguard.

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

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

```
val ndk: Ndk
```

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

### proguardFiles

```
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 getDefaultProguardFile(String) to return the full path of the files.  

|                                                                                                               Returns                                                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------|
| [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)`<`[File](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html)`>` | a non-null collection of files. |

### shaders

```
val shaders: Shaders
```

Options for configuring the shader compiler.  

### testProguardFiles

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