LibraryBuildFeatures

public interface LibraryBuildFeatures extends BuildFeatures


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

Summary

Public methods

abstract Boolean

Flag to disable Android resource processing.

abstract Boolean

Flag to enable Data Binding.

abstract Boolean

Flag to enable Machine Learning Model Binding.

abstract Boolean

Flag to enable generating Prefab packages for AARs.

abstract void
setAndroidResources(Boolean androidResources)

Flag to disable Android resource processing.

abstract void
setDataBinding(Boolean dataBinding)

Flag to enable Data Binding.

abstract void
setMlModelBinding(Boolean mlModelBinding)

Flag to enable Machine Learning Model Binding.

abstract void
setPrefabPublishing(Boolean prefabPublishing)

Flag to enable generating Prefab packages for AARs.

Inherited methods

From com.android.build.api.dsl.BuildFeatures
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.

From org.gradle.api.plugins.ExtensionAware

Public methods

getAndroidResources

abstract Boolean getAndroidResources()

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 com.android.build.api.dsl.LibraryBuildFeatures.dataBinding, com.android.build.api.dsl.BuildFeatures.viewBinding, com.android.build.api.dsl.BuildFeatures.renderScript.

More information about this feature at: TBD

getDataBinding

abstract Boolean getDataBinding()

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

getMlModelBinding

abstract Boolean getMlModelBinding()

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

getPrefabPublishing

abstract Boolean getPrefabPublishing()

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

setAndroidResources

abstract void setAndroidResources(Boolean androidResources)

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 com.android.build.api.dsl.LibraryBuildFeatures.dataBinding, com.android.build.api.dsl.BuildFeatures.viewBinding, com.android.build.api.dsl.BuildFeatures.renderScript.

More information about this feature at: TBD

setDataBinding

abstract void setDataBinding(Boolean dataBinding)

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

setMlModelBinding

abstract void setMlModelBinding(Boolean mlModelBinding)

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

setPrefabPublishing

abstract void setPrefabPublishing(Boolean prefabPublishing)

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