Package org.gradle.util
Class GradleVersion
java.lang.Object
org.gradle.util.GradleVersion
- All Implemented Interfaces:
- Comparable<GradleVersion>
Represents a Gradle version.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract intstatic GradleVersioncurrent()Returns the current Gradle version.abstract GradleVersionThe base version of this version.abstract StringDeprecated.will be removed in Gradle 9.abstract GradleVersionDeprecated.will be removed in Gradle 9.abstract StringDeprecated.will be removed in Gradle 9.abstract StringReturns the string that represents this version.abstract booleanReturnstrueif this instance represent a snapshot version (e.g.abstract booleanisValid()Deprecated.will be removed in Gradle 9.static GradleVersionParses the given string into a GradleVersion.
- 
Field Details- 
URLDeprecated.will be removed in Gradle 9.This field only kept here to maintain binary compatibility.- See Also:
 
- 
RESOURCE_NAMEDeprecated.will be removed in Gradle 9.This field only kept here to maintain binary compatibility.- See Also:
 
- 
VERSION_OVERRIDE_VARDeprecated.will be removed in Gradle 9.This field only kept here to maintain binary compatibility.- See Also:
 
- 
VERSION_NUMBER_PROPERTYDeprecated.will be removed in Gradle 9.This field only kept here to maintain binary compatibility.- See Also:
 
 
- 
- 
Constructor Details- 
GradleVersionpublic GradleVersion()
 
- 
- 
Method Details- 
currentReturns the current Gradle version.- Returns:
- The current Gradle version.
 
- 
versionParses the given string into a GradleVersion.- Throws:
- IllegalArgumentException- On unrecognized version string.
 
- 
getVersionReturns the string that represents this version.- Returns:
- this Gradle version in string format.
 
- 
getBuildTimeDeprecated.will be removed in Gradle 9.This method only kept here to maintain binary compatibility.
- 
getRevisionDeprecated.will be removed in Gradle 9.This method only kept here to maintain binary compatibility.
- 
isSnapshotpublic abstract boolean isSnapshot()Returnstrueif this instance represent a snapshot version (e.g. 7.0-20210406233629+0000).- Returns:
- Whether the current instance is a snapshot version
 
- 
getBaseVersionThe base version of this version. For pre-release versions, this is the target version. For example, the version base of '7.0-rc-1' is '7.0'.- Returns:
- The version base
 
- 
getNextMajorDeprecated.will be removed in Gradle 9.This method only kept here to maintain binary compatibility.
- 
isValidDeprecated.will be removed in Gradle 9.This method only kept here to maintain binary compatibility.
- 
compareTo- Specified by:
- compareToin interface- Comparable<GradleVersion>
 
 
-