public class Version
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static Version |
fromGitProperties(java.util.function.UnaryOperator<java.lang.String> propertyFetcher)
Provides a version object corresponding to some supplied git
build properties.
|
static Version |
fromMercurialProperties(java.util.function.UnaryOperator<java.lang.String> propertyFetcher)
Provides a version object corresponding to some supplied Mercurial
build properties.
|
java.lang.String |
getDateString() |
java.lang.String |
getVersionString() |
java.lang.String |
getYearRange() |
public static Version fromMercurialProperties(java.util.function.UnaryOperator<java.lang.String> propertyFetcher)
build.hg.revid
(revision ID),
build.hg.date
(date of revision), build.hg.tag
(version tag of revision, if any), and build.date
(date of build).propertyFetcher
- a function which returns property values
for supplied property namespublic static Version fromGitProperties(java.util.function.UnaryOperator<java.lang.String> propertyFetcher)
build.git.hash
(revision ID), build.git.committerdate
(committer date of revision), build.git.tag
(version tag of
revision, if any), and build.date
(date of build).propertyFetcher
- a function which returns property values
for supplied property namespublic java.lang.String getVersionString()
public java.lang.String getDateString()
public java.lang.String getYearRange()