gradle
8.5

# BuildFeature

@Incubating
interface BuildFeature(source)

Status of a feature in a build that affects Gradle behavior, and may impose additional requirements on plugins or build scripts.

It is possible to check if the feature is active in the current build. The requested property shows whether the user opted in or opted out from the feature.

An instance of this type can be injected into a task, plugin or other object by annotating a public constructor or property getter method with `javax.inject.Inject`.

#### See also

BuildFeatures

## Functions

getActive
Link copied to clipboard
abstract fun getActive(): Provider<Boolean>
Whether the feature is active in the build.
getRequested
Link copied to clipboard
abstract fun getRequested(): Provider<Boolean>
Whether the feature was requested for the build.