VariantInfo

public interface VariantInfo


Information about the variant being built.

Only the Android Gradle Plugin should create instances of this interface.

Immutable, no access to tasks

Summary

Public methods

abstract String

Returns the name of the build type.

abstract ImmutableList<String>

Returns a list of flavor names that make up this variant.

abstract String

Returns the name of the variant.

abstract boolean

Returns true if the variant is debuggable

abstract boolean

Returns true if this is a test variant

Public methods

getBuildTypeName

abstract String getBuildTypeName()

Returns the name of the build type.

By convention, build-type settings should override flavor settings.

getFlavorNames

abstract ImmutableList<StringgetFlavorNames()

Returns a list of flavor names that make up this variant.

By convention settings from earlier flavors should override settings from later flavors.

Returns
ImmutableList<String>

the ordered list of flavor names. May be empty.

getFullVariantName

abstract String getFullVariantName()

Returns the name of the variant. This is composed of the build types and flavors

isDebuggable

abstract boolean isDebuggable()

Returns true if the variant is debuggable

isTest

abstract boolean isTest()

Returns true if this is a test variant