# ComponentBuilder

# ComponentBuilder

<br />

```
interface ComponentBuilder : ComponentIdentity
```

<br />

Known direct subclasses  
[VariantBuilder](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/variant/VariantBuilder)  

|-----------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|
| [VariantBuilder](https://developer.android.com/reference/tools/gradle-api/8.1/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. |

Known indirect subclasses  
[ApplicationVariantBuilder](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/variant/ApplicationVariantBuilder),[DynamicFeatureVariantBuilder](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/variant/DynamicFeatureVariantBuilder),[LibraryVariantBuilder](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/variant/LibraryVariantBuilder),[TestVariantBuilder](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/variant/TestVariantBuilder)  

|---------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ApplicationVariantBuilder](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/variant/ApplicationVariantBuilder)       | Application specific variant object that contains properties that will determine the variant's build flow.                                                          |
| [DynamicFeatureVariantBuilder](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/variant/DynamicFeatureVariantBuilder) |                                                                                                                                                                     |
| [LibraryVariantBuilder](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/variant/LibraryVariantBuilder)               | [VariantBuilder](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/variant/VariantBuilder)type for library projects                |
| [TestVariantBuilder](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/variant/TestVariantBuilder)                     | [VariantBuilder](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/variant/VariantBuilder)type for tests associated with a module. |

*** ** * ** ***

Component object that contains properties that must be set during configuration time as it changes the build flow for the variant.

## Summary

|                                                                                                                                       ### Public properties                                                                                                                                        ||
|------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [enable](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/variant/ComponentBuilder#enable()) Set to`true`if the variant is active and should be configured, false otherwise. |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [enabled](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/variant/ComponentBuilder#enabled()) **This property is deprecated.**Will be removed in 8.0                        |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ### Inherited properties                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| From class[com.android.build.api.variant.ComponentIdentity](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/variant/ComponentIdentity) |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?`                                                                                                                                                                                                                                                                | [buildType](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/variant/ComponentIdentity#buildType()) Build type name, might be replaced with access to locked DSL object once ready.                 | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?`                                                                                                                                                                                                                                                                | [flavorName](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/variant/ComponentIdentity#flavorName()) The multi-flavor name of the variant.                                                         | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                                                                                                                                                                                                                                                                   | [name](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/variant/ComponentIdentity#name()) Component's name.                                                                                         | | [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/8.1/com/android/build/api/variant/ComponentIdentity#productFlavors()) List of flavor names, might be replaced with access to locked DSL objects once ready. | |

## Public properties

### enable

```
var enable: Boolean
```

Set to`true`if the variant is active and should be configured, false otherwise.  

### enabled

```
var enabled: Boolean
```
| **This property is deprecated.**   
| Will be removed in 8.0