pondělí 19. října 2015

Gradle - Get Hg Mercurial revision

Here is part of build.gradle file, which get mercurial revision and define task "revision", which print it to output.

It uses javahg to get revision number and that's why it needs Mercurial installation. We could use hg4j to remove this requirement. Anyway this script can be improved a lot, but for me it did it's work.

pátek 9. října 2015

Gradle - How to get Mercurial revision in gradle build file.

This part of gradle.build file add task "revision", which writes Mercurial changeset hash.

It can be improved, but ...