| Type | Name and description |
|---|---|
java.util.List<java.lang.String> |
branchEnvFetch the branch from environment variable if available. |
groovy.lang.Closure<java.lang.String> |
dirtyDirty mode. |
boolean |
dirtyFailOnReleasesIf set to true, the build will fail if working copy is dirty and if the branch type is
part of the releases list ("release" only by default). |
java.lang.String |
dirtySuffixDefault dirty suffix |
java.lang.Object |
displayModeDisplay mode |
groovy.lang.Closure<java.lang.String> |
fullComputes the full version. |
java.lang.String |
gitRepoRootDirAllow setting the root git repo directory for non conventional git/gradle setups. |
java.lang.String |
lastTagPatternPattern used to match when looking for the last tag. |
boolean |
noWarningOnDirtyIf set to true, no warning will be printed in case the workspace is dirty. |
java.lang.String |
passwordCredentials (for SVN only) |
java.lang.Object |
releaseBuildTrue if it's release build. |
java.lang.Object |
releaseModeRelease mode |
groovy.lang.Closure<ReleaseInfo> |
releaseParserGetting the version type from a branch. |
java.util.Set<java.lang.String> |
releasesSet of eligible branch types for computing a display version from the branch base name |
java.lang.String |
scmVersion SCM - git by default |
java.lang.String |
snapshotDefault Snapshot extension |
boolean |
trustServerCertCertificate - accept SSL server certificates from unknown certificate authorities (for SVN only) |
java.lang.String |
userCredentials (for SVN only) |
| Constructor and description |
|---|
VersioningExtension
(org.gradle.api.Project project)Constructor |
| Type | Name and description |
|---|---|
VersionInfo |
computeInfo()Computes the version information. |
VersionInfo |
getInfo()Gets the computed version information |
static java.lang.String |
normalise(java.lang.String value) |
| Methods inherited from class | Name |
|---|---|
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() |
Fetch the branch from environment variable if available. By default, the environment is not taken into account, in order to be backward compatible with existing build systems.
Dirty mode. Closure that takes a version (display or full) and processes it to produce a dirty indicator. By default, it appends the dirtySuffix value to the version.
If set to true, the build will fail if working copy is dirty and if the branch type is
part of the releases list ("release" only by default).
Default dirty suffix
Display mode
Computes the full version.
Allow setting the root git repo directory for non conventional git/gradle setups. This is the path to the root directory that contains the .git folder. This is used to validate if the current project is a git repository.
Pattern used to match when looking for the last tag. By default, checks for any tag having a last part being numeric. At least one numeric grouping expression is required. The first one will be used to reverse order the tags in Git.
If set to true, no warning will be printed in case the workspace is dirty.
Credentials (for SVN only)
True if it's release build. Default is true, and branch should be in releases-set.
Release mode
Getting the version type from a branch. Default: getting the part before the first "/" (or a second optional 'separator' parameter). If no slash is found, takes the branch name as whole. For example: * release/2.0 --> release * feature/2.0 --> feature * master --> master
Set of eligible branch types for computing a display version from the branch base name
Version SCM - git by default
Default Snapshot extension
Certificate - accept SSL server certificates from unknown certificate authorities (for SVN only)
Credentials (for SVN only)
Constructor
project - Linked projectComputes the version information.
Gets the computed version information
Groovy Documentation