From: David ‘Bombe’ Roden Date: Thu, 25 Jan 2018 18:44:06 +0000 (+0100) Subject: Update to Gradle 4.5 X-Git-Tag: v79^2~154 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=ee6d5a74fc6e7683f817d21832d8b10ea7d2b876;p=Sone.git Update to Gradle 4.5 --- 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 {