Skip to content

Commit 6c42af2

Browse files
committed
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.
1 parent 99ec202 commit 6c42af2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ subprojects {
249249
// other packages (e.g org.elasticsearch.client) will point to server rather than
250250
// their own artifacts.
251251
if (project.plugins.hasPlugin(BuildPlugin)) {
252-
String artifactsHost = VersionProperties.elasticsearch.toString().endsWith("-SNAPSHOT") ? "https://snapshots.elastic.co" : "https://artifacts.elastic.co"
252+
String artifactsHost = VersionProperties.elasticsearch.isSnapshot() ? "https://snapshots.elastic.co" : "https://artifacts.elastic.co"
253253
Closure sortClosure = { a, b -> b.group <=> a.group }
254254
Closure depJavadocClosure = { dep ->
255255
if (dep.group != null && dep.group.startsWith('org.elasticsearch')) {

0 commit comments

Comments
 (0)