# ApplicationVariantBuilder

# ApplicationVariantBuilder

```
interface ApplicationVariantBuilder : VariantBuilder, HasAndroidTestBuilder
```

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

Application specific variant object that contains properties that will determine the variant's build flow.

For example, an application variant may have minification on or off, or have a different minSdkVersion from the other variants.

All these properties must be resolved during configuration time as[org.gradle.api.Task](https://docs.gradle.org/current/javadoc/org/gradle/api/Task.html)representing the variant build flows must be created.

## Summary

| ### Inherited functions ||
|---|---|
| From class[VariantBuilder](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder) |------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [registerExtension](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#registerExtension(java.lang.Class,%20com.android.build.api.variant.VariantBuilder.registerExtension.T))`(`type:` `[Class](http://docs.oracle.com/javase/8/docs/api/java/lang/Class.html)<out` `T>`, `instance:` `T`)` <br /> Registers an extension object to the variant object. Extension objects can be looked up during the[com.android.build.api.extension.AndroidComponentsExtension.onVariants](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/extension/AndroidComponentsExtension.html#onVariants(com.android.build.api.extension.VariantSelector,%20kotlin.Function1))callbacks by using the[Variant.getExtension](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/Variant#getExtension(java.lang.Class))API. This is very useful for third party plugins that want to attach some variant specific configuration object to the Android Gradle Plugin variant object and make it available to other plugins. <br /> | ||

|                                                                                                                                                                                                                  ### Properties                                                                                                                                                                                                                   ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abstract[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                                            | [debuggable](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/ApplicationVariantBuilder#debuggable:kotlin.Boolean) <br />                                                                                                                        |
| abstract[DependenciesInfoBuilder](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/DependenciesInfoBuilder) | [dependenciesInfo](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/ApplicationVariantBuilder#dependenciesInfo:com.android.build.api.variant.DependenciesInfoBuilder) Specify whether to include SDK dependency information in APKs and Bundles. |

| ### Inherited properties ||
|---|---|
| From class[HasAndroidTestBuilder](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/HasAndroidTestBuilder) |------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [androidTestEnabled](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/HasAndroidTestBuilder#androidTestEnabled:kotlin.Boolean) <br /> Set to`true`if the variant's has any android tests, false otherwise. Value is[Boolean#True](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/ApplicationVariantBuilder#)by default. <br /> | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [enableAndroidTest](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/HasAndroidTestBuilder#enableAndroidTest:kotlin.Boolean) <br /> Set to`true`if the variant's has any android tests, false otherwise. Value is[Boolean#True](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/ApplicationVariantBuilder#)by default. <br />   | ||
| From class[VariantBuilder](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder) |------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [enableUnitTest](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#enableUnitTest:kotlin.Boolean) <br /> Set to`true`if the variant's has any unit tests, false otherwise. Value is[Boolean#True](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/ApplicationVariantBuilder#)by default. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)?        | [maxSdk](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#maxSdk:kotlin.Int) <br /> Gets the maximum supported SDK Version for this variant. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)?        | [minSdk](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#minSdk:kotlin.Int) <br /> Gets or sets the minimum supported SDK Version for this variant. Setting this it will override previous calls of[minSdk](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#minSdk:kotlin.Int)and[minSdkPreview](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#minSdkPreview:kotlin.String)setters. Only one of[minSdk](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#minSdk:kotlin.Int)and[minSdkPreview](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#minSdkPreview:kotlin.String)should be set. <br />                                                           | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?  | [minSdkPreview](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#minSdkPreview:kotlin.String) <br /> Gets or sets the minimum supported SDK Version for this variant as a Preview codename. Setting this it will override previous calls of[minSdk](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#minSdk:kotlin.Int)and[minSdkPreview](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#minSdkPreview:kotlin.String)setters. Only one of[minSdk](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#minSdk:kotlin.Int)and[minSdkPreview](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#minSdkPreview:kotlin.String)should be set. <br />                    | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [renderscriptTargetApi](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#renderscriptTargetApi:kotlin.Int) <br /> Specifies the bytecode version to be generated. We recommend you set this value to the lowest API level able to provide all the functionality you are using <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)?        | [targetSdk](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#targetSdk:kotlin.Int) <br /> Gets or sets the target SDK Version for this variant as a Preview codename. Setting this it will override previous calls of[targetSdk](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#targetSdk:kotlin.Int)and[targetSdkPreview](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#targetSdkPreview:kotlin.String)setters. Only one of[targetSdk](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#targetSdk:kotlin.Int)and[targetSdkPreview](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#targetSdkPreview:kotlin.String)should be set. <br />                  | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?  | [targetSdkPreview](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#targetSdkPreview:kotlin.String) <br /> Gets or sets the target SDK Version for this variant as a Preview codename. Setting this it will override previous calls of[targetSdk](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#targetSdk:kotlin.Int)and[targetSdkPreview](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#targetSdkPreview:kotlin.String)setters. Only one of[targetSdk](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#targetSdk:kotlin.Int)and[targetSdkPreview](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#targetSdkPreview:kotlin.String)should be set. <br /> | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [unitTestEnabled](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder#unitTestEnabled:kotlin.Boolean) <br /> Set to`true`if the variant's has any unit tests, false otherwise. Value is[Boolean#True](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/ApplicationVariantBuilder#)by default. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | ||

## Properties

### debuggable

```
abstract val debuggable: Boolean
```  

### dependenciesInfo

```
abstract val dependenciesInfo: DependenciesInfoBuilder
```

Specify whether to include SDK dependency information in APKs and Bundles.