# VariantInfo

# VariantInfo

```
interface VariantInfo
```

|------------------------------------------------------------------------------------------------------------------------------------------------------|
| [com.android.build.api.variant.VariantInfo](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/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](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                   | [getBuildTypeName](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/VariantInfo#getBuildTypeName())`()` Returns the name of the build type.                   |
| abstractImmutableList\<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!\> | [getFlavorNames](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/VariantInfo#getFlavorNames())`()` Returns a list of flavor names that make up this variant. |
| abstract[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                   | [getFullVariantName](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/VariantInfo#getFullVariantName())`()` Returns the name of the variant.                  |
| abstract[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                 | [isDebuggable](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/VariantInfo#isDebuggable())`()` Returns true if the variant is debuggable                     |
| abstract[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                 | [isTest](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/VariantInfo#isTest())`()` Returns true if this is a test variant                                    |

## Public methods

### getBuildTypeName

```
@NonNull abstract fun getBuildTypeName(): String
```

Returns the name of the build type.

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

### getFlavorNames

```
@NonNull abstract 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.

| Return ||
|---|---|
| ImmutableList\<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!\>:the ordered list of flavor names. May be empty. ||

### getFullVariantName

```
@NonNull abstract fun getFullVariantName(): String
```

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

### isDebuggable

```
abstract fun isDebuggable(): Boolean
```

Returns true if the variant is debuggable  

### isTest

```
abstract fun isTest(): Boolean
```

Returns true if this is a test variant