# VariantDimension

[View Source](https://cs.android.com/search?q=file:com/android/build/api/dsl/VariantDimension.kt+class:com.android.build.api.dsl.VariantDimension) Added in 4.2.0


```
interface VariantDimension
```

<br />

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

|---|---|
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/ApplicationVariantDimension` | Shared properties between DSL objects that contribute to an application variant. |
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/BaseFlavor` | Shared properties between DSL objects `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/ProductFlavor` and `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/DefaultConfig` |
| `https://developer.android.com/reference/tools/gradle-api/9.4/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. |
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/DynamicFeatureVariantDimension` | Shared properties between DSL objects that contribute to an dynamic feature variant. |
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/LibraryVariantDimension` | Shared properties between DSL objects that contribute to a library variant. |
| `https://developer.android.com/reference/tools/gradle-api/9.4/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/9.4/com/android/build/api/dsl/ApplicationBaseFlavor), [ApplicationBuildType](https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/ApplicationBuildType), [ApplicationDefaultConfig](https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/ApplicationDefaultConfig), [ApplicationProductFlavor](https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/ApplicationProductFlavor), [DefaultConfig](https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/DefaultConfig), [DynamicFeatureBaseFlavor](https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/DynamicFeatureBaseFlavor), [DynamicFeatureBuildType](https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/DynamicFeatureBuildType), [DynamicFeatureDefaultConfig](https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/DynamicFeatureDefaultConfig), [DynamicFeatureProductFlavor](https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/DynamicFeatureProductFlavor), [LibraryBaseFlavor](https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/LibraryBaseFlavor), [LibraryBuildType](https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/LibraryBuildType), [LibraryDefaultConfig](https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/LibraryDefaultConfig), [LibraryProductFlavor](https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/LibraryProductFlavor), [ProductFlavor](https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/ProductFlavor), [TestBaseFlavor](https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/TestBaseFlavor), [TestBuildType](https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/TestBuildType), [TestDefaultConfig](https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/TestDefaultConfig), [TestProductFlavor](https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/TestProductFlavor)

|---|---|
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/ApplicationBaseFlavor` | Shared properties between `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/ApplicationProductFlavor` and `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/ApplicationDefaultConfig` |
| `https://developer.android.com/reference/tools/gradle-api/9.4/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. |
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/ApplicationDefaultConfig` | Specifies defaults for properties that the Android application plugin applies to all build variants. |
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/ApplicationProductFlavor` | Encapsulates all product flavors properties for application projects. |
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/DefaultConfig` | Specifies defaults for variant properties that the Android plugin applies to all build variants. |
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/DynamicFeatureBaseFlavor` | Shared properties between DSL objects `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/DynamicFeatureProductFlavor` and `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/DynamicFeatureDefaultConfig` |
| `https://developer.android.com/reference/tools/gradle-api/9.4/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. |
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/DynamicFeatureDefaultConfig` | Specifies defaults for properties that the Android dynamic-feature plugin applies to all build variants. |
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/DynamicFeatureProductFlavor` | Encapsulates all product flavors properties for dynamic feature projects. |
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/LibraryBaseFlavor` | Shared properties between `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/LibraryProductFlavor` and `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/LibraryDefaultConfig` |
| `https://developer.android.com/reference/tools/gradle-api/9.4/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. |
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/LibraryDefaultConfig` | Specifies defaults for properties that the Android library plugin applies to all build variants. |
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/LibraryProductFlavor` | Encapsulates all product flavors properties for library projects. |
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/ProductFlavor` | Encapsulates all product flavors properties for this project. |
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/TestBaseFlavor` | Shared properties between `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/TestProductFlavor` and `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/TestDefaultConfig` |
| `https://developer.android.com/reference/tools/gradle-api/9.4/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. |
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/TestDefaultConfig` | Specifies defaults for properties that the Android test plugin applies to all build variants. |
| `https://developer.android.com/reference/tools/gradle-api/9.4/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, `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/BuildType` and `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/ProductFlavor` and `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/DefaultConfig`.

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#addManifestPlaceholders(kotlin.collections.Map)(manifestPlaceholders: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html>)` Adds manifest placeholders. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#buildConfigField(kotlin.String,kotlin.String,kotlin.String)(type: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, name: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, value: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Adds a new field to the generated BuildConfig class. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `@https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#externalNativeBuild(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/ExternalNativeBuildFlags.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Encapsulates per-variant CMake and ndk-build configurations for your external native build. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#javaCompileOptions(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/JavaCompileOptions.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Options for configuring Java compilation. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#ndk(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/Ndk.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Encapsulates per-variant configurations for the NDK, such as ABI filters. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `@https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html [optimization](https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#optimization(kotlin.Function1))(action: https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/Optimization.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` **This function is deprecated.** Use ApplicationBuildType.optimization(action) instead |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#proguardFile(kotlin.Any)(proguardFile: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)` Adds a new ProGuard configuration file. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#proguardFiles(kotlin.Array)(vararg files: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)` Adds new ProGuard configuration files. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#resValue(kotlin.String,kotlin.String,kotlin.String)(type: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, name: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, value: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Adds a new generated resource. |
| `https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html?` | `@https://developer.android.com/reference/tools/gradle-api/9.4/org/gradle/declarative/dsl/model/annotations/HiddenInDefinition [setManifestPlaceholders](https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#setManifestPlaceholders(kotlin.collections.Map))(manifestPlaceholders: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html>)` **This function is deprecated.** Use manifestPlaceholders property instead |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#setProguardFiles(kotlin.collections.Iterable)(proguardFileIterable: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-iterable/index.html<*>)` Replaces the ProGuard configuration files. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#shaders(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/Shaders.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Configure the shader compiler options. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#testProguardFile(kotlin.Any)(proguardFile: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)` Adds a proguard rule file to be used when processing test code. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#testProguardFiles(kotlin.Array)(vararg proguardFiles: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)` Adds proguard rule files to be used when processing test code. |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/ExternalNativeBuildFlags` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#externalNativeBuild()` Encapsulates per-variant CMake and ndk-build configurations for your external native build. |
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/JavaCompileOptions` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#javaCompileOptions()` Options for configuring Java compilation. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-map/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html>` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#manifestPlaceholders()` The manifest placeholders. |
| `https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html?` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#multiDexKeepFile()` **This property is deprecated.** This property is deprecated. |
| `https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html?` | `https://developer.android.com/reference/tools/gradle-api/9.4/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. |
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/Ndk` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#ndk()` Encapsulates per-variant configurations for the NDK, such as ABI filters. |
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/Optimization` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#optimization()` **This property is deprecated.** Use ApplicationBuildType.optimization instead |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html<https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html>` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#proguardFiles()` Specifies the ProGuard configuration files that the plugin should use. |
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/Shaders` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#shaders()` Options for configuring the shader compiler. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html<https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html>` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#testProguardFiles()` The collection of proguard rule files to be used when processing test code. |

## Public functions

### addManifestPlaceholders

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

Added in 4.2.0

```
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: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | the type of the field |
| `name: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | the name of the field |
| `value: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | the value of the field |

### externalNativeBuild

Added in 8.0.2

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

Added in 4.2.0

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

Options for configuring Java compilation.

### ndk

Added in 4.2.0

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

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

### optimization

Added in 7.3.0 Deprecated in 8.13.0

```
@Incubating
fun [optimization](https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#optimization(kotlin.Function1))(action: Optimization.() -> Unit): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Use ApplicationBuildType.optimization(action) instead

### proguardFile

Added in 4.2.0

```
fun proguardFile(proguardFile: Any): Any
```

Adds a new ProGuard configuration file.

`proguardFile getDefaultProguardFile('proguard-android-optimize.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

Added in 4.2.0

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

Added in 4.2.0

```
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: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | the type of the resource |
| `name: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | the name of the resource |
| `value: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | the value of the resource |

### setManifestPlaceholders

```
@HiddenInDefinition
fun [setManifestPlaceholders](https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/VariantDimension#setManifestPlaceholders(kotlin.collections.Map))(manifestPlaceholders: Map<String, Any>): Void?
```

> [!CAUTION]
> **This function is deprecated.**   
> Use manifestPlaceholders property instead

### setProguardFiles

Added in 7.0.0

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

Replaces the ProGuard configuration files.

This method has a return value for legacy reasons.

### shaders

Added in 4.2.0

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

Configure the shader compiler options.

### testProguardFile

Added in 4.2.0

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

Added in 4.2.0

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

Added in 4.2.0

```
val externalNativeBuild: ExternalNativeBuildFlags
```

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

Added in 4.2.0

```
val javaCompileOptions: JavaCompileOptions
```

Options for configuring Java compilation.

### manifestPlaceholders

Added in 4.2.0

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

Added in 4.2.0 Deprecated in 7.0.0

```
var multiDexKeepFile: File?
```

> [!CAUTION]
> **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

Added in 4.2.0

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

Added in 4.2.0

```
val ndk: Ndk
```

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

### optimization

Added in 7.3.0 Deprecated in 8.13.0

```
val optimization: Optimization
```

> [!CAUTION]
> **This property is deprecated.**   
> Use ApplicationBuildType.optimization instead

### proguardFiles

Added in 4.2.0

```
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 |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html<https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html>` | a non-null collection of files. |

### shaders

Added in 4.2.0

```
val shaders: Shaders
```

Options for configuring the shader compiler.

### testProguardFiles

Added in 4.2.0

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