From 73e2d0463cd915f7721fe9c3fcd5dc417a900962 Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Tue, 15 Oct 2024 22:18:27 -0400 Subject: [PATCH] Remove unused code Signed-off-by: Craig Perkins --- buildSrc/settings.gradle | 8 ----- .../opensearch/gradle/VersionProperties.java | 31 ------------------- 2 files changed, 39 deletions(-) diff --git a/buildSrc/settings.gradle b/buildSrc/settings.gradle index f220dda2d1aca..963177afaa2de 100644 --- a/buildSrc/settings.gradle +++ b/buildSrc/settings.gradle @@ -10,11 +10,3 @@ */ include 'reaper' - -//dependencyResolutionManagement { -// versionCatalogs { -// libs { -// from(files("../gradle/libs.versions.toml")) -// } -// } -//} diff --git a/buildSrc/src/main/java/org/opensearch/gradle/VersionProperties.java b/buildSrc/src/main/java/org/opensearch/gradle/VersionProperties.java index c42f61de85b50..4d8b62d95dff1 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/VersionProperties.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/VersionProperties.java @@ -136,37 +136,6 @@ private static Properties getVersionProperties() { return props; } - private static void loadBuildSrcVersion(Properties loadedProps, Properties systemProperties) { - String opensearch = loadedProps.getProperty("opensearch"); - if (opensearch == null) { - throw new IllegalStateException("OpenSearch version is missing from properties."); - } - if (opensearch.matches("[0-9]+\\.[0-9]+\\.[0-9]+") == false) { - throw new IllegalStateException("Expected opensearch version to be numbers only of the form X.Y.Z but it was: " + opensearch); - } - String qualifier = systemProperties.getProperty("build.version_qualifier", ""); - if (qualifier.isEmpty() == false) { - if (qualifier.matches("(alpha|beta|rc)\\d+") == false) { - throw new IllegalStateException("Invalid qualifier: " + qualifier); - } - opensearch += "-" + qualifier; - } - final String buildSnapshotSystemProperty = systemProperties.getProperty("build.snapshot", "true"); - switch (buildSnapshotSystemProperty) { - case "true": - opensearch += "-SNAPSHOT"; - break; - case "false": - // do nothing - break; - default: - throw new IllegalArgumentException( - "build.snapshot was set to [" + buildSnapshotSystemProperty + "] but can only be unset or [true|false]" - ); - } - loadedProps.put("opensearch", opensearch); - } - public static boolean isOpenSearchSnapshot() { return opensearch.endsWith("-SNAPSHOT"); }