Gradle plugin for setting version

I’ve found this nice plugin:

Basically add gradle tasks that create git tag on release, and automagically increase version number (which is therefore not hardcoded but obtained from the repo). It might be interesting for jme, the sdk and other libraries.

The idea is very cool, still have to figure out how to make it work with branches though.

Take a deep look here, some of those are really gold as well:


I tried few of them (including axion).
At this end I used this 2 lines:

project.version = "git describe --always --dirty".execute().text.trim()
println("version : '${project.version}'")

and to tag:

git tag -a 0.x -m "my release"
1 Like

Cool but with localmaven this create a new version for each commit… I’d like snapshot builds to overwrite themselves.

I don’t publish in localMaven every commit, and sometime I publish in localMaven uncommited lib (xxx-dirty)
It allow me to know with what exact version of the lib I compile (impossible with xxx-SNAPSHOT).