Groovy Documentation

org.ajoberstar.gradle.git.semver
[Groovy] Class NearestVersion

java.lang.Object
  org.ajoberstar.gradle.git.semver.NearestVersion

@Canonical
class NearestVersion

Nearest version tags reachable from the current HEAD. The version 0.0.0 will be returned for any

Since:
0.8.0


Property Summary
Version any

The nearest version that is tagged.

int distanceFromAny

The number of commits since any reachable from HEAD.

int distanceFromNormal

The number of commits since normal reachable from HEAD.

Version normal

The nearest normal (i.e. non-prerelease) version that is tagged.

 
Method Summary
java.lang.String getStage()

The pre-release stage of the any version.

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), 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()
 

Property Detail

any

final Version any
The nearest version that is tagged.


distanceFromAny

final int distanceFromAny
The number of commits since any reachable from HEAD.


distanceFromNormal

final int distanceFromNormal
The number of commits since normal reachable from HEAD.


normal

final Version normal
The nearest normal (i.e. non-prerelease) version that is tagged.


 
Method Detail

getStage

java.lang.String getStage()
The pre-release stage of the any version.
Returns:
the value to the left of the first dot (if any) in the any version's preRelease segment


 

Groovy Documentation