ComponentBuilder

public interface ComponentBuilder extends ComponentIdentity

Known direct subclasses
VariantBuilder

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

Known indirect subclasses
ApplicationVariantBuilder

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

DynamicFeatureVariantBuilder
LibraryVariantBuilder

VariantBuilder type for library projects

TestVariantBuilder

VariantBuilder type for tests associated with a module.


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 boolean

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

abstract boolean
abstract void
setEnable(boolean enable)

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

abstract void
setEnabled(boolean enabled)

Inherited methods

From com.android.build.api.variant.ComponentIdentity
abstract String

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

abstract String

The multi-flavor name of the variant.

abstract @NonNull String

Component's name.

abstract @NonNull List<@NonNull Pair<@NonNull String, @NonNull String>>

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

Public methods

getEnable

abstract boolean getEnable()

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

getEnabled

abstract boolean getEnabled()

setEnable

abstract void setEnable(boolean enable)

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

setEnabled

abstract void setEnabled(boolean enabled)