From ee6d5a74fc6e7683f817d21832d8b10ea7d2b876 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 25 Jan 2018 19:44:06 +0100 Subject: [PATCH] Update to Gradle 4.5 --- gradle/wrapper/gradle-wrapper.properties | 2 +- version.gradle | 22 ++++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 92781d4..71726ac 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/version.gradle b/version.gradle index 95ae89c..88ff71e 100644 --- a/version.gradle +++ b/version.gradle @@ -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 { -- 2.7.4