Fix Gradle depreciation warning
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 11 Nov 2017 09:38:13 +0000 (10:38 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 11 Nov 2017 09:38:13 +0000 (10:38 +0100)
build.gradle

index f516564..64a8447 100644 (file)
@@ -81,11 +81,13 @@ task createVersion() {
 
 
 import org.ajoberstar.grgit.Grgit
-createVersion << {
-    def gitRepo = Grgit.open(".")
-    version = gitRepo.describe()
-    new File("src/generated/resources").mkdirs()
-    new File("src/generated/resources/version.txt").withWriter() { it.write(version) }
+createVersion {
+    doLast {
+        def gitRepo = Grgit.open(".")
+        version = gitRepo.describe()
+        new File("src/generated/resources").mkdirs()
+        new File("src/generated/resources/version.txt").withWriter() { it.write(version) }
+    }
 }
 
 war {