Browse Source

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+.
Ryan Ernst 8 years ago
parent
commit
c4625f230f
1 changed files with 3 additions and 0 deletions
  1. 3 0
      buildSrc/build.gradle

+ 3 - 0
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*'