From c4625f230f4df3bb34ba2e97ca1dc36db511778d Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Tue, 14 Feb 2017 21:31:56 -0800 Subject: [PATCH] Build: Support mavenLocal flag in buildSrc (#23157) When configuring which repositories to pull from, we currently add mavenLocal() when the `repos.mavenLocal` flag is set. However, this is only done in normal projects, but not the special buildSrc project. This change adds that support. Note that this was not possible before gradle 2.13, as there was a bug which prevented sys props from reaching the buildSrc project (https://issues.gradle.org/browse/GRADLE-2475). However, we already require 2.13+. --- buildSrc/build.gradle | 3 +++ 1 file changed, 3 insertions(+) diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 31666d32439..fcb504b83ce 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -122,6 +122,9 @@ if (GradleVersion.current() == GradleVersion.version("2.13")) { if (project == rootProject) { repositories { + if (System.getProperty("repos.mavenLocal") != null) { + mavenLocal() + } mavenCentral() } test.exclude 'org/elasticsearch/test/NamingConventionsCheckBadClasses*'