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.
This commit is contained in:
parent
85ac541ab3
commit
efa823bd79
|
@ -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')) {
|
||||
|
|
Loading…
Reference in New Issue