@groovy.transform.CompileStatic @groovy.transform.EqualsAndHashCode(includes: [versionText]) class GrailsVersion extends java.lang.Object implements java.lang.Comparable<GrailsVersion>
A class to represent a version of Grails for comparison
Modifiers | Name | Description |
---|---|---|
private static GrailsVersion |
currentVersion |
The current version |
private int |
major |
The major version |
private int |
minor |
The minor version |
private int |
patch |
The patch version |
private Snapshot |
snapshot |
Information about the snapshot status |
private java.lang.String |
versionText |
The full version text |
Constructor and description |
---|
GrailsVersion
(java.lang.String version) |
Type Params | Return Type | Name and description |
---|---|---|
|
int |
compareTo(GrailsVersion o) |
|
static GrailsVersion |
getCurrent()
|
|
static boolean |
isAtLeast(java.lang.String requiredVersion) Check whether the current version is at least the given version |
|
static boolean |
isAtLeast(java.lang.String version, java.lang.String requiredVersion) Check whether the version is at least the given version |
|
private static boolean |
isAtLeastImpl(GrailsVersion version, java.lang.String requiredVersion) Check whether the version is at least the given version |
|
static boolean |
isAtLeastMajorMinor(int majorVersion, int minorVersion) Check whether the current version is at least the given major and minor version |
|
static boolean |
isAtLeastMajorMinor(java.lang.String version, int majorVersion, int minorVersion) Check whether the current version is at least the given major and minor version |
|
private static boolean |
isAtLeastMajorMinorImpl(GrailsVersion version, int majorVersion, int minorVersion) |
|
boolean |
isSnapshot() |
|
java.lang.String |
toString() |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
The current version
The major version
The minor version
The patch version
Information about the snapshot status
The full version text
The major version
The minor version
The patch version
Information about the snapshot status
The full version text
Check whether the current version is at least the given version
requiredVersion
- The required versionCheck whether the version is at least the given version
version
- The versionrequiredVersion
- The required versionCheck whether the version is at least the given version
version
- The versionrequiredVersion
- The required versionCheck whether the current version is at least the given major and minor version
majorVersion
- The major versionminorVersion
- The minor versionCheck whether the current version is at least the given major and minor version
majorVersion
- The major versionminorVersion
- The minor versionGroovy Documentation