You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tags including the branch name, e.g. release-main-1.2.3 or release-other-3.4.5 and I configured the plugin as below:
scmVersion {
tag {
prefix.set("release-${scmPosition.branch}-")
}
}
Unfortunately, the result of gradle currentVersion always results in Project version: 0.1.0-SNAPSHOT.
I finally found that accessing anything from the cached versionProvider (in this case scmPosition) in the configuration breaks the version calculation. The solution was to use the uncached provider:
I have tags including the branch name, e.g.
release-main-1.2.3
orrelease-other-3.4.5
and I configured the plugin as below:Unfortunately, the result of
gradle currentVersion
always results inProject version: 0.1.0-SNAPSHOT
.I finally found that accessing anything from the cached
versionProvider
(in this casescmPosition
) in the configuration breaks the version calculation. The solution was to use the uncached provider:And this gives the correct
currentVersion
:Project version: 1.2.3
The problem is that this feature is not documented nor I could find any info about the issue with using the cached provider. Am I missing something?
I know about
branchPrefix
property but it feels too limiting.The text was updated successfully, but these errors were encountered: