Skip to content

Commit

Permalink
Use standard snapshot build settings and OpenSearch 1.x. (opensearch-…
Browse files Browse the repository at this point in the history
…project#49)

Signed-off-by: dblock <dblock@amazon.com>
  • Loading branch information
dblock authored and lezzago committed Sep 14, 2021
1 parent 1ca39fa commit 6ffa0b6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ jobs:
# job-scheduler
- name: Build and Test
run: |
./gradlew build -Dbuild.snapshot=false
./gradlew build -Dopensearch.version=1.1.0-SNAPSHOT
- name: Publish to Maven Local
run: |
./gradlew publishToMavenLocal -Dbuild.snapshot=false
./gradlew publishToMavenLocal -Dopensearch.version=1.1.0-SNAPSHOT
- name: Upload Coverage Report
uses: codecov/codecov-action@v1
Expand Down
19 changes: 8 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ plugins {
id 'java-library'
}

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

apply plugin: 'opensearch.opensearchplugin'
apply plugin: 'opensearch.testclusters'
apply plugin: 'opensearch.java-rest-test'
Expand Down Expand Up @@ -84,17 +79,19 @@ testClusters.javaRestTest {
testDistribution = 'INTEG_TEST'
}

ext {
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
}

allprojects {
group = 'org.opensearch'
version = "${opensearchVersion}.0"

apply from: "$rootDir/build-tools/repositories.gradle"

boolean snapshot = "true".equals(System.getProperty("build.snapshot", "true"));
if (snapshot) {
version = opensearch_version - '-SNAPSHOT' + '.0'
if (isSnapshot) {
version += "-SNAPSHOT"
}

apply from: "$rootDir/build-tools/repositories.gradle"

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

0 comments on commit 6ffa0b6

Please sign in to comment.