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
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 {