Releases: qoomon/gradle-git-versioning-plugin
Releases · qoomon/gradle-git-versioning-plugin
5.1.1
5.1.0
5.0.0
Features
-
Add GitHub Actions, GitLab CI and Jenkins environment variable support
- GitHub Actions: if
$GITHUB_ACTIONS == true
,GITHUB_REF
is considered - GitLab CI: if
$GITLAB_CI == true
,CI_COMMIT_BRANCH
andCI_COMMIT_TAG
are considered - Circle CI: if
$CIRCLECI == true
,CIRCLE_BRANCH
andCIRCLE_TAG
are considered - Jenkins: if
JENKINS_HOME
is set,BRANCH_NAME
andTAG_NAME
are considered
- GitHub Actions: if
-
Simplify configuration (also see BREAKING CHANGES)
Groovy DSL Example:
build.gradle
version = '0.0.0-SNAPSHOT' gitVersioning.apply { refs { branch('.+') { version = '${ref}-SNAPSHOT' } tag('v(?<version>.*)') { version = '${ref.version}' } } // optional fallback configuration in case of no matching ref configuration rev { version = '${commit}' } }
Kotlin DSL Example:
build.gradle.kts
version = "0.0.0-SNAPSHOT" gitVersioning.apply { refs { branch(".+") { version = "\${ref}-SNAPSHOT" } tag('v(?<version>.*)') { version = "\${ref.version}" } } // optional fallback configuration in case of no matching ref configuration rev { version = "\${commit}" } }
-
New option to consider tag configs on branches (attached HEAD), enabled by
refs { considerTagsOnBranches = true }
- If enabled, first matching branch or tag config will be used for versioning
BREAKING CHANGES
- There is no default config anymore, if no
ref
configuration is matching current git situation and norev
configuration has been
defined a warning message will be logged and plugin execution will be skipped. - Placeholder Changes (old -> new)
${branch}
->${ref}
${tag}
->${ref}
${REF_PATTERN_GROUP}
->${ref.REF_PATTERN_GROUP}
${describe.TAG_PATTERN_GROUP}
->${describe.tag.TAG_PATTERN_GROUP}
preferTags
option was removed- use
refs { considerTagsOnBranches = true }
instead
- use
4.3.0
-
Features
- add git describe version placeholders
- new placeholders
${describe}
${describe.tag}
${describe.<TAG_PATTERN_GROUP_NAME or TAG_PATTERN_GROUP_INDEX>}
e.g. patternv(?<version>.*)
will create placeholder${describe.version}
${describe.distance}
- new placeholders
- add git describe version placeholders
-
BREAKING CHANGES
- no longer provide project property
git.dirty
due to performance issues on larger projects,
version format placeholder${dirty}
is still available
- no longer provide project property
4.2.1
4.2.0
4.1.0
- Features
- add ability to define default or overwrite values for version and property format.
- default value if parameter value is not set
${paramter:-<DEFAULT_VALUE>}
e.g.${buildNumber:-0}
- overwrite value if parameter has a value
${paramter:+<OVERWRITE_VALUE>}
e.g.${dirty:+-SNAPSHOT}
- default value if parameter value is not set
- add ability to define default or overwrite values for version and property format.
Easy config
3.0.0
Features
- simplify
property
replacement configuration
Breaking Changes
-
simplify
property
replacement configurationnew config
gitVersioning.apply { branch { pattern = 'master' versionFormat = '${version}' property { pattern = 'revision' valueFormat = '${branch-SNAPSHOT}' } } }
old config
gitVersioning.apply { branch { pattern = 'master' versionFormat = '${version}' property { pattern ='revision' value { format = '${branch-SNAPSHOT}' } } } }
Fix VERSIONING_GIT_TAG Environment Variable Behaviour
v1.2.3 fix: VERSIONING_GIT_TAG will simulate no branch
Update Git Versioning Lib
v1.2.2 feat: inherit version from parent project if not set