Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# ComponentBuilder\n================\n\n\n```\ninterface ComponentBuilder : ComponentIdentity\n```\n\n\u003cbr /\u003e\n\nKnown direct subclasses \n[VariantBuilder](/reference/tools/gradle-api/7.2/com/android/build/api/variant/VariantBuilder) \n\n|------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|\n| [VariantBuilder](/reference/tools/gradle-api/7.2/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. |\n\nKnown indirect subclasses \n[ApplicationVariantBuilder](/reference/tools/gradle-api/7.2/com/android/build/api/variant/ApplicationVariantBuilder), [DynamicFeatureVariantBuilder](/reference/tools/gradle-api/7.2/com/android/build/api/variant/DynamicFeatureVariantBuilder), [LibraryVariantBuilder](/reference/tools/gradle-api/7.2/com/android/build/api/variant/LibraryVariantBuilder), [TestVariantBuilder](/reference/tools/gradle-api/7.2/com/android/build/api/variant/TestVariantBuilder) \n\n|----------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|\n| [ApplicationVariantBuilder](/reference/tools/gradle-api/7.2/com/android/build/api/variant/ApplicationVariantBuilder) | Application specific variant object that contains properties that will determine the variant's build flow. |\n| [DynamicFeatureVariantBuilder](/reference/tools/gradle-api/7.2/com/android/build/api/variant/DynamicFeatureVariantBuilder) | |\n| [LibraryVariantBuilder](/reference/tools/gradle-api/7.2/com/android/build/api/variant/LibraryVariantBuilder) | [VariantBuilder](/reference/tools/gradle-api/7.2/com/android/build/api/variant/VariantBuilder) type for library projects |\n| [TestVariantBuilder](/reference/tools/gradle-api/7.2/com/android/build/api/variant/TestVariantBuilder) | [VariantBuilder](/reference/tools/gradle-api/7.2/com/android/build/api/variant/VariantBuilder) type for tests associated with a module. |\n\n*** ** * ** ***\n\nComponent object that contains properties that must be set during configuration time as it changes the build flow for the variant.\n\nSummary\n-------\n\n| ### Public properties ||\n|------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [enable](/reference/tools/gradle-api/7.2/com/android/build/api/variant/ComponentBuilder#enable()) Set to `true` if the variant is active and should be configured, false otherwise. |\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [enabled](/reference/tools/gradle-api/7.2/com/android/build/api/variant/ComponentBuilder#enabled()) **This property is deprecated.** Will be removed in 8.0 |\n\nPublic properties\n-----------------\n\n### enable\n\n```\nval enable: Boolean\n```\n\nSet to `true` if the variant is active and should be configured, false otherwise. \n\n### enabled\n\n```\nval enabled: Boolean\n```\n| **This property is deprecated.** \n| Will be removed in 8.0"]]