org.gradle.api.artifacts

## Interface DependencyConstraint

- All Superinterfaces:
    ModuleVersionSelector

      @Incubating
      public interface DependencyConstraint
      extends ModuleVersionSelector

  Represents a constraints over all, including transitive, dependencies.
  Since:
    4.5

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `because(String reason)` Sets the reason why this dependency constraint should be used.
    `String` | `getReason()` Returns a reason why this dependency constraint should be used, in particular with regards to its version.
    `void` | `version(Action<? super MutableVersionConstraint> configureAction)` Configures the version constraint for this dependency constraint.

    - ### Methods inherited from interface org.gradle.api.artifacts.ModuleVersionSelector

      `getGroup, getName, getVersion, getVersionConstraint, matchesStrictly`

- - ### Method Detail

    - #### version

          void version(Action<? super MutableVersionConstraint> configureAction)

      Configures the version constraint for this dependency constraint.
      Parameters:
        `configureAction` - the configuration action for the module version

    - #### getReason

          @Nullable
          String getReason()

      Returns a reason why this dependency constraint should be used, in particular with regards to its version. The dependency report will use it to explain why a specific dependency was selected, or why a specific dependency version was used.
      Returns:
        a reason to use this dependency constraint
      Since:
        4.6

    - #### because

          void because(String reason)

      Sets the reason why this dependency constraint should be used.
      Since:
        4.6