Skip to content

Commit

Permalink
suggested feedback: pass revision as build parameter, only create ver…
Browse files Browse the repository at this point in the history
…sion file when present (or file does not exist). Remove input based on .git/index.
  • Loading branch information
PurelyApplied authored and dickcav committed Aug 21, 2018
1 parent a77905d commit 0e792a5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
5 changes: 0 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,3 @@ task devBuild(dependsOn: [":assemble"]) {
}
}
}
gradle.taskGraph.whenReady { graph ->
if (graph.hasTask(devBuild)) {
project.skipVersionFileRegeneration = true
}
}
3 changes: 1 addition & 2 deletions geode-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
7 changes: 3 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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=

0 comments on commit 0e792a5

Please sign in to comment.