@Incubating public interface DependencyConstraint extends ModuleVersionSelector, HasConfigurableAttributes<DependencyConstraint>
Modifier and Type | Method and Description |
---|---|
DependencyConstraint |
attributes(Action<? super AttributeContainer> configureAction)
Mutates the attributes of this constraint.
|
void |
because(String reason)
Sets the reason why this dependency constraint should be used.
|
AttributeContainer |
getAttributes()
Returns the attributes for this constraint.
|
String |
getReason()
Returns a reason why this dependency constraint should be used, in particular with regards to its version.
|
VersionConstraint |
getVersionConstraint()
Returns the version constraint to be used during selection.
|
void |
version(Action<? super MutableVersionConstraint> configureAction)
Configures the version constraint for this dependency constraint.
|
getGroup, getModule, getName, getVersion, matchesStrictly
void version(Action<? super MutableVersionConstraint> configureAction)
configureAction
- the configuration action for the module version@Nullable String getReason()
void because(@Nullable String reason)
@Incubating AttributeContainer getAttributes()
attributes(Action)
method.getAttributes
in interface HasAttributes
@Incubating DependencyConstraint attributes(Action<? super AttributeContainer> configureAction)
attributes
in interface HasConfigurableAttributes<DependencyConstraint>
configureAction
- the attributes mutation actionVersionConstraint getVersionConstraint()