Upgrade to gradle 4.0

- updated common functions into closures for exporting
This commit is contained in:
Connor Tumbleson 2017-07-03 07:16:53 -04:00
parent f8fe98d9a6
commit 988fd15f0a
No known key found for this signature in database
GPG Key ID: C3CC0A201EC7DA75
4 changed files with 33 additions and 32 deletions

View File

@ -14,10 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
gradle.allprojects { def getCheckedOutGitCommitHash() {
// https://gist.github.com/JonasGroeger/7620911
ext.getCheckedOutGitCommitHash = {
def gitFolder = "$projectDir/.git/" def gitFolder = "$projectDir/.git/"
def takeFromHash = 6 def takeFromHash = 6
@ -35,7 +32,7 @@ gradle.allprojects {
refHead.text.trim().take takeFromHash refHead.text.trim().take takeFromHash
} }
ext.getCheckedOutBranch = { def getCheckedOutBranch() {
def gitFolder = "$projectDir/.git/" def gitFolder = "$projectDir/.git/"
def head def head
@ -46,4 +43,8 @@ gradle.allprojects {
return "SNAPSHOT"; return "SNAPSHOT";
} }
} }
ext {
getCheckedOutGitCommitHash = this.&getCheckedOutGitCommitHash
getCheckedOutBranch = this.&getCheckedOutBranch
} }

Binary file not shown.

View File

@ -1,6 +1,6 @@
#Mon Apr 24 12:27:08 SGT 2017 #Mon Jul 03 07:09:45 EDT 2017
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-bin.zip