From 0e792a59b8bff62cda7638fb783840cf47f2b279 Mon Sep 17 00:00:00 2001 From: Patrick Rhomberg Date: Tue, 21 Aug 2018 10:03:57 -0700 Subject: [PATCH] suggested feedback: pass revision as build parameter, only create version file when present (or file does not exist). Remove input based on .git/index. --- build.gradle | 5 ----- geode-core/build.gradle | 3 +-- gradle.properties | 7 +++---- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/build.gradle b/build.gradle index 15b93952ab44..243b25295e3a 100755 --- a/build.gradle +++ b/build.gradle @@ -112,8 +112,3 @@ task devBuild(dependsOn: [":assemble"]) { } } } -gradle.taskGraph.whenReady { graph -> - if (graph.hasTask(devBuild)) { - project.skipVersionFileRegeneration = true - } -} diff --git a/geode-core/build.gradle b/geode-core/build.gradle index 5419238e7498..be04e07ede4f 100755 --- a/geode-core/build.gradle +++ b/geode-core/build.gradle @@ -220,11 +220,10 @@ task createVersionPropertiesFile { onlyIf { // Project properties are parsed as strings. // Use boolean comparison, not the value itself, to determine truth. - !(propertiesFile.exists() && project.skipVersionFileRegeneration) + !propertiesFile.exists() || project.sourceRevision != "0" } outputs.file propertiesFile - inputs.dir "../.git/index" doLast { def props = [ diff --git a/gradle.properties b/gradle.properties index 9e63b70476cf..032ab358728f 100755 --- a/gradle.properties +++ b/gradle.properties @@ -39,6 +39,9 @@ buildId = 0 productName = Apache Geode productOrg = Apache Software Foundation (ASF) +# This value is specified on the commandline at build, or else is zero. +sourceRevision = 0 + org.gradle.daemon = true org.gradle.jvmargs = -Xmx3g @@ -66,7 +69,3 @@ org.gradle.caching = true org.gradle.parallel = false org.gradle.configureondemand = false -# Setting this property to a truthy value, typically via command line -PskipVersionFileRegeneration, -# allows for a faster build as part of a normal development cycle. -# This property is also assigned to true in the devBuild target. -skipVersionFileRegeneration=