Project extension holding the individual components of a semantic version number. See .
| Constructor and description |
|---|
SemanticVersionExtension
(Project pProject) |
| Type | Name and description |
|---|---|
SemanticVersionExtension |
applyLongVersionToProject()Set the project's version property to this instance's long version string. |
SemanticVersionExtension |
applyShortVersionToProject()Set the project's version property to this instance's short version string. |
SemanticVersionExtension |
from(java.lang.Object pJsonFile)Load the semantic version values from a JSON file. |
java.lang.String |
getLongVersionString()Get the all parts of this semantic version number as a string. |
java.lang.String |
getShortVersionString()Get the main part of this semantic version number as a string. |
| Methods inherited from class | Name |
|---|---|
class ProjectAware |
getProject |
Zero or more build meta data strings. Null means no build meta data.
The major component of this semantic version number.
The minor component of this semantic version number.
The patch component of this semantic version number.
Zero or more pre-release identifiers. Null means no pre-release identifiers.
Set the project's version property to this instance's long version string.
Set the project's version property to this instance's short version string.
Load the semantic version values from a JSON file.
pJsonFile - A specification of the file to load the values from.Get the all parts of this semantic version number as a string. The main part is always present, and it is optionally followed by the pre-release labels and/or build meta data. The pre-release labels are preceded with a dash ('-') if they exist, and multiple labels are separated with dots ('.'). The build meta data are preceded with a plus ('+') if they exist, and meta data are separated with dots ('.').
Examples: "2.1.4-alpha.2", "3.5-rc.1+512", "1.0.9+20150106T174539"
Get the main part of this semantic version number as a string. The main part is the major, minor, and patch numbers, where the patch number is omitted if it has the value 0.
Examples: "2.1.4", "3.5", "0.0.1", "1.0"
Groovy Documentation