Git Sem Ver Extension
The plugin extension with the DSL.
Supports the following properties:
minimumVersion, defaulting to 0.1.0
developmentIdentifier, the identifier for the in-development versions
noTagIdentifier, the identifier for early versions of the project, when no tags are available yet
fullHash, whether to use the full commit hash as build metadata
maxVersionLength, cuts the version to the specified length. Useful for some destinations, e.g., the Gradle Plugin Portal, which limits version numbers to 20 chars.
developmentCounterLength, how many digits to use for the counter
enforceSemanticVersioning, whether the system should fail or just warn in case a non-SemVer compatible version gets produced
computeReleaseVersion, determines whether the version is to be calculated for the release or pre-release (default behavior)
preReleaseSeparator, how to separate the pre-release information. Changing this value may generate non-SemVer-compatible versions.
buildMetadataSeparator, how to separate the pre-release information. Some destinations (e.g., the Gradle Plugin Portal) do not support the default value '+'. A reasonable alternative is using '-', lifting the build metadata to a pre-release segment.
distanceCounterRadix, the radix for the commit counter. Defaults to base 36. Bases from 2 to 36 allowed.
versionPrefix, to be used in case tags are prefixed with some symbols before the semantic version (e.g., v1.0.0 is prefixed with "v").
includeLightweightTags, to be used in case lightweight tags should be considered.
forceVersionPropertyName, the name of the property that, if set, will force the plugin to use the specified version. By default, the property name is "forceVersion".
Constructors
Types
Properties
The version computed by the plugin, computed lazily. Avoid calling this property's toString() method during the configuration phase, as it will trigger the computation of the version, which should happen as late as possible.
Finds the closest tag compatible with Semantic Version, or returns null if none is available.
Functions
Sets the strategy to be used to compute the version increment based on the commit messages since the last tag. The default strategy is to increment the patch version.
Computes a valid Semantic Versioning 2.0 version based on the status of the current git repository.
If called, the system will also consider non-annotated tags.