# LibraryBuildFeatures

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


```
interface LibraryBuildFeatures : BuildFeatures
```

<br />

*** ** * ** ***

A list of build features that can be disabled or enabled in an Android Library project.

## Summary

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/LibraryBuildFeatures#androidResources()` **This property is deprecated.** Use android.androidResources.enable = true/false instead to enable or disable android resource processing. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/LibraryBuildFeatures#dataBinding()` Flag to enable Data Binding. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/LibraryBuildFeatures#mlModelBinding()` Flag to enable Machine Learning Model Binding. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/LibraryBuildFeatures#prefabPublishing()` Flag to enable generating Prefab packages for AARs. |

### Inherited properties

From [com.android.build.api.dsl.BuildFeatures](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/BuildFeatures) `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/BuildFeatures#aidl()`

Flag to enable AIDL compilation.
`https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/BuildFeatures#buildConfig()`

Flag to enable/disable generation of the `BuildConfig` class.
`https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/BuildFeatures#compose()`

Flag to enable Compose feature.
`https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/BuildFeatures#prefab()`

Flag to enable/disable import of Prefab dependencies from AARs.
`https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/BuildFeatures#renderScript()`

**This property is deprecated.** This property and renderScript support will be removed in AGP 10.0
`https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/BuildFeatures#resValues()`

Flag to enable Resource Values generation.
`https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/BuildFeatures#shaders()`

Flag to enable Shader compilation.
`https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/BuildFeatures#viewBinding()`

Flag to enable View Binding.
From [org.gradle.api.plugins.ExtensionAware](https://docs.gradle.org/current/javadoc/org/gradle/api/plugins/ExtensionAware.html) `https://docs.gradle.org/current/javadoc/org/gradle/api/plugins/ExtensionContainer.html` `https://docs.gradle.org/current/javadoc/org/gradle/api/plugins/ExtensionAware.html#extensions`

## Public properties

### androidResources

Added in 4.2.0 Deprecated in 8.11.0

```
var androidResources: Boolean?
```

> [!CAUTION]
> **This property is deprecated.**   
> Use android.androidResources.enable = true/false instead to enable or disable android resource processing. This API will be removed in AGP 10.0

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.

Once set to 'false', flag disables `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/LibraryBuildFeatures#dataBinding()`, `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/BuildFeatures#viewBinding()`, `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/BuildFeatures#renderScript()`.

More information about this feature at: TBD

### dataBinding

Added in 4.2.0

```
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

Added in 4.2.0

```
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

Added in 4.2.0

```
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: https://developer.android.com/studio/build/native-dependencies