-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Hi, thanks for this plugin.
I'm having a little bit trouble in understanding how to work with this plugin in a multi-module Gradle project.
First of all, as far as I understand, I need to include the plugin in my submodules, not the root project.
Example:
plugins {
id("io.wusa.semver-git-plugin").version("2.3.7")
}
semver {
tagPrefix = 'my-sub-module-'
snapshotSuffix = "SNAPSHOT" // (default) appended if the commit is without a release tag
dirtyMarker = "dirty" // (default) appended if the are uncommitted changes
initialVersion = "0.1.0" // (default) initial version in semantic versioning
branches { // list of branch configurations
branch {
regex = ".+" // regex for the branch you want to configure, put this one last
incrementer = "NO_VERSION_INCREMENTER" // (default) version incrementer
formatter = { "${semver.info.version.major}.${semver.info.version.minor}.${semver.info.version.patch}+build.${semver.info.count}.sha.${semver.info.shortCommit}" }
// (default) version formatting closure
}
}
}
-
Is this assumption correct, or should the plugin be in the root build.gradle, but the config in the application module's build.gradle?
-
My applications are in an extra submodule under
root:applications:my-application. Does this impact the prefix or is it decoupled from the location of the module? -
This cannot be used, if there are additional library modules in my application, that are not released
allprojects {
version = semver.info
}
Instead, I have to use project.version = semver.info in just those modules that I like to use semver for.
Is this assumption correct?
- How to use the incrementers, for example, the
PATCH_INCREMENTER?
For example, when I go from
git tag -a 1.0.0-alpha.1 -m "new alpha release of version 1.0.0"
to
git tag -a 1.0.1-alpha.1 -m "new alpha release of version 1.0.1"
what does the incremented do for me, if I have to tag and increment the version by myself?
- How would the CONVENTIONAL_COMMITS_INCREMENTER work within a multi module project and how should the commit messages look like, considering that we need to provide the application prefix somewhere, as well as the conventional commit prefix/tag?
Is it something like my-application:feat: New feature xyz implemented?
Thanks for your help in advance