Describable
, VersionConstraint
@Incubating public interface MutableVersionConstraint extends VersionConstraint
Modifier and Type | Method | Description |
---|---|---|
String |
getBranch() |
Returns the branch to select versions from.
|
void |
prefer(String version) |
Sets the preferred version of this module.
|
void |
reject(String... versions) |
Declares a list of rejected versions.
|
void |
rejectAll() |
Rejects all versions of this component.
|
void |
require(String version) |
Sets the required version of this module.
|
void |
setBranch(String branch) |
Specifies the branch to select versions from.
|
void |
strictly(String version) |
Sets the version as strict.
|
getDisplayName
getPreferredVersion, getRejectedVersions, getRequiredVersion, getStrictVersion
@Nullable String getBranch()
null
, select only versions that were built from the given branch.getBranch
in interface VersionConstraint
void setBranch(@Nullable String branch)
branch
- The branch, possibly null.void require(String version)
Implies that the selected version cannot be lower than what require
accepts but could be higher through conflict resolution, even if higher has an exclusive higher bound.
This is what a direct version on a dependency translates to.
This term supports dynamic versions.
This will override a previous strictly
declaration.
version
- the required version of this modulevoid prefer(String version)
This is a very soft version declaration. It applies only if there is no stronger non dynamic opinion on a version for the module. This term does not support dynamic versions.
version
- the preferred version of this modulevoid strictly(String version)
Any version not matched by this version notation will be excluded. This is the strongest version declaration. It will cause dependency resolution to fail if no version acceptable by this clause can be selected. This term supports dynamic versions.
This will override a previous require
declaration.
version
- the strict version to be used for this modulevoid reject(String... versions)
versions
- the rejected versionsvoid rejectAll()