# requireFeature

@Incubating
abstract fun requireFeature(featureName: String)(source)

Require a capability of a component based on the name of the feature provided by the component.

A capability is derived from a feature based on the module identity of the component that a dependency resolves to. For example, variant of a component with module identity 'group:name:version' that provides a feature named 'test-fixtures' would have a capability 'group:name-test-fixtures:version'.

#### Since

8.11

#### Parameters

featureName

The name of the feature to require

@Incubating
abstract fun requireFeature(featureName: Provider<String>)(source)

Lazily require a capability of a component based on the name of the feature provided by the component.

#### Since

8.11

#### Parameters

featureName

The name of the feature to require

#### See also

requireFeature(String)