From efa823bd79f642528bdcce5130fc1c9902ea517f Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Fri, 13 Apr 2018 17:11:37 -0400 Subject: [PATCH] Simplify snapshot check in root build file Rather than checking a substring match, now that VersionProperties#elasticsearch is a strongly-typed instance of Version, we can use the Version#isSnapshot convenience method. This commit switches the root build file to do this. --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index ae472cc1340..3027dade1a7 100644 --- a/build.gradle +++ b/build.gradle @@ -245,7 +245,7 @@ subprojects { // other packages (e.g org.elasticsearch.client) will point to server rather than // their own artifacts. if (project.plugins.hasPlugin(BuildPlugin)) { - String artifactsHost = VersionProperties.elasticsearch.toString().endsWith("-SNAPSHOT") ? "https://snapshots.elastic.co" : "https://artifacts.elastic.co" + String artifactsHost = VersionProperties.elasticsearch.isSnapshot() ? "https://snapshots.elastic.co" : "https://artifacts.elastic.co" Closure sortClosure = { a, b -> b.group <=> a.group } Closure depJavadocClosure = { dep -> if (dep.group != null && dep.group.startsWith('org.elasticsearch')) {