Interface DependencyConstraint

All Superinterfaces:
ModuleVersionSelector

@Incubating public interface DependencyConstraint extends ModuleVersionSelector
Represents a constraints over all, including transitive, dependencies.
Since:
4.5
  • Method Details

    • 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