Component

@Incubating interface Component<PropertiesT : ComponentProperties> : ComponentIdentity, ActionableComponentObject
TestComponent

Variant

Variant object that contains properties that must be set during configuration time as it changes the build flow for the variant.

AndroidTest

Variant of the android test artifact

ApplicationVariant

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

DynamicFeatureVariant

LibraryVariant

Variant type for library projects

TestVariant

Variant type for tests associated with a module.

UnitTest

Variant of the unit test artifact

Component object that contains properties that must be set during configuration time as it changes the build flow for the variant.

Summary

Public methods

abstract Unit
onProperties(action: PropertiesT.() -> Unit)

Runs the Action block on the VariantProperties object once created.

Properties

abstract Boolean

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

Inherited properties

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

Public methods

onProperties

abstract fun onProperties(action: PropertiesT.() -> Unit): Unit

Runs the Action block on the VariantProperties object once created.

Properties

enabled

abstract var enabled: Boolean

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