# ComponentIdentity

# ComponentIdentity

```
@Incubating interface ComponentIdentity : Named
```

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

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

|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known Indirect Subclasses [AndroidTest](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/component/AndroidTest),[AndroidTestBuilder](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/component/AndroidTestBuilder),[ApplicationVariant](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/ApplicationVariant.html#),[ApplicationVariantBuilder](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/ApplicationVariantBuilder.html#),[DynamicFeatureVariant](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/DynamicFeatureVariant.html#),[DynamicFeatureVariantBuilder](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/DynamicFeatureVariantBuilder.html#),[LibraryVariant](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/LibraryVariant.html#),[LibraryVariantBuilder](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/LibraryVariantBuilder.html#),[TestComponent](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/component/TestComponent),[TestComponentBuilder](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/component/TestComponentBuilder),[TestVariant](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/TestVariant.html#),[TestVariantBuilder](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/TestVariantBuilder.html#), and 4 others. |---------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [AndroidTest](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/component/AndroidTest)                                       | Properties for the android test Variant of a module.                                                                                                                      | | [AndroidTestBuilder](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/component/AndroidTestBuilder)                         | Variant of the android test artifact.                                                                                                                                     | | [ApplicationVariant](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/ApplicationVariant.html#)                     | Properties for the main Variant of an application.                                                                                                                        | | [ApplicationVariantBuilder](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/ApplicationVariantBuilder.html#)       | Application specific variant object that contains properties that will determine the variant's build flow.                                                                | | [DynamicFeatureVariant](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/DynamicFeatureVariant.html#)               | <br />                                                                                                                                                                    | | [DynamicFeatureVariantBuilder](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/DynamicFeatureVariantBuilder.html#) | <br />                                                                                                                                                                    | | [LibraryVariant](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/LibraryVariant.html#)                             | [Variant](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/Variant.html#)for Library projects                                   | | [LibraryVariantBuilder](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/LibraryVariantBuilder.html#)               | [VariantBuilder](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/VariantBuilder.html#)type for library projects                | | [TestComponent](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/component/TestComponent)                                   | <br />                                                                                                                                                                    | | [TestComponentBuilder](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/component/TestComponentBuilder)                     | <br />                                                                                                                                                                    | | [TestVariant](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/TestVariant.html#)                                   | [Variant](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/Variant.html#)for test-only modules.                                 | | [TestVariantBuilder](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/TestVariantBuilder.html#)                     | [VariantBuilder](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/VariantBuilder.html#)type for tests associated with a module. | | [UnitTest](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/component/UnitTest)                                             | Properties for the unit test variant of a module.                                                                                                                         | | [UnitTestBuilder](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/component/UnitTestBuilder)                               | Variant of the unit test artifact.                                                                                                                                        | | [Variant](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/Variant.html#)                                           | Parent interface for all types of variants.                                                                                                                               | | [VariantBuilder](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/VariantBuilder.html#)                             | 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/4.2/com/android/build/api/component/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/4.2/com/android/build/api/component/ComponentIdentity#flavorName:kotlin.String) The multi-flavor name of the variant.                                                                   |
| 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/4.2/com/android/build/api/component/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 is an empty string.

The full name of the variant is queried via[getName](https://docs.gradle.org/current/javadoc/org/gradle/api/Named.html#getName()).  

### 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.