# BuildFeatures

# BuildFeatures


```
public interface BuildFeatures extends ExtensionAware
```

<br />

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

|--------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------|
| [ApplicationBuildFeatures](https://developer.android.com/reference/tools/gradle-api/8.3/null/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/8.3/null/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/8.3/null/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/8.3/null/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 methods                                             |
|-----------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `abstract `[Boolean](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Boolean.html) | [getAidl](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildFeatures#getAidl())`()` Flag to enable AIDL compilation.                                                                                                                                                                      |
| `abstract `[Boolean](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Boolean.html) | [getBuildConfig](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildFeatures#getBuildConfig())`()` Flag to enable/disable generation of the `BuildConfig` class.                                                                                                                           |
| `abstract `[Boolean](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Boolean.html) | [getCompose](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildFeatures#getCompose())`()` Flag to enable Compose feature.                                                                                                                                                                 |
| `abstract `[Boolean](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Boolean.html) | [getPrefab](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildFeatures#getPrefab())`()` Flag to enable/disable import of Prefab dependencies from AARs.                                                                                                                                   |
| `abstract `[Boolean](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Boolean.html) | [getRenderScript](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildFeatures#getRenderScript())`()` Flag to enable RenderScript compilation.                                                                                                                                              |
| `abstract `[Boolean](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Boolean.html) | [getResValues](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildFeatures#getResValues())`()` Flag to enable Resource Values generation.                                                                                                                                                  |
| `abstract `[Boolean](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Boolean.html) | [getShaders](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildFeatures#getShaders())`()` Flag to enable Shader compilation.                                                                                                                                                              |
| `abstract `[Boolean](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Boolean.html) | [getViewBinding](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildFeatures#getViewBinding())`()` Flag to enable View Binding.                                                                                                                                                            |
| `abstract void`                                                                                           | [setAidl](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildFeatures#setAidl(kotlin.Boolean))`(`[Boolean](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Boolean.html)` aidl)` Flag to enable AIDL compilation.                                                   |
| `abstract void`                                                                                           | [setBuildConfig](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildFeatures#setBuildConfig(kotlin.Boolean))`(`[Boolean](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Boolean.html)` buildConfig)` Flag to enable/disable generation of the `BuildConfig` class. |
| `abstract void`                                                                                           | [setCompose](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildFeatures#setCompose(kotlin.Boolean))`(`[Boolean](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Boolean.html)` compose)` Flag to enable Compose feature.                                           |
| `abstract void`                                                                                           | [setPrefab](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildFeatures#setPrefab(kotlin.Boolean))`(`[Boolean](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Boolean.html)` prefab)` Flag to enable/disable import of Prefab dependencies from AARs.              |
| `abstract void`                                                                                           | [setRenderScript](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildFeatures#setRenderScript(kotlin.Boolean))`(`[Boolean](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Boolean.html)` renderScript)` Flag to enable RenderScript compilation.                   |
| `abstract void`                                                                                           | [setResValues](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildFeatures#setResValues(kotlin.Boolean))`(`[Boolean](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Boolean.html)` resValues)` Flag to enable Resource Values generation.                          |
| `abstract void`                                                                                           | [setShaders](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildFeatures#setShaders(kotlin.Boolean))`(`[Boolean](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Boolean.html)` shaders)` Flag to enable Shader compilation.                                        |
| `abstract void`                                                                                           | [setViewBinding](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildFeatures#setViewBinding(kotlin.Boolean))`(`[Boolean](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Boolean.html)` viewBinding)` Flag to enable View Binding.                                  |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ### Inherited methods                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From [org.gradle.api.plugins.ExtensionAware](https://docs.gradle.org/current/javadoc/org/gradle/api/plugins/ExtensionAware.html) |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `abstract @`[NonNull](https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull)` `[ExtensionContainer](https://docs.gradle.org/current/javadoc/org/gradle/api/plugins/ExtensionContainer.html) | `@`[Internal](https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/Internal.html) [getExtensions](https://docs.gradle.org/current/javadoc/org/gradle/api/plugins/ExtensionAware.html#getExtensions--)`()` | |

## Public methods

### getAidl

```
abstract Boolean getAidl()
```

Flag to enable AIDL compilation.

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

More information about this feature at: TBD  

### getBuildConfig

```
abstract Boolean getBuildConfig()
```

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

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

More information about this feature at: TBD  

### getCompose

```
abstract Boolean getCompose()
```

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  

### getPrefab

```
abstract Boolean getPrefab()
```

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  

### getRenderScript

```
abstract Boolean getRenderScript()
```

Flag to enable RenderScript compilation.

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

More information about this feature at: TBD  

### getResValues

```
abstract Boolean getResValues()
```

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  

### getShaders

```
abstract Boolean getShaders()
```

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  

### getViewBinding

```
abstract Boolean getViewBinding()
```

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  

### setAidl

```
abstract void setAidl(Boolean aidl)
```

Flag to enable AIDL compilation.

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

More information about this feature at: TBD  

### setBuildConfig

```
abstract void setBuildConfig(Boolean buildConfig)
```

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

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

More information about this feature at: TBD  

### setCompose

```
abstract void setCompose(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  

### setPrefab

```
abstract void setPrefab(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  

### setRenderScript

```
abstract void setRenderScript(Boolean renderScript)
```

Flag to enable RenderScript compilation.

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

More information about this feature at: TBD  

### setResValues

```
abstract void setResValues(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  

### setShaders

```
abstract void setShaders(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  

### setViewBinding

```
abstract void setViewBinding(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