# ApplicationVariantDimension

# ApplicationVariantDimension

```
@Incubating interface ApplicationVariantDimension : VariantDimension
```

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

|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known Direct Subclasses [ApplicationBaseFlavor](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/ApplicationBaseFlavor),[ApplicationBuildType](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/ApplicationBuildType) |---------------------------------------------------------------------------------------------------------------------------------------|--------| | [ApplicationBaseFlavor](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/ApplicationBaseFlavor) | <br /> | | [ApplicationBuildType](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/ApplicationBuildType)   | <br /> | |

|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known Indirect Subclasses [ApplicationDefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/ApplicationDefaultConfig),[ApplicationProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/ApplicationProductFlavor) |---------------------------------------------------------------------------------------------------------------------------------------------|--------| | [ApplicationDefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/ApplicationDefaultConfig) | <br /> | | [ApplicationProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/ApplicationProductFlavor) | <br /> | |

## Summary

| ### Inherited functions ||
|---|---|
| From class[VariantDimension](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/VariantDimension) |------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [addManifestPlaceholders](https://developer.android.com/reference/tools/gradle-api/7.0/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)>`)` <br /> Adds manifest placeholders. See[Inject Build Variables into the Manifest](https://developer.android.com/studio/build/manifest-build-variables.html). <br />                                                                                                                                                                                                                                                 | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [buildConfigField](https://developer.android.com/reference/tools/gradle-api/7.0/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)`)` <br /> 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. <br />                                                                                                                                                        | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [externalNativeBuild](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/VariantDimension#externalNativeBuild(kotlin.Function1))`(`action:` `[ExternalNativeBuildOptions](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/ExternalNativeBuildOptions).()` `->` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`)` <br /> 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#). <br />                                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [javaCompileOptions](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/VariantDimension#javaCompileOptions(kotlin.Function1))`(`action:` `[JavaCompileOptions](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/JavaCompileOptions).()` `->` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`)` <br /> Options for configuring Java compilation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [ndk](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/VariantDimension#ndk(kotlin.Function1))`(`action:` `[Ndk](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/Ndk).()` `->` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`)` <br /> Encapsulates per-variant configurations for the NDK, such as ABI filters. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)   | [proguardFile](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/VariantDimension#proguardFile(kotlin.Any))`(`proguardFile:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`)` <br /> Adds a new ProGuard configuration file. `proguardFile getDefaultProguardFile('proguard-android.txt')` There are two ProGuard rules files that ship with the Android plugin and are used by default: - proguard-android.txt - proguard-android-optimize.txt `proguard-android-optimize.txt`is identical to`proguard-android.txt`, except with optimizations enabled. You can use[getDefaultProguardFileString](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/ApplicationVariantDimension#)to return the full path of the files. This method has a return value for legacy reasons. <br /> | | [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)   | [proguardFiles](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/VariantDimension#proguardFiles(kotlin.Any))`(`vararg` `files:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`)` <br /> Adds new ProGuard configuration files. There are two ProGuard rules files that ship with the Android plugin and are used by default: - proguard-android.txt - proguard-android-optimize.txt `proguard-android-optimize.txt`is identical to`proguard-android.txt`, except with optimizations enabled. You can use[getDefaultProguardFileString](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/ApplicationVariantDimension#)to return the full path of the files. This method has a return value for legacy reasons. <br />                                                            | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [resValue](https://developer.android.com/reference/tools/gradle-api/7.0/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)`)` <br /> 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). <br />                                                                                                                                                                                                           | | [Void](http://docs.oracle.com/javase/8/docs/api/java/lang/Void.html)?        | [setManifestPlaceholders](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/VariantDimension#setManifestPlaceholders(kotlin.collections.Map))`(`manifestPlaceholders:` `[Map](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html),` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)>`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                             | | [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)   | [setProguardFiles](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/VariantDimension#setProguardFiles(kotlin.collections.Iterable))`(`proguardFileIterable:` `[Iterable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-iterable/index.html)<*>`)` <br /> Replaces the ProGuard configuration files. This method has a return value for legacy reasons. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [shaders](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/VariantDimension#shaders(kotlin.Function1))`(`action:` `[Shaders](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/Shaders).()` `->` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`)` <br /> Configure the shader compiler options. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)   | [testProguardFile](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/VariantDimension#testProguardFile(kotlin.Any))`(`proguardFile:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`)` <br /> 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. <br />                                                                                                                                                                                                                                                                                                                                                                                                         | | [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)   | [testProguardFiles](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/VariantDimension#testProguardFiles(kotlin.Any))`(`vararg` `proguardFiles:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`)` <br /> 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. <br />                                                                                                                                                                                                                                                                                                                                                                                              | ||

|                                                                                                                                                                                                   ### Properties                                                                                                                                                                                                   ||
|--------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abstract[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?                                            | [applicationIdSuffix](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/ApplicationVariantDimension#applicationIdSuffix:kotlin.String) Application id suffix.                                                                           |
| abstract[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)?                                          | [multiDexEnabled](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/ApplicationVariantDimension#multiDexEnabled:kotlin.Boolean) Returns whether multi-dex is enabled.                                                                   |
| abstract[ApkSigningConfig](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/ApkSigningConfig)? | [signingConfig](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/ApplicationVariantDimension#signingConfig:com.android.build.api.dsl.ApkSigningConfig) The associated signing config or null if none are set on the variant dimension. |
| abstract[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?                                            | [versionNameSuffix](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/ApplicationVariantDimension#versionNameSuffix:kotlin.String) Version name suffix.                                                                                 |

| ### Inherited properties ||
|---|---|
| From class[VariantDimension](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/VariantDimension) |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [ExternalNativeBuildOptions](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/ExternalNativeBuildOptions)                                                                                                                       | [externalNativeBuild](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/VariantDimension#externalNativeBuild:com.android.build.api.dsl.ExternalNativeBuildOptions) <br /> 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#). <br />                                                                                                                                                                                                                                                                                | | [JavaCompileOptions](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/JavaCompileOptions)                                                                                                                                       | [javaCompileOptions](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/VariantDimension#javaCompileOptions:com.android.build.api.dsl.JavaCompileOptions) <br /> Options for configuring Java compilation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [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.0/com/android/build/api/dsl/VariantDimension#manifestPlaceholders:kotlin.collections.MutableMap) <br /> The manifest placeholders. See[Inject Build Variables into the Manifest](https://developer.android.com/studio/build/manifest-build-variables.html). <br />                                                                                                                                                                                                                                                                                                                                                                         | | [File](http://docs.oracle.com/javase/8/docs/api/java/io/File.html)?                                                                                                                                                                                                   | [multiDexKeepFile](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/VariantDimension#multiDexKeepFile:java.io.File) <br /> 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` <br />                                                                                                                                                                                                                                                           | | [File](http://docs.oracle.com/javase/8/docs/api/java/io/File.html)?                                                                                                                                                                                                   | [multiDexKeepProguard](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/VariantDimension#multiDexKeepProguard:java.io.File) <br /> 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. <br />                                                                                                                                                                                                                                                                                                                    | | [Ndk](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/Ndk)                                                                                                                                                                     | [ndk](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/VariantDimension#ndk:com.android.build.api.dsl.Ndk) <br /> Encapsulates per-variant configurations for the NDK, such as ABI filters. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)<[File](http://docs.oracle.com/javase/8/docs/api/java/io/File.html)>                                                                                           | [proguardFiles](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/VariantDimension#proguardFiles:kotlin.collections.MutableList) <br /> Specifies the ProGuard configuration files that the plugin should use. There are two ProGuard rules files that ship with the Android plugin and are used by default: - proguard-android.txt - proguard-android-optimize.txt `proguard-android-optimize.txt`is identical to`proguard-android.txt`, except with optimizations enabled. You can use[getDefaultProguardFileString](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/ApplicationVariantDimension#)to return the full path of the files. <br /> | | [Shaders](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/Shaders)                                                                                                                                                             | [shaders](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/VariantDimension#shaders:com.android.build.api.dsl.Shaders) <br /> Options for configuring the shader compiler. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)<[File](http://docs.oracle.com/javase/8/docs/api/java/io/File.html)>                                                                                           | [testProguardFiles](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/dsl/VariantDimension#testProguardFiles:kotlin.collections.MutableList) <br /> 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. <br />                                                                                                                                                                                                                                                                                                                                                              | ||

## Properties

### applicationIdSuffix

```
abstract var applicationIdSuffix: String?
```

Application id suffix. It is appended to the "base" application id when calculating the final application id for a variant.

In case there are product flavor dimensions specified, the final application id suffix will contain the suffix from the default product flavor, followed by the suffix from product flavor of the first dimension, second dimension and so on. All of these will have a dot in between e.g. \&quot;defaultSuffix.dimension1Suffix.dimensions2Suffix\&quot;.  

### multiDexEnabled

```
abstract var multiDexEnabled: Boolean?
```

Returns whether multi-dex is enabled.

This can be null if the flag is not set, in which case the default value is used.  

### signingConfig

```
abstract var signingConfig: ApkSigningConfig?
```

The associated signing config or null if none are set on the variant dimension.  

### versionNameSuffix

```
abstract var versionNameSuffix: String?
```

Version name suffix. It is appended to the "base" version name when calculating the final version name for a variant.

In case there are product flavor dimensions specified, the final version name suffix will contain the suffix from the default product flavor, followed by the suffix from product flavor of the first dimension, second dimension and so on.