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+.
This commit is contained in:
Ryan Ernst 2017-02-14 21:31:56 -08:00 committed by GitHub
parent cff590db3f
commit c4625f230f
1 changed files with 3 additions and 0 deletions

View File

@ -122,6 +122,9 @@ if (GradleVersion.current() == GradleVersion.version("2.13")) {
if (project == rootProject) { if (project == rootProject) {
repositories { repositories {
if (System.getProperty("repos.mavenLocal") != null) {
mavenLocal()
}
mavenCentral() mavenCentral()
} }
test.exclude 'org/elasticsearch/test/NamingConventionsCheckBadClasses*' test.exclude 'org/elasticsearch/test/NamingConventionsCheckBadClasses*'