# ComponentIdentity

[View Source](https://cs.android.com/search?q=file:com/android/build/api/variant/ComponentIdentity.kt+class:com.android.build.api.variant.ComponentIdentity) Added in 7.0.0


```
interface ComponentIdentity
```

<br />

Known direct subclasses [ComponentBuilder](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/ComponentBuilder), [Component](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/Component)

|---|---|
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/ComponentBuilder` | Model for components that only contains configuration-time properties that impacts the build flow. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/Component` | Model for components that only contains build-time properties |

Known indirect subclasses [AndroidTest](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/AndroidTest), [ApplicationVariantBuilder](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/ApplicationVariantBuilder), [ApplicationVariant](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/ApplicationVariant), [DeviceTest](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DeviceTest), [DynamicFeatureVariantBuilder](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DynamicFeatureVariantBuilder), [DynamicFeatureVariant](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DynamicFeatureVariant), [HostTest](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/HostTest), [KotlinMultiplatformAndroidVariantBuilder](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/KotlinMultiplatformAndroidVariantBuilder), [KotlinMultiplatformAndroidVariant](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/KotlinMultiplatformAndroidVariant), [LibraryVariantBuilder](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/LibraryVariantBuilder), [LibraryVariant](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/LibraryVariant), [TestComponent](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/TestComponent), [TestFixtures](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/TestFixtures), [TestVariantBuilder](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/TestVariantBuilder), [TestVariant](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/TestVariant), [UnitTest](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/component/UnitTest), [UnitTest](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/UnitTest), [VariantBuilder](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/VariantBuilder), [Variant](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/Variant)

|---|---|
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/AndroidTest` | Model for Android Test components that contains build-time properties |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/ApplicationVariantBuilder` | Model for application components that only contains configuration-time properties that impacts the build flow. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/ApplicationVariant` | Model for application components that only contains build-time properties. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DeviceTest` | Model for Device Test components that contains build-time properties |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DynamicFeatureVariantBuilder` | Model for dynamic feature components that only contains configuration-time properties that impacts the build flow. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/DynamicFeatureVariant` | Model for dynamic feature components that only contains build-time properties. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/HostTest` | Model for Host Test components that contains build-time properties. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/KotlinMultiplatformAndroidVariantBuilder` | Model for kotlin multiplatform library components that only contains configuration-time properties that impacts the build flow. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/KotlinMultiplatformAndroidVariant` | Properties for the main Variant of a kotlin multiplatform android library |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/LibraryVariantBuilder` | Model for library components that only contains configuration-time properties that impacts the build flow. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/LibraryVariant` | Model for library components that only contains build-time properties. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/TestComponent` | Model for test components that contains build-time properties. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/TestFixtures` | Model for Test Fixtures components that contains build-time properties |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/TestVariantBuilder` | Model for test components that only contains configuration-time properties that impacts the build flow. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/TestVariant` | Model for test components that only contains build-time properties. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/component/UnitTest` | **This interface is deprecated.** Use the com.android.build.api.variant package |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/UnitTest` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/Component` for unit tests |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/VariantBuilder` | Model for variant components that only contains configuration-time properties that impacts the build flow. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/Variant` | Model for variant components that only contains build-time properties |

*** ** * ** ***

Variant Configuration represents the identify of a variant

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

## Summary

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/ComponentIdentity#buildType()` Build type name. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/ComponentIdentity#flavorName()` The multi-flavor name of the variant. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/ComponentIdentity#name()` Component's name. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-pair/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html>>` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/ComponentIdentity#productFlavors()` List of flavor names. |

## Public properties

### buildType

Added in 7.0.0

```
val buildType: String?
```

Build type name.

### flavorName

Added in 7.0.0

```
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 `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/ComponentIdentity#name()`.

### name

Added in 7.0.0

```
val name: String
```

Component's name.

### productFlavors

Added in 7.0.0

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

List of flavor names.

The order is properly sorted based on the associated dimension order.