Comparable<GradleVersion>
public abstract class GradleVersion extends Object implements Comparable<GradleVersion>
Modifier and Type | Field | Description |
---|---|---|
static String |
RESOURCE_NAME |
Deprecated.
will be removed in Gradle 8.
|
static String |
URL |
Deprecated.
will be removed in Gradle 8.
|
static String |
VERSION_NUMBER_PROPERTY |
Deprecated.
will be removed in Gradle 8.
|
static String |
VERSION_OVERRIDE_VAR |
Deprecated.
will be removed in Gradle 8.
|
Constructor | Description |
---|---|
GradleVersion() |
Modifier and Type | Method | Description |
---|---|---|
abstract int |
compareTo(GradleVersion o) |
|
static GradleVersion |
current() |
Returns the current Gradle version.
|
abstract GradleVersion |
getBaseVersion() |
The base version of this version.
|
abstract String |
getBuildTime() |
Deprecated.
will be removed in Gradle 8.
|
abstract GradleVersion |
getNextMajor() |
Deprecated.
will be removed in Gradle 8.
|
abstract String |
getRevision() |
Deprecated.
will be removed in Gradle 8.
|
abstract String |
getVersion() |
Returns the string that represents this version.
|
abstract boolean |
isSnapshot() |
Returns
true if this instance represent a snapshot version (e.g. |
abstract boolean |
isValid() |
Deprecated.
will be removed in Gradle 8.
|
static GradleVersion |
version(String version) |
Parses the given string into a GradleVersion.
|
@Deprecated public static final String URL
@Deprecated public static final String RESOURCE_NAME
@Deprecated public static final String VERSION_OVERRIDE_VAR
@Deprecated public static final String VERSION_NUMBER_PROPERTY
public static GradleVersion current()
public static GradleVersion version(String version) throws IllegalArgumentException
IllegalArgumentException
- On unrecognized version string.public abstract String getVersion()
@Deprecated public abstract String getBuildTime()
@Deprecated public abstract String getRevision()
public abstract boolean isSnapshot()
true
if this instance represent a snapshot version (e.g. 7.0-20210406233629+0000).public abstract GradleVersion getBaseVersion()
@Deprecated public abstract GradleVersion getNextMajor()
@Deprecated public abstract boolean isValid()
public abstract int compareTo(GradleVersion o)
compareTo
in interface Comparable<GradleVersion>