Skip to content

Commit

Permalink
Merge pull request #179 from dblock/fix-snapshot
Browse files Browse the repository at this point in the history
Use externally-defined OpenSearch version when specified.
  • Loading branch information
dblock authored Aug 13, 2021
2 parents 21cad56 + fa58ce8 commit 90eb1a9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

buildscript {
ext {
opensearch_version = "1.0.0"
opensearch_version = System.getProperty("opensearch.version", "1.0.0")
}

repositories {
Expand Down Expand Up @@ -55,12 +55,16 @@ repositories {
}

ext {
opensearchVersion = '1.0.0'
opensearchVersion = System.getProperty("opensearch.version", "1.0.0")
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
}

allprojects {
version = "${opensearchVersion}.0"
version = "${opensearchVersion}" - "-SNAPSHOT" + ".0"

if (isSnapshot) {
version += "-SNAPSHOT"
}

plugins.withId('java') {
sourceCompatibility = targetCompatibility = "1.8"
Expand Down

0 comments on commit 90eb1a9

Please sign in to comment.