@Incubating interface MutableVersionConstraint : VersionConstraint
A configurable version constraint. This is exposed to the build author, so that one can express more constraints on a version,
Since
4.4
abstract fun getBranch(): String
Returns the branch to select versions from. When not |
|
abstract fun prefer(version: String): Unit
Sets the preferred version of this module. Any other rejection/strict constraint will be overriden. |
|
abstract fun reject(vararg versions: String): Unit
Declares a list of rejected versions. If such a version is found during dependency resolution, it will not be selected. |
|
abstract fun rejectAll(): Unit
Rejects all versions of this component. Can be used to declare that a component is incompatible with another (typically, cannot have both a 2 different implementations of the same API). |
|
abstract fun setBranch(branch: String): Unit
Specifies the branch to select versions from. |
|
abstract fun strictly(version: String): Unit
Sets the version as strict, meaning that if any other dependency version for this module disagrees with this version, resolution will fail. |
abstract fun getPreferredVersion(): String
The preferred version of a module. The preferred version of a module can typically be upgraded during dependency resolution, unless further constraints are added. |
|
abstract fun getRejectedVersions(): MutableList<String>
Returns the list of versions that this module rejects (which may be exact versions, or ranges, anything that fits into a version string). |