Skip to content

Commit 2aaed8e

Browse files
committed
Fix issue with version str in build.gradle
1 parent bfb1c83 commit 2aaed8e

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

build.gradle

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,18 @@ plugins {
55
}
66

77
group = 'org.polypheny'
8-
version = hasProperty('version') ? version : 'SNAPSHOT'
98

109
def majorVersion = 0
1110
def minorVersion = 0
12-
if (hasProperty('version')) {
13-
// Split version into major and minor components
14-
def versionComponents = version.split("\\.")
15-
majorVersion = versionComponents[0].toInteger()
16-
minorVersion = versionComponents[1].toInteger()
11+
if (hasProperty('version') ) {
12+
if ( version == "unspecified" ) {
13+
version = 'SNAPSHOT'
14+
} else {
15+
// Split version into major and minor components
16+
def versionComponents = version.split("\\.")
17+
majorVersion = versionComponents[0].toInteger()
18+
minorVersion = versionComponents[1].toInteger()
19+
}
1720
}
1821

1922
repositories {

0 commit comments

Comments
 (0)