TestVariantBuilder

Added in 4.2.0

interface TestVariantBuilder : VariantBuilder, GeneratesApkBuilder, CanMinifyCodeBuilder


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 TestComponent (they currently do not have matching builder interfaces).

See ComponentBuilder and VariantBuilder for more information.

Summary

Inherited functions

Unit
<T : Any> registerExtension(type: Class<T>, instance: T)

Registers an extension object to the variant object.

Inherited properties

Boolean

Specifies whether code will be minified

Boolean

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

Boolean

This property is deprecated. Will be removed in 9.0

String?

Build type name.

String?

The multi-flavor name of the variant.

String

Component's name.

List<Pair<StringString>>

List of flavor names.

Boolean?

Sets whether multi-dex is enabled for this variant.

Boolean

This property is deprecated. Will be removed in AGP 9.0.

Int?

Sets the maximum supported SDK Version for this variant.

Int?

Sets the minimum supported SDK Version for this variant.

String?

Sets the minimum supported SDK Version for this variant as a Preview codename.

Int

Specifies the bytecode version to be generated.

Int?

This property is deprecated. Will be removed in v9.0

String?

This property is deprecated. Will be removed in v9.0

Boolean

This property is deprecated. Will be removed in AGP 9.0.