# ComponentIdentity

# ComponentIdentity

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

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

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

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

Variant Configuration represents the identify of a variant

This is computed from the list of build type 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.1/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.1/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.1/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