# DependencyConstraint

interface DependencyConstraint : ModuleVersionSelector, HasConfigurableAttributes<DependencyConstraint> (source)

Represents a constraints over all, including transitive, dependencies.

#### Since

4.5

## Functions

attributes
Link copied to clipboard
abstract fun attributes(configureAction: Action<in AttributeContainer>): DependencyConstraint
Mutates the attributes of this constraint.
because
Link copied to clipboard
abstract fun because(@Nullable reason: @Nullable String)
Sets the reason why this dependency constraint should be used.
getAttributes
Link copied to clipboard
abstract fun getAttributes(): AttributeContainer
Returns the attributes for this constraint.
getGroup
Link copied to clipboard
abstract fun getGroup(): String
The group of the module.
getModule
Link copied to clipboard
abstract fun getModule(): ModuleIdentifier
The module identifier of the component.
getName
Link copied to clipboard
abstract fun getName(): String
The name of the module.
getReason
Link copied to clipboard
@Nullable
abstract fun getReason(): @Nullable String
Returns a reason why this dependency constraint should be used, in particular with regards to its version.
getVersion
Link copied to clipboard
@Nullable
abstract fun getVersion(): @Nullable String
The version of the module.
getVersionConstraint
Link copied to clipboard
abstract fun getVersionConstraint(): VersionConstraint
Returns the version constraint to be used during selection.
matchesStrictly
Link copied to clipboard
abstract fun matchesStrictly(identifier: ModuleVersionIdentifier): Boolean
To match strictly means that the given identifier needs to have equal group, module name and version.
version
Link copied to clipboard
abstract fun version(configureAction: Action<in MutableVersionConstraint>)
Configures the version constraint for this dependency constraint.