From 47ddf337a7b17600a7cedaa6b1fb070a229850b0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 11 Nov 2017 10:38:13 +0100 Subject: [PATCH] Fix Gradle depreciation warning --- build.gradle | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index f516564..64a8447 100644 --- a/build.gradle +++ b/build.gradle @@ -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 { -- 2.7.4