CapabilitiesResolution (Gradle API 9.1.0)
Description: declaration: package: org.gradle.api.artifacts, interface: CapabilitiesResolution

Package org.gradle.api.artifacts

# Interface CapabilitiesResolution

public interface CapabilitiesResolution
Allows configuring the capabilities resolution strategy. When there's a capability conflict, this object will let you select what to do in that situation. The configuration can either be global, for any capability by calling the `all(Action)` method, or it can be specific to a capability by calling one of the `withCapability(Object, Action)`, `withCapability(Capability, Action)` or `withCapability(String, String, Action)` methods.

Since:
  5.6

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `all(Action<? super CapabilityResolutionDetails> action)`
  Configures the resolution strategy of capability conflicts for all capabilities.
  `void`
  `withCapability(Object notation, Action<? super CapabilityResolutionDetails> action)`
  Configures the resolution strategy of a specific capability.
  `void`
  `withCapability(String group, String name, Action<? super CapabilityResolutionDetails> action)`
  Configures the resolution strategy of a specific capability.
  `void`
  `withCapability(Capability capability, Action<? super CapabilityResolutionDetails> action)`
  Configures the resolution strategy of a specific capability.

- ## Method Details

  - ### all

    void all(Action<? super CapabilityResolutionDetails> action)
    Configures the resolution strategy of capability conflicts for all capabilities.
    Parameters:
      `action` - the configuration action

  - ### withCapability

    void withCapability(Capability capability, Action<? super CapabilityResolutionDetails> action)
    Configures the resolution strategy of a specific capability. The capability version is irrelevant.
    Parameters:
      `capability` - a capability to configure
      `action` - the configuration action

  - ### withCapability

    void withCapability(String group, String name, Action<? super CapabilityResolutionDetails> action)
    Configures the resolution strategy of a specific capability.
    Parameters:
      `group` - the group of the capability to configure
      `name` - the name of the capability to configure
      `action` - the configuration action

  - ### withCapability

    void withCapability(Object notation, Action<? super CapabilityResolutionDetails> action)
    Configures the resolution strategy of a specific capability.
    Parameters:
      `notation` - the notation of the capability to configure, Providers of any notation are also accepted
      `action` - the configuration action