# BuildFeatures

# BuildFeatures


```
interface BuildFeatures
```

<br />

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

|---------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------|
| [ApplicationBuildFeatures](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/ApplicationBuildFeatures)       | A list of build features that can be disabled or enabled in an Android Application project.     |
| [DynamicFeatureBuildFeatures](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/DynamicFeatureBuildFeatures) | A list of build features that can be disabled or enabled in an Android Dynamic Feature project. |
| [LibraryBuildFeatures](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/LibraryBuildFeatures)               | A list of build features that can be disabled or enabled in an Android Library project.         |
| [TestBuildFeatures](https://developer.android.com/reference/tools/gradle-api/7.2/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                                                                                                                                  ||
|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`?` | [aidl](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/BuildFeatures#aidl()) Flag to enable AIDL compilation.                                            |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`?` | [buildConfig](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/BuildFeatures#buildConfig()) Flag to enable/disable generation of the `BuildConfig` class. |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`?` | [compose](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/BuildFeatures#compose()) Flag to enable Compose feature.                                       |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`?` | [prefab](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/BuildFeatures#prefab()) Flag to enable/disable import of Prefab dependencies from AARs.         |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`?` | [renderScript](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/BuildFeatures#renderScript()) Flag to enable RenderScript compilation.                    |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`?` | [resValues](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/BuildFeatures#resValues()) Flag to enable Resource Values generation.                        |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`?` | [shaders](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/BuildFeatures#shaders()) Flag to enable Shader compilation.                                    |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`?` | [viewBinding](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/BuildFeatures#viewBinding()) Flag to enable View Binding.                                  |

|                                                                                                                                                                                                                                                                                         ### Inherited functions                                                                                                                                                                                                                                                                                          ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| From class [ExtensionAware](https://docs.gradle.org/current/javadoc/org/gradle/api/plugins/ExtensionAware.html) |--------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------| | [ExtensionContainer](https://docs.gradle.org/current/javadoc/org/gradle/api/plugins/ExtensionContainer.html) | [getExtensions](https://docs.gradle.org/current/javadoc/org/gradle/api/plugins/ExtensionAware.html#getExtensions--)`()` | |

## Public properties

### aidl

```
val aidl: 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  

### buildConfig

```
val buildConfig: 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  

### compose

```
val compose: 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  

### prefab

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

More information about this feature at: TBD  

### renderScript

```
val renderScript: 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  

### resValues

```
val resValues: 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  

### shaders

```
val shaders: 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  

### viewBinding

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

More information about this feature at: TBD