From 5e330a53aff72a69bc14f0b185b381d2aa735576 Mon Sep 17 00:00:00 2001 From: Michael Froh Date: Tue, 31 Oct 2023 20:20:47 -0700 Subject: [PATCH] Move versioning logic to the root project (#208) Instead of computing the OpenSearch + plugin version in the subprojects, we can do it in the root project and propagate the `ext` variables. Signed-off-by: Michael Froh --- amazon-kendra-intelligent-ranking/build.gradle | 9 --------- amazon-personalize-ranking/build.gradle | 9 --------- build.gradle | 8 ++++++++ 3 files changed, 8 insertions(+), 18 deletions(-) create mode 100644 build.gradle diff --git a/amazon-kendra-intelligent-ranking/build.gradle b/amazon-kendra-intelligent-ranking/build.gradle index 2fff454..311ef91 100644 --- a/amazon-kendra-intelligent-ranking/build.gradle +++ b/amazon-kendra-intelligent-ranking/build.gradle @@ -30,15 +30,6 @@ loggerUsageCheck.enabled = false validateNebulaPom.enabled = false buildscript { - ext { - isSnapshot = "true" == System.getProperty("build.snapshot", "true") - opensearch_version = System.getProperty("opensearch.version", "2.10.0") - plugin_version = opensearch_version - if (isSnapshot) { - opensearch_version += "-SNAPSHOT" - } - } - repositories { mavenLocal() maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" } diff --git a/amazon-personalize-ranking/build.gradle b/amazon-personalize-ranking/build.gradle index 5b703f8..d73bfbc 100644 --- a/amazon-personalize-ranking/build.gradle +++ b/amazon-personalize-ranking/build.gradle @@ -31,15 +31,6 @@ loggerUsageCheck.enabled = false validateNebulaPom.enabled = false buildscript { - ext { - isSnapshot = "true" == System.getProperty("build.snapshot", "true") - opensearch_version = System.getProperty("opensearch.version", "2.10.0") - plugin_version = opensearch_version - if (isSnapshot) { - opensearch_version += "-SNAPSHOT" - } - } - repositories { mavenLocal() maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" } diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..2216090 --- /dev/null +++ b/build.gradle @@ -0,0 +1,8 @@ +ext { + isSnapshot = "true" == System.getProperty("build.snapshot", "true") + opensearch_version = System.getProperty("opensearch.version", "2.10.0") + plugin_version = opensearch_version + if (isSnapshot) { + opensearch_version += "-SNAPSHOT" + } +}