Improve Gradle versioning system
The version number in Gradle should include the branch name - except when running on the main
branch or if it is not known (i.e., a local build). This allows for a different version to be produced for each branch.
Additionally, the -SNAPSHOT
suffix should be used for all non-tag builds and the -RELEASE
suffix should be used for tag builds.