From a3428583dc6527b194860166318b02d70a7c5475 Mon Sep 17 00:00:00 2001 From: Mark Vieira Date: Thu, 1 Aug 2019 10:55:29 -0700 Subject: [PATCH] Fix failed dependency resolution with external build-tools users Signed-off-by: Mark Vieira --- .../org/elasticsearch/gradle/test/RestIntegTestTask.groovy | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/RestIntegTestTask.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/RestIntegTestTask.groovy index a73c44a2921bc..1646769004857 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/RestIntegTestTask.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/RestIntegTestTask.groovy @@ -18,9 +18,10 @@ */ package org.elasticsearch.gradle.test - +import org.elasticsearch.gradle.VersionProperties import org.elasticsearch.gradle.testclusters.ElasticsearchCluster import org.elasticsearch.gradle.testclusters.TestClustersPlugin +import org.elasticsearch.gradle.tool.ClasspathUtils import org.gradle.api.DefaultTask import org.gradle.api.Task import org.gradle.api.execution.TaskExecutionAdapter @@ -244,7 +245,8 @@ class RestIntegTestTask extends DefaultTask { restSpec } project.dependencies { - restSpec project.project(':rest-api-spec') + restSpec ClasspathUtils.isElasticsearchProject() ? project.project(':rest-api-spec') : + "org.elasticsearch.rest-api-spec:${VersionProperties.elasticsearch}" } Task copyRestSpec = project.tasks.findByName('copyRestSpec') if (copyRestSpec != null) {