Stay organized with collections Save and categorize content based on your preferences.

VariantInfo

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 functions

String

Returns the name of the build type.

ImmutableList<String!>

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

String

Returns the name of the variant.

Boolean

Returns true if the variant is debuggable

Boolean

Returns true if this is a test variant

Public functions

getBuildTypeName

fun getBuildTypeName(): String

Returns the name of the build type.

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

getFlavorNames

fun getFlavorNames(): ImmutableList<String!>

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

fun getFullVariantName(): String

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

isDebuggable

fun isDebuggable(): Boolean

Returns true if the variant is debuggable

isTest

fun isTest(): Boolean

Returns true if this is a test variant