Skip to content

Commit

Permalink
Manually incorperate changes from #1741
Browse files Browse the repository at this point in the history
Incorperating changes from
#1741

Specifically build.gradle changes, see 2744081#diff-49a96e7eea8a94af862798a45174e6ac43eb4f8b4bd40759b5da63ba31ec3ef7

Signed-off-by: Peter Nied <[email protected]>
  • Loading branch information
peternied committed Sep 23, 2022
1 parent 8a36563 commit 1c2cda5
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,18 @@ repositories {
}

ext {
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
opensearch_version = System.getProperty("opensearch.version", "1.3.4-SNAPSHOT")
buildVersionQualifier = System.getProperty("build.version_qualifier", "")
version_tokens = opensearch_version.tokenize('-')
opensearch_build = version_tokens[0] + '.0'
if (buildVersionQualifier) {
opensearch_build += "-${buildVersionQualifier}"
opensearch_build_nosnapshot = opensearch_build
}
if (isSnapshot) {
opensearch_build += "-SNAPSHOT"
}
}

configurations.all {
Expand Down Expand Up @@ -123,13 +134,8 @@ dependencies {
compileOnly "org.opensearch:opensearch:${opensearch_version}"
}

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

group = 'org.opensearch'
version = "${securityPluginVersion}" + (isSnapshot ? "-SNAPSHOT" : "")
version = opensearch_build
description = 'OpenSearch Security'


Expand Down Expand Up @@ -304,16 +310,13 @@ task bundleSecurityAdminStandaloneTarGz(dependsOn: jar, type: Tar) {
}

task createPluginDescriptor() {
if (opensearch_version.contains("-SNAPSHOT")) {
opensearch_version=opensearch_version.substring(0, opensearch_version.length() - 9)
}
List<String> descriptorProperties = [
"description=Provide access control related features for OpenSearch",
"version=${version}",
"name=opensearch-security",
"classname=org.opensearch.security.OpenSearchSecurityPlugin",
"java.version=${java.targetCompatibility}",
"opensearch.version=${opensearch_version}",
"opensearch.version=${version_tokens[0]}",
]

new File("plugin-descriptor.properties").text = descriptorProperties.join ("\n")
Expand Down

0 comments on commit 1c2cda5

Please sign in to comment.