From 2c30d4eceb696b3c3ccd27a1203d88bdc08076b8 Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Fri, 29 Jul 2022 15:39:33 -0400 Subject: [PATCH] Extract version into gradle.properties. (#193) Signed-off-by: dblock --- build.gradle.kts | 4 ++-- config/version.txt | 1 - gradle.properties | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 config/version.txt create mode 100644 gradle.properties diff --git a/build.gradle.kts b/build.gradle.kts index 30b4c67868..df7f0dc13b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -32,9 +32,9 @@ allprojects { group = "org.opensearch.client" + // Release manager provides a $VERSION. If not present, it's a local or CI snapshot build. - version = System.getenv("VERSION") ?: - (File(project.rootDir, "config/version.txt").readText().trim() + "-SNAPSHOT") + version = System.getenv("VERSION") ?: System.getProperty("version") + "-SNAPSHOT" repositories { mavenLocal() diff --git a/config/version.txt b/config/version.txt deleted file mode 100644 index 7ec1d6db40..0000000000 --- a/config/version.txt +++ /dev/null @@ -1 +0,0 @@ -2.1.0 diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000000..aac6d37671 --- /dev/null +++ b/gradle.properties @@ -0,0 +1 @@ +systemProp.version = 2.1.0 \ No newline at end of file