Skip to content

Commit 1afbe98

Browse files
authored
Fix minor error in isSnapshot (#27)
Fix minor error in isSnapshot Signed-off-by: Khushboo Rajput <[email protected]>
1 parent 169f669 commit 1afbe98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ buildscript {
88
// Detect version from version.properties and align it with the build settings
99
def build = new Properties()
1010
file("version.properties").withInputStream { build.load(it) }
11-
var isSnapshot = "true" == System.getProperty("build.snapshot", "true")
11+
var isSnapshot = System.getProperty("build.snapshot", "true")
1212
buildVersion = build.getProperty("version")
13-
if (isSnapshot && !buildVersion.endsWith("SNAPSHOT")) {
13+
if (isSnapshot.toBoolean() && !buildVersion.endsWith("SNAPSHOT")) {
1414
buildVersion = buildVersion + "-SNAPSHOT"
1515
} else if (!isSnapshot && buildVersion.endsWith("SNAPSHOT")) {
1616
throw GradleException("Expecting release (non-SNAPSHOT) build but version is not set accordingly: " + buildVersion)

0 commit comments

Comments
 (0)