浏览代码

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 年之前
父节点
当前提交
c4625f230f
共有 1 个文件被更改,包括 3 次插入0 次删除
  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*'