BuildFeatures

public interface BuildFeatures extends ExtensionAware

Known direct subclasses
ApplicationBuildFeatures

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

DynamicFeatureBuildFeatures

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

LibraryBuildFeatures

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

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

Flag to enable AIDL compilation.

abstract Boolean

Flag to enable/disable generation of the BuildConfig class.

abstract Boolean

Flag to enable Compose feature.

abstract Boolean

Flag to enable/disable import of Prefab dependencies from AARs.

abstract Boolean

Flag to enable RenderScript compilation.

abstract Boolean

Flag to enable Resource Values generation.

abstract Boolean

Flag to enable Shader compilation.

abstract Boolean

Flag to enable View Binding.

abstract void

Flag to enable AIDL compilation.

abstract void
setBuildConfig(Boolean buildConfig)

Flag to enable/disable generation of the BuildConfig class.

abstract void

Flag to enable Compose feature.

abstract void

Flag to enable/disable import of Prefab dependencies from AARs.

abstract void
setRenderScript(Boolean renderScript)

Flag to enable RenderScript compilation.

abstract void
setResValues(Boolean resValues)

Flag to enable Resource Values generation.

abstract void

Flag to enable Shader compilation.

abstract void
setViewBinding(Boolean viewBinding)

Flag to enable View Binding.

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