# MutableVersionConstraint

interface MutableVersionConstraint : VersionConstraint(source)

A configurable version constraint. This is exposed to the build author, so that one can express more constraints on a module version.

#### Since

4.4

## Functions

getBranch
Link copied to clipboard
@Nullable
abstract fun getBranch(): @Nullable String
Returns the branch to select versions from.
getDisplayName
Link copied to clipboard
abstract fun getDisplayName(): String
Returns the display name of this object.
getPreferredVersion
Link copied to clipboard
abstract fun getPreferredVersion(): String
The preferred version of a module (which may be an exact version or a version range).
getRejectedVersions
Link copied to clipboard
abstract fun getRejectedVersions(): List<String>
Returns the list of versions that this module rejects (which may be exact versions, or ranges, anything that fits into a version string).
getRequiredVersion
Link copied to clipboard
abstract fun getRequiredVersion(): String
The required version of a module (which may be an exact version or a version range).
getStrictVersion
Link copied to clipboard
abstract fun getStrictVersion(): String
The strictly required version of a module (which may be an exact version or a version range).
prefer
Link copied to clipboard
abstract fun prefer(version: String)
Sets the preferred version of this module.
reject
Link copied to clipboard
abstract fun reject(versions: Array<String>)
Declares a list of rejected versions.
rejectAll
Link copied to clipboard
abstract fun rejectAll()
Rejects all versions of this component.
require
Link copied to clipboard
abstract fun require(version: String)
Sets the required version of this module.
setBranch
Link copied to clipboard
abstract fun setBranch(@Nullable branch: @Nullable String)
Specifies the branch to select versions from.
strictly
Link copied to clipboard
abstract fun strictly(version: String)
Sets the version as strict.