# withCapability

abstract fun withCapability(capability: Capability, action: Action<in CapabilityResolutionDetails>)(source)

Configures the resolution strategy of a specific capability. The capability version is irrelevant.

#### Since

5.6

#### Parameters

capability

a capability to configure

action

the configuration action

abstract fun withCapability(group: String, name: String, action: Action<in CapabilityResolutionDetails>)(source)

Configures the resolution strategy of a specific capability.

#### Since

5.6

#### Parameters

group

the group of the capability to configure

name

the name of the capability to configure

action

the configuration action

abstract fun withCapability(notation: Any, action: Action<in CapabilityResolutionDetails>)(source)

Configures the resolution strategy of a specific capability.

#### Since

5.6

#### Parameters

notation

the notation of the capability to configure, Providers of any notation are also accepted

action

the configuration action