Update to Gradle 4.5
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 25 Jan 2018 18:44:06 +0000 (19:44 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 25 Jan 2018 18:44:06 +0000 (19:44 +0100)
gradle/wrapper/gradle-wrapper.properties
version.gradle

index 92781d4..71726ac 100644 (file)
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-bin.zip
index 95ae89c..88ff71e 100644 (file)
@@ -9,17 +9,19 @@ buildscript {
 
 import org.ajoberstar.grgit.Grgit
 
-task(writeVersion) << {
-       def grgit = Grgit.open(dir: project.rootDir)
-       def version = grgit.resolve.toCommit("HEAD").id
-       def niceVersion = grgit.describe()
-       grgit.close()
+task(writeVersion) {
+    doLast {
+        def grgit = Grgit.open(dir: project.rootDir)
+        def version = grgit.resolve.toCommit("HEAD").id
+        def niceVersion = grgit.describe()
+        grgit.close()
 
-    new File("src/generated/resources").mkdirs()
-       project.file("src/generated/resources/version.yaml").withWriter { out ->
-               out.println "id: ${version}"
-               out.println "nice: ${niceVersion}"
-       }
+        new File("src/generated/resources").mkdirs()
+        project.file("src/generated/resources/version.yaml").withWriter { out ->
+            out.println "id: ${version}"
+            out.println "nice: ${niceVersion}"
+        }
+    }
 }
 
 sourceSets {