Stay organized with collections
Save and categorize content based on your preferences.
LibraryBuildFeatures
@Incubating interface LibraryBuildFeatures : BuildFeatures
A list of build features that can be disabled or enabled in an Android Library project.
Summary
Properties
|
abstract Boolean? |
Flag to disable Android resource processing.
|
abstract Boolean? |
Flag to enable Data Binding.
|
abstract Boolean? |
Flag to enable Machine Learning Model Binding.
|
abstract Boolean? |
Flag to enable generating Prefab packages for AARs.
|
Inherited properties
|
From class BuildFeatures
Boolean? |
aidl
Flag to enable AIDL compilation.
Setting the value to null resets to the default value.
Default value is true .
You can override the default for this for all projects in your build by adding the line
android.defaults.buildfeatures.aidl=true
in the gradle.properties file at the root project of your build.
More information about this feature at: TBD
|
Boolean? |
buildConfig
Flag to enable/disable generation of the BuildConfig class.
Setting the value to null resets to the default value.
Default value is true .
You can override the default for this for all projects in your build by adding the line
android.defaults.buildfeatures.buildconfig=true
in the gradle.properties file at the root project of your build.
More information about this feature at: TBD
|
Boolean? |
compose
Flag to enable Compose feature.
Setting the value to null resets to the default value
Default value is false .
More information available about this feature at: TBD
|
Boolean? |
prefab
Flag to enable/disable import of Prefab dependencies from AARs.
Setting the value to null resets to the default value.
Default value is false .
You can override the default for this in your module by setting
android {
buildFeatures {
prefab true
}
}
in the module's build.gradle file.
More information about this feature at: TBD
|
Boolean? |
renderScript
Flag to enable RenderScript compilation.
Setting the value to null resets to the default value.
Default value is true .
You can override the default for this for all projects in your build by adding the line
android.defaults.buildfeatures.renderscript=true
in the gradle.properties file at the root project of your build.
More information about this feature at: TBD
|
Boolean? |
resValues
Flag to enable Resource Values generation.
Setting the value to null resets to the default value.
Default value is true .
You can override the default for this for all projects in your build by adding the line
android.defaults.buildfeatures.resvalues=true
in the gradle.properties file at the root project of your build.
More information about this feature at: TBD
|
Boolean? |
shaders
Flag to enable Shader compilation.
Setting the value to null resets to the default value.
Default value is true .
You can override the default for this for all projects in your build by adding the line
android.defaults.buildfeatures.shaders=true
in the gradle.properties file at the root project of your build.
More information about this feature at: TBD
|
Boolean? |
viewBinding
Flag to enable View Binding.
Setting the value to null resets to the default value.
Default value is false .
You can override the default for this for all projects in your build by adding the line
android.defaults.buildfeatures.viewbinding=true
in the gradle.properties file at the root project of your build.
More information about this feature at: TBD
|
|
Properties
androidResources
abstract var androidResources: Boolean?
Flag to disable Android resource processing.
Setting the value to 'null' resets to the default value.
Default value is 'true'.
You can override the default for this for all projects in your build by adding the line
android.library.defaults.buildfeatures.androidresources=false
in the gradle.properties file at the root project of your build.
More information about this feature at: TBD
dataBinding
abstract var dataBinding: Boolean?
Flag to enable Data Binding.
Setting the value to null
resets to the default value.
Default value is false
.
You can override the default for this for all projects in your build by adding the line
android.defaults.buildfeatures.databinding=true
in the gradle.properties
file at the root project of your build.
More information about this feature at: TBD
mlModelBinding
abstract var mlModelBinding: Boolean?
Flag to enable Machine Learning Model Binding.
Setting the value to null
resets to the default value.
Default value is false
.
You can override the default for this for all projects in your build by adding the line
android.defaults.buildfeatures.mlmodelbinding=true
in the gradle.properties
file at the root project of your build.
More information about this feature at: TBD
prefabPublishing
abstract var prefabPublishing: Boolean?
Flag to enable generating Prefab packages for AARs.
Setting the value to null
resets to the default value.
Default value is false
.
You can override the default for this for all projects in your build by adding the line
android.defaults.buildfeatures.prefabPublishing=true
in the gradle.properties
file at the root project of your build.
More information about this feature at: TODO(http://b/156405121)
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,["# LibraryBuildFeatures\n====================\n\n```\n@Incubating interface LibraryBuildFeatures : BuildFeatures\n```\n\n|-----------------------------------------------------|\n| [com.android.build.api.dsl.LibraryBuildFeatures](#) |\n\nA list of build features that can be disabled or enabled in an Android Library project.\n\nSummary\n-------\n\n| ### Properties ||\n|----------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| abstract [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)? | [androidResources](#androidResources:kotlin.Boolean) Flag to disable Android resource processing. |\n| abstract [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)? | [dataBinding](#dataBinding:kotlin.Boolean) Flag to enable Data Binding. |\n| abstract [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)? | [mlModelBinding](#mlModelBinding:kotlin.Boolean) Flag to enable Machine Learning Model Binding. |\n| abstract [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)? | [prefabPublishing](#prefabPublishing:kotlin.Boolean) Flag to enable generating Prefab packages for AARs. |\n\n| ### Inherited properties ||\n|---|---|\n| From class [BuildFeatures](/reference/tools/gradle-api/4.2/com/android/build/api/dsl/BuildFeatures) |-------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)? | [aidl](/reference/tools/gradle-api/4.2/com/android/build/api/dsl/BuildFeatures#aidl:kotlin.Boolean) Flag to enable AIDL compilation. Setting the value to `null` resets to the default value. Default value is `true`. You can override the default for this for all projects in your build by adding the line `android.defaults.buildfeatures.aidl=true` in the gradle.properties file at the root project of your build. More information about this feature at: TBD \u003cbr /\u003e | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)? | [buildConfig](/reference/tools/gradle-api/4.2/com/android/build/api/dsl/BuildFeatures#buildConfig:kotlin.Boolean) Flag to enable/disable generation of the `BuildConfig` class. Setting the value to `null` resets to the default value. Default value is `true`. You can override the default for this for all projects in your build by adding the line android.defaults.buildfeatures.buildconfig=true in the gradle.properties file at the root project of your build. More information about this feature at: TBD \u003cbr /\u003e | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)? | [compose](/reference/tools/gradle-api/4.2/com/android/build/api/dsl/BuildFeatures#compose:kotlin.Boolean) Flag to enable Compose feature. Setting the value to `null` resets to the default value Default value is `false`. More information available about this feature at: TBD \u003cbr /\u003e | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)? | [prefab](/reference/tools/gradle-api/4.2/com/android/build/api/dsl/BuildFeatures#prefab:kotlin.Boolean) Flag to enable/disable import of Prefab dependencies from AARs. Setting the value to `null` resets to the default value. Default value is `false`. You can override the default for this in your module by setting android { buildFeatures { prefab true } } in the module's build.gradle file. More information about this feature at: TBD \u003cbr /\u003e | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)? | [renderScript](/reference/tools/gradle-api/4.2/com/android/build/api/dsl/BuildFeatures#renderScript:kotlin.Boolean) Flag to enable RenderScript compilation. Setting the value to `null` resets to the default value. Default value is `true`. You can override the default for this for all projects in your build by adding the line `android.defaults.buildfeatures.renderscript=true` in the gradle.properties file at the root project of your build. More information about this feature at: TBD \u003cbr /\u003e | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)? | [resValues](/reference/tools/gradle-api/4.2/com/android/build/api/dsl/BuildFeatures#resValues:kotlin.Boolean) Flag to enable Resource Values generation. Setting the value to `null` resets to the default value. Default value is `true`. You can override the default for this for all projects in your build by adding the line `android.defaults.buildfeatures.resvalues=true` in the gradle.properties file at the root project of your build. More information about this feature at: TBD \u003cbr /\u003e | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)? | [shaders](/reference/tools/gradle-api/4.2/com/android/build/api/dsl/BuildFeatures#shaders:kotlin.Boolean) Flag to enable Shader compilation. Setting the value to `null` resets to the default value. Default value is `true`. You can override the default for this for all projects in your build by adding the line `android.defaults.buildfeatures.shaders=true` in the gradle.properties file at the root project of your build. More information about this feature at: TBD \u003cbr /\u003e | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)? | [viewBinding](/reference/tools/gradle-api/4.2/com/android/build/api/dsl/BuildFeatures#viewBinding:kotlin.Boolean) Flag to enable View Binding. Setting the value to `null` resets to the default value. Default value is `false`. You can override the default for this for all projects in your build by adding the line `android.defaults.buildfeatures.viewbinding=true` in the gradle.properties file at the root project of your build. More information about this feature at: TBD \u003cbr /\u003e | ||\n\nProperties\n----------\n\n### androidResources\n\n```\nabstract var androidResources: Boolean?\n```\n\nFlag to disable Android resource processing.\n\nSetting the value to 'null' resets to the default value.\nDefault value is 'true'.\n\nYou can override the default for this for all projects in your build by adding the line\n`android.library.defaults.buildfeatures.androidresources=false`\nin the gradle.properties file at the root project of your build.\n\nMore information about this feature at: TBD \n\n### dataBinding\n\n```\nabstract var dataBinding: Boolean?\n```\n\nFlag to enable Data Binding.\n\nSetting the value to `null` resets to the default value.\nDefault value is `false`.\n\nYou can override the default for this for all projects in your build by adding the line\n`android.defaults.buildfeatures.databinding=true`\nin the `gradle.properties` file at the root project of your build.\n\nMore information about this feature at: TBD \n\n### mlModelBinding\n\n```\nabstract var mlModelBinding: Boolean?\n```\n\nFlag to enable Machine Learning Model Binding.\n\nSetting the value to `null` resets to the default value.\nDefault value is `false`.\n\nYou can override the default for this for all projects in your build by adding the line\n`android.defaults.buildfeatures.mlmodelbinding=true`\nin the `gradle.properties` file at the root project of your build.\n\nMore information about this feature at: TBD \n\n### prefabPublishing\n\n```\nabstract var prefabPublishing: Boolean?\n```\n\nFlag to enable generating Prefab packages for AARs.\n\nSetting the value to `null` resets to the default value.\nDefault value is `false`.\n\nYou can override the default for this for all projects in your build by adding the line\n`android.defaults.buildfeatures.prefabPublishing=true`\nin the `gradle.properties` file at the root project of your build.\n\nMore information about this feature at: TODO(http://b/156405121)"]]