# BuildFeatures

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


```
interface BuildFeatures : ExtensionAware
```

<br />

Known direct subclasses [ApplicationBuildFeatures](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/ApplicationBuildFeatures), [DynamicFeatureBuildFeatures](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/DynamicFeatureBuildFeatures), [LibraryBuildFeatures](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/LibraryBuildFeatures), [TestBuildFeatures](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/TestBuildFeatures)

|---|---|
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/ApplicationBuildFeatures` | A list of build features that can be disabled or enabled in an Android Application project. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/DynamicFeatureBuildFeatures` | A list of build features that can be disabled or enabled in an Android Dynamic Feature project. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/LibraryBuildFeatures` | A list of build features that can be disabled or enabled in an Android Library project. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/TestBuildFeatures` | A list of build features that can be disabled or enabled in an Android Test project. |

*** ** * ** ***

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

This list applies to all plugin types.

## 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/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. |

### Inherited properties

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

### aidl

Added in 4.2.0

```
var aidl: Boolean?
```

Flag to enable AIDL compilation.

Setting the value to `null` resets to the default value. Default value is `false`.

See [AIDL](http://developer.android.com/r/tools/reference/dsl/buildfeatures/aidl).

### buildConfig

Added in 4.2.0

```
var buildConfig: Boolean?
```

Flag to enable/disable generation of the `BuildConfig` class.

Setting the value to `null` resets to the default value. Default value is `false`.

See [build config fields](http://developer.android.com/r/tools/build-config-fields).

### compose

Added in 4.2.0

```
var compose: Boolean?
```

Flag to enable Compose feature. Setting the value to `null` resets to the default value

Default value is `false`.

See [Compose](http://developer.android.com/compose).

### prefab

Added in 4.2.0

```
var prefab: 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.

See [Prefab](http://developer.android.com/r/tools/prefab).

### renderScript

Added in 4.2.0 Deprecated in 9.6.0-alpha03

```
var renderScript: Boolean?
```

> [!CAUTION]
> **This property is deprecated.**   
> This property and renderScript support will be removed in AGP 10.0

Flag to enable RenderScript compilation.

Setting the value to `null` resets to the default value. Default value is `false`.

### resValues

Added in 4.2.0

```
var resValues: Boolean?
```

Flag to enable Resource Values generation.

Setting the value to `null` resets to the default value. Default value is `false`. See [Resources](http://developer.android.com/r/tools/res-values).

### shaders

Added in 4.2.0

```
var shaders: Boolean?
```

Flag to enable Shader compilation.

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.shaders=true` in the gradle.properties file at the root project of your build.

See [Shader Compilers](https://developer.android.com/r/tools/shader-compilers)

### viewBinding

Added in 4.2.0

```
var viewBinding: 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.

See [View Binding Library](https://developer.android.com/viewbinding)