ApplicationVariantBuilder

interface ApplicationVariantBuilder : VariantBuilder, HasAndroidTestBuilder, HasTestFixturesBuilder


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 properties

Boolean
DependenciesInfoBuilder

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

Inherited functions

From class com.android.build.api.variant.VariantBuilder
Unit
<T : Any> registerExtension(type: Class<T>, instance: T)

Registers an extension object to the variant object.

Inherited properties

From class com.android.build.api.variant.ComponentBuilder
Boolean

Set to true if the variant is active and should be configured, false otherwise.

Boolean

This property is deprecated. Will be removed in 8.0

From class com.android.build.api.variant.ComponentIdentity
String?

Build type name, might be replaced with access to locked DSL object once ready.

String?

The multi-flavor name of the variant.

String

Component's name.

List<Pair<StringString>>

List of flavor names, might be replaced with access to locked DSL objects once ready.

From class com.android.build.api.variant.HasAndroidTestBuilder
Boolean

This property is deprecated. replaced with enableAndroidTest

Boolean

Set to true if the variant's has any android tests, false otherwise.

From class com.android.build.api.variant.HasTestFixturesBuilder
Boolean

Set to true if the variant's has test fixtures, false otherwise.

From class com.android.build.api.variant.VariantBuilder
Boolean

Set to true if the variant's has any unit tests, false otherwise.

Int?

Gets the maximum supported SDK Version for this variant.

Int?

Gets or sets the minimum supported SDK Version for this variant.

String?

Gets or sets the minimum supported SDK Version for this variant as a Preview codename.

Int

Specifies the bytecode version to be generated.

Int?

Gets or sets the target SDK Version for this variant as a Preview codename.

String?

Gets or sets the target SDK Version for this variant as a Preview codename.

Boolean

This property is deprecated. Use enableUnitTest

Public properties

debuggable

val debuggableBoolean

dependenciesInfo

val dependenciesInfoDependenciesInfoBuilder

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