See doc at https://ajoberstar.org/grgit/grgit-describe.html
- First time
./gradlew getVersion
> Task :getVersion
SNAPSHOT VERSION 0.0.0.7526fa4
- We add a tag
git tag 1.0.0
./gradlew getVersion
> Task :getVersion
RELEASED VERSION 1.0.0
- We add another commit
git commit --allow-empty -m "Another commit"
./gradlew getVersion
> Task :getVersion
SNAPSHOT VERSION 1.0.0.99cb359
- We add another tag
git tag 1.0.1
./gradlew getVersion
> Task :getVersion
RELEASED VERSION 1.0.1