@Incubating interface DependencyConstraint : ModuleVersionSelector, HasConfigurableAttributes<DependencyConstraint>
Represents a constraints over all, including transitive, dependencies.
Since
4.5
abstract fun attributes(configureAction: Action<in AttributeContainer>): DependencyConstraint
Mutates the attributes of this constraint. Attributes are used during dependency resolution to select the appropriate target variant, in particular when a single component provides different variants. |
|
abstract fun because(reason: String): Unit
Sets the reason why this dependency constraint should be used. |
|
abstract fun getAttributes(): AttributeContainer
Returns the attributes for this constraint. Mutation of the attributes of a constraint must be done through the |
|
abstract fun getReason(): String
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. |
|
abstract fun version(configureAction: Action<in MutableVersionConstraint>): Unit
Configures the version constraint for this dependency constraint. |
abstract fun getGroup(): String
The group of the module. |
|
abstract fun getModule(): ModuleIdentifier
The module identifier of the component. Returns the same information as |
|
abstract fun getName(): String
The name of the module. |
|
abstract fun getVersion(): String
The version of the module |
|
abstract fun getVersionConstraint(): VersionConstraint
Returns the version constraint to be used during selection. |
|
abstract fun matchesStrictly(identifier: ModuleVersionIdentifier): Boolean
To match strictly means that the given identifier needs to have equal group, module name and version. It does not smartly match dynamic versions, e.g. '1.+' selector does not strictly match '1.2' identifier. |