-
Notifications
You must be signed in to change notification settings - Fork 19
Fix snapshot build and depend on OpenSearch 1.1. #62
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,10 @@ import java.util.concurrent.Callable | |
|
||
buildscript { | ||
ext { | ||
opensearch_version = System.getProperty("opensearch.version", "1.0.0") | ||
opensearch_version = System.getProperty("opensearch.version", "1.1.0-SNAPSHOT") | ||
// 1.0.0 -> 1.0.0.0, and 1.0.0-SNAPSHOT -> 1.0.0.0-SNAPSHOT | ||
opensearch_build = opensearch_version.replaceAll(/(\.\d)([^\d]*)$/, '$1.0$2') | ||
Comment on lines
+33
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we want to implicitly morph the incoming version with an extra There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For historical reasons OpenSearch is a 3-digit version, so you start with 1.1.0 or 1.1.0-SNAPSHOT, but common utils and plugins are 4-digit, so 1.1.0.0 and 1.1.0.0-SNAPSHOT. We have opensearch-project/OpenSearch#1093 open to stop doing that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is just a clever(er) way of doing |
||
common_utils_version = System.getProperty("common_utils.version", opensearch_build) | ||
kotlin_version = System.getProperty("kotlin.version", "1.4.0") | ||
} | ||
|
||
|
@@ -112,14 +115,9 @@ ext { | |
projectSubstitutions = [:] | ||
licenseFile = rootProject.file('LICENSE.txt') | ||
noticeFile = rootProject.file('NOTICE.txt') | ||
opensearchVersion = "${version}" | ||
isSnapshot = "true" == System.getProperty("build.snapshot", "true") | ||
} | ||
|
||
if (isSnapshot) { | ||
version += "-SNAPSHOT" | ||
} | ||
|
||
plugins.withId('java') { | ||
sourceCompatibility = targetCompatibility = "1.8" | ||
} | ||
|
@@ -130,7 +128,11 @@ plugins.withId('org.jetbrains.kotlin.jvm') { | |
|
||
allprojects { | ||
group = "org.opensearch" | ||
version = "${opensearchVersion}.0" | ||
|
||
version = "${opensearch_version}" - "-SNAPSHOT" + ".0" | ||
if (isSnapshot) { | ||
version += "-SNAPSHOT" | ||
} | ||
|
||
plugins.withId('java') { | ||
sourceCompatibility = targetCompatibility = "1.8" | ||
|
@@ -142,7 +144,7 @@ dependencies { | |
compile "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}" | ||
compile "org.jetbrains.kotlin:kotlin-stdlib-common:${kotlin_version}" | ||
compile "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9" | ||
compile "${group}:common-utils:${version}" | ||
compile "${group}:common-utils:${common_utils_version}" | ||
compile group: 'com.google.guava', name: 'guava', version: '15.0' | ||
testImplementation( | ||
'org.assertj:assertj-core:3.16.1', | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
1.1.0-SNAPSHOT
as a default seems like something that would fall out of date very easily. Could we simply error out ifopensearch.version
isn't set?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could. But we do this in so many plugins, so I'd prefer to do this as a separate issue/PR, and standardize across the set.