# TestVariantBuilder

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


```
interface TestVariantBuilder : VariantBuilder, GeneratesApkBuilder, CanMinifyCodeBuilder
```

<br />

*** ** * ** ***

Model for test components that only contains configuration-time properties that impacts the build flow.

This is for components associated with the `com.android.test` plugin. This is not for test components associated with variants. For these see `https://developer.android.com/reference/tools/gradle-api/9.2/com/android/build/api/variant/TestComponent` (they currently do not have matching builder interfaces).

See `https://developer.android.com/reference/tools/gradle-api/9.2/com/android/build/api/variant/ComponentBuilder` and `https://developer.android.com/reference/tools/gradle-api/9.2/com/android/build/api/variant/VariantBuilder` for more information.

## Summary

| ### Inherited functions |
|---|
| From [com.android.build.api.variant.VariantBuilder](https://developer.android.com/reference/tools/gradle-api/9.2/com/android/build/api/variant/VariantBuilder) |---|---| | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `<T : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html> https://developer.android.com/reference/tools/gradle-api/9.2/com/android/build/api/variant/VariantBuilder#registerExtension(java.lang.Class,kotlin.Any)(type: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html<T>, instance: T)` Registers an extension object to the variant object. | |

| ### Inherited properties |
|---|
| From [com.android.build.api.variant.CanMinifyCodeBuilder](https://developer.android.com/reference/tools/gradle-api/9.2/com/android/build/api/variant/CanMinifyCodeBuilder) |---|---| | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.2/com/android/build/api/variant/CanMinifyCodeBuilder#isMinifyEnabled()` Specifies whether code will be minified | |
| From [com.android.build.api.variant.ComponentBuilder](https://developer.android.com/reference/tools/gradle-api/9.2/com/android/build/api/variant/ComponentBuilder) |---|---| | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.2/com/android/build/api/variant/ComponentBuilder#enable()` Set to `true` if the variant is active and should be configured, false otherwise. | |
| From [com.android.build.api.variant.ComponentIdentity](https://developer.android.com/reference/tools/gradle-api/9.2/com/android/build/api/variant/ComponentIdentity) |---|---| | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/tools/gradle-api/9.2/com/android/build/api/variant/ComponentIdentity#buildType()` Build type name. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/tools/gradle-api/9.2/com/android/build/api/variant/ComponentIdentity#flavorName()` The multi-flavor name of the variant. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.2/com/android/build/api/variant/ComponentIdentity#name()` Component's name. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-pair/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html>>` | `https://developer.android.com/reference/tools/gradle-api/9.2/com/android/build/api/variant/ComponentIdentity#productFlavors()` List of flavor names. | |
| From [com.android.build.api.variant.GeneratesApkBuilder](https://developer.android.com/reference/tools/gradle-api/9.2/com/android/build/api/variant/GeneratesApkBuilder) |---|---| | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.2/com/android/build/api/variant/GeneratesApkBuilder#debuggable()` Sets the APK debuggable flag. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` | `https://developer.android.com/reference/tools/gradle-api/9.2/com/android/build/api/variant/GeneratesApkBuilder#enableMultiDex()` Sets whether multi-dex is enabled for this variant. | |
| From [com.android.build.api.variant.VariantBuilder](https://developer.android.com/reference/tools/gradle-api/9.2/com/android/build/api/variant/VariantBuilder) |---|---| | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html?` | `https://developer.android.com/reference/tools/gradle-api/9.2/com/android/build/api/variant/VariantBuilder#maxSdk()` Sets the maximum supported SDK Version for this variant. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html?` | `https://developer.android.com/reference/tools/gradle-api/9.2/com/android/build/api/variant/VariantBuilder#minSdk()` Sets the minimum supported SDK Version for this variant. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/tools/gradle-api/9.2/com/android/build/api/variant/VariantBuilder#minSdkPreview()` Sets the minimum supported SDK Version for this variant as a Preview codename. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.2/com/android/build/api/variant/VariantBuilder#renderscriptTargetApi()` Specifies the bytecode version to be generated. | |