Skip to content

Commit ffde4b0

Browse files
authored
Add version info to build.gradle (#5)
This attempts to follow the conventions defined [here][1]. [1]: https://github.com/opensearch-project/opensearch-plugins/blob/main/CONVENTIONS.md Signed-off-by: Andrew Ross <andrross@amazon.com>
1 parent 1f5a776 commit ffde4b0

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

build.gradle

+14-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ buildscript {
1313
ext {
1414
opensearch_group = "org.opensearch"
1515
opensearch_version = System.getProperty("opensearch.version", "3.0.0-SNAPSHOT")
16+
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
17+
buildVersionQualifier = System.getProperty("build.version_qualifier", "")
1618
}
1719

1820
repositories {
@@ -39,11 +41,22 @@ repositories {
3941
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
4042
}
4143

44+
allprojects {
45+
group 'org.opensearch'
46+
version = opensearch_version.tokenize('-')[0] + '.0'
47+
if (buildVersionQualifier) {
48+
version += "-${buildVersionQualifier}"
49+
}
50+
if (isSnapshot) {
51+
version += "-SNAPSHOT"
52+
}
53+
}
54+
4255
apply plugin: 'opensearch.opensearchplugin'
4356
apply plugin: 'opensearch.internal-cluster-test'
4457

4558
opensearchplugin {
46-
name 'custom-codecs'
59+
name 'opensearch-custom-codecs'
4760
description 'A plugin that implements custom compression codecs.'
4861
classname 'org.opensearch.index.codec.customcodecs.CustomCodecPlugin'
4962
licenseFile rootProject.file('LICENSE')

0 commit comments

Comments
 (0)