I apologize in advance for my ignorance. I am very new to gradle.
My goal is to have some kind of task in my build.gradle file, where the "version.txt" file is created in my project directory whenever I run the t20> terminal command in my project root. This file "version.txt" should contain metadata for the version of the assembly, such as:
Version: 1.0 Revision: 1z7g30jFHYjl42L9fh0pqzmsQkF Buildtime: 2016-06-14 07:16:37 EST Application-name: foobarbaz app
(^ Editing will be a git hash of the commit HEAD)
I tried to reuse fragments from the following resources, but to no avail, possibly because these resources are deprecated: http://mrhaki.blogspot.com/2015/04/gradle-goodness-use-git-commit-id-in.html http : //mrhaki.blogspot.com/2010/10/gradle-goodness-add-incremental-build.html
I am using gradle version 2.14 (this is the latest version).
Any help and / or understanding would be greatly appreciated. Thanks!
git file versioning build.gradle gradle
Chris covney
source share