Skip to content

Commit 5f3807f

Browse files
committed
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+.
1 parent b791e34 commit 5f3807f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

buildSrc/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ if (GradleVersion.current() == GradleVersion.version("2.13")) {
122122
if (project == rootProject) {
123123

124124
repositories {
125+
if (System.getProperty("repos.mavenLocal") != null) {
126+
mavenLocal()
127+
}
125128
mavenCentral()
126129
}
127130
test.exclude 'org/elasticsearch/test/NamingConventionsCheckBadClasses*'

0 commit comments

Comments
 (0)