# ComponentIdentity

# ComponentIdentity

```
interface ComponentIdentity
```

|------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [com.android.build.api.variant.ComponentIdentity](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/ComponentIdentity#) |

|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known Direct Subclasses [Component](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/Component),[ComponentBuilder](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/ComponentBuilder),[ComponentIdentity](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/component/ComponentIdentity.html#) |-------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------| | [Component](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/Component)                         | <br />                                                                                                                             | | [ComponentBuilder](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/ComponentBuilder)           | Component object that contains properties that must be set during configuration time as it changes the build flow for the variant. | | [ComponentIdentity](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/component/ComponentIdentity.html#) | <br />                                                                                                                             | |

|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known Indirect Subclasses [AndroidTest](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/AndroidTest),[AndroidTest](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/component/AndroidTest.html#),[AndroidTest](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/component/AndroidTest.html#),[AndroidTest](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/component/AndroidTest.html#),[ApplicationVariant](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/ApplicationVariant),[ApplicationVariantBuilder](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/ApplicationVariantBuilder),[Component](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/component/Component.html#),[ComponentBuilder](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/component/ComponentBuilder.html#),[DynamicFeatureVariant](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/DynamicFeatureVariant),[DynamicFeatureVariantBuilder](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/DynamicFeatureVariantBuilder),[LibraryVariant](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/LibraryVariant),[LibraryVariantBuilder](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/LibraryVariantBuilder), and 14 others. |---------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [AndroidTest](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/AndroidTest)                                   | Properties for the android test Variant of a module.                                                                                                                | | [AndroidTest](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/component/AndroidTest.html#)                           | <br />                                                                                                                                                              | | [AndroidTest](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/component/AndroidTest.html#)                           | <br />                                                                                                                                                              | | [AndroidTest](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/component/AndroidTest.html#)                           | <br />                                                                                                                                                              | | [ApplicationVariant](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/ApplicationVariant)                     | Properties for the main Variant of an application.                                                                                                                  | | [ApplicationVariantBuilder](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/ApplicationVariantBuilder)       | Application specific variant object that contains properties that will determine the variant's build flow.                                                          | | [Component](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/component/Component.html#)                               | <br />                                                                                                                                                              | | [ComponentBuilder](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/component/ComponentBuilder.html#)                 | <br />                                                                                                                                                              | | [DynamicFeatureVariant](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/DynamicFeatureVariant)               | <br />                                                                                                                                                              | | [DynamicFeatureVariantBuilder](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/DynamicFeatureVariantBuilder) | <br />                                                                                                                                                              | | [LibraryVariant](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/LibraryVariant)                             | [Variant](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/Variant)for Library projects                                   | | [LibraryVariantBuilder](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/LibraryVariantBuilder)               | [VariantBuilder](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder)type for library projects                | | [TestComponent](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/TestComponent)                               | <br />                                                                                                                                                              | | [TestComponent](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/component/TestComponent.html#)                       | <br />                                                                                                                                                              | | [TestComponent](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/component/TestComponent.html#)                       | <br />                                                                                                                                                              | | [TestFixtures](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/TestFixtures)                                 | <br />                                                                                                                                                              | | [TestFixtures](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/component/TestFixtures.html#)                         | <br />                                                                                                                                                              | | [TestFixtures](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/component/TestFixtures.html#)                         | <br />                                                                                                                                                              | | [TestVariant](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/TestVariant)                                   | [Variant](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/Variant)for test-only modules.                                 | | [TestVariantBuilder](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/TestVariantBuilder)                     | [VariantBuilder](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder)type for tests associated with a module. | | [UnitTest](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/UnitTest)                                         | <br />                                                                                                                                                              | | [UnitTest](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/component/UnitTest.html#)                                 | Properties for the unit test variant of a module.                                                                                                                   | | [UnitTest](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/component/UnitTest.html#)                                 | Properties for the unit test variant of a module.                                                                                                                   | | [UnitTest](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/component/UnitTest.html#)                                 | Properties for the unit test variant of a module.                                                                                                                   | | [Variant](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/Variant)                                           | Parent interface for all types of variants.                                                                                                                         | | [VariantBuilder](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/VariantBuilder)                             | Variant object that contains properties that must be set during configuration time as it changes the build flow for the variant.                                    | |

Variant Configuration represents the identify of a variant

This is computed from the list of build types and flavors.

## Summary

|                                                                                                                                                                                                                                                                                                   ### Properties                                                                                                                                                                                                                                                                                                   ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abstract[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?                                                                                                                                                                                                                                                             | [buildType](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/ComponentIdentity#buildType:kotlin.String) Build type name, might be replaced with access to locked DSL object once ready.                           |
| abstract[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?                                                                                                                                                                                                                                                             | [flavorName](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/ComponentIdentity#flavorName:kotlin.String) The multi-flavor name of the variant.                                                                   |
| abstract[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                                                                                                                                                                                                                                                              | [name](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/ComponentIdentity#name:kotlin.String) Component's name.                                                                                                   |
| abstract[List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)\<[Pair](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-pair/index.html)\<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html),[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)\>\> | [productFlavors](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/ComponentIdentity#productFlavors:kotlin.collections.List) List of flavor names, might be replaced with access to locked DSL objects once ready. |

## Properties

### buildType

```
abstract val buildType: String?
```

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

### flavorName

```
abstract val flavorName: String?
```

The multi-flavor name of the variant.

This does not include the build type. If no flavors are present, this will return null

The full name of the variant is queried via[name](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/variant/ComponentIdentity#name:kotlin.String).  

### name

```
abstract val name: String
```

Component's name.  

### productFlavors

```
abstract val productFlavors: List<Pair<String, String>>
```

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.