Stay organized with collections
Save and categorize content based on your preferences.
ApplicationVariantBuilder
@Incubating interface ApplicationVariantBuilder : VariantBuilder
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
representing the variant build flows must be created.
Summary
Public methods
|
abstract Unit |
Specify whether to include SDK dependency information in APKs and Bundles.
|
Properties
|
abstract Boolean |
|
abstract DependenciesInfo |
Specify whether to include SDK dependency information in APKs and Bundles.
|
Inherited properties
|
From class ComponentIdentity
String? |
buildType
Build type name, might be replaced with access to locked DSL object once ready.
|
String |
flavorName
The multi-flavor name of the variant.
This does not include the build type. If no flavors are present, this is an empty string.
The full name of the variant is queried via getName.
|
List<Pair<String, String>> |
productFlavors
List of flavor names, might be replaced with access to locked DSL objects once ready.
The order is properly sorted based on the associated dimension order.
|
|
From class ComponentBuilder
Boolean |
enable
Set to true if the variant is active and should be configured, false otherwise.
|
Boolean |
enabled
Set to true if the variant is active and should be configured, false otherwise.
|
|
|
Public methods
dependenciesInfo
abstract fun dependenciesInfo(action: DependenciesInfo.() -> Unit): Unit
Specify whether to include SDK dependency information in APKs and Bundles.
Properties
debuggable
abstract val debuggable: Boolean
dependenciesInfo
abstract val dependenciesInfo: DependenciesInfo
Specify whether to include SDK dependency information in APKs and Bundles.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# ApplicationVariantBuilder\n=========================\n\n```\n@Incubating interface ApplicationVariantBuilder : VariantBuilder\n```\n\n|--------------------------------------------------------------|\n| [com.android.build.api.variant.ApplicationVariantBuilder](#) |\n\nApplication specific variant object that contains properties that will determine the variant's\nbuild flow.\n\nFor example, an application variant may have minification on or off, or have a different\nminSdkVersion from the other variants.\n\nAll these properties must be resolved during configuration time as [org.gradle.api.Task](https://docs.gradle.org/current/javadoc/org/gradle/api/Task.html)\nrepresenting the variant build flows must be created.\n\nSummary\n-------\n\n| ### Public methods ||\n|---------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [dependenciesInfo](#dependenciesInfo(kotlin.Function1))`(`action:` `[DependenciesInfo](../dsl/DependenciesInfo.html#).()` `-\u003e` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`)` Specify whether to include SDK dependency information in APKs and Bundles. |\n\n| ### Properties ||\n|---------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [debuggable](#debuggable:kotlin.Boolean) \u003cbr /\u003e |\n| abstract [DependenciesInfo](../dsl/DependenciesInfo.html#) | [dependenciesInfo](#dependenciesInfo:com.android.build.api.dsl.DependenciesInfo) Specify whether to include SDK dependency information in APKs and Bundles. |\n\n| ### Inherited properties ||\n|---|---|\n| From class [ComponentIdentity](../component/ComponentIdentity.html#) |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? | [buildType](../component/ComponentIdentity.html#buildType:kotlin.String) Build type name, might be replaced with access to locked DSL object once ready. \u003cbr /\u003e | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [flavorName](../component/ComponentIdentity.html#flavorName:kotlin.String) The multi-flavor name of the variant. This does not include the build type. If no flavors are present, this is an empty string. The full name of the variant is queried via [getName](https://docs.gradle.org/current/javadoc/org/gradle/api/Named.html#getName()). \u003cbr /\u003e | | [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)\u003c[Pair](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-pair/index.html)\u003c[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html),` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)\u003e\u003e | [productFlavors](../component/ComponentIdentity.html#productFlavors:kotlin.collections.List) List of flavor names, might be replaced with access to locked DSL objects once ready. The order is properly sorted based on the associated dimension order. \u003cbr /\u003e | ||\n| From class [ComponentBuilder](../component/ComponentBuilder.html#) |------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [enable](../component/ComponentBuilder.html#enable:kotlin.Boolean) Set to `true` if the variant is active and should be configured, false otherwise. \u003cbr /\u003e | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [enabled](../component/ComponentBuilder.html#enabled:kotlin.Boolean) Set to `true` if the variant is active and should be configured, false otherwise. \u003cbr /\u003e | ||\n| From class [VariantBuilder](/reference/tools/gradle-api/4.2/com/android/build/api/variant/VariantBuilder) |------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)? | [maxSdkVersion](/reference/tools/gradle-api/4.2/com/android/build/api/variant/VariantBuilder#maxSdkVersion:kotlin.Int) Gets the maximum supported SDK Version for this variant. \u003cbr /\u003e | | [AndroidVersion](/reference/tools/gradle-api/4.2/com/android/build/api/variant/AndroidVersion) | [minSdkVersion](/reference/tools/gradle-api/4.2/com/android/build/api/variant/VariantBuilder#minSdkVersion:com.android.build.api.variant.AndroidVersion) Gets the minimum supported SDK Version for this variant. \u003cbr /\u003e | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [renderscriptTargetApi](/reference/tools/gradle-api/4.2/com/android/build/api/variant/VariantBuilder#renderscriptTargetApi:kotlin.Int) 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 \u003cbr /\u003e | ||\n\nPublic methods\n--------------\n\n### dependenciesInfo\n\n```\nabstract fun dependenciesInfo(action: DependenciesInfo.() -\u003e Unit): Unit\n```\n\nSpecify whether to include SDK dependency information in APKs and Bundles.\n\nProperties\n----------\n\n### debuggable\n\n```\nabstract val debuggable: Boolean\n``` \n\n### dependenciesInfo\n\n```\nabstract val dependenciesInfo: DependenciesInfo\n```\n\nSpecify whether to include SDK dependency information in APKs and Bundles."]]