Skip to content

Commit 03ff4d4

Browse files
committed
Carry through build.snapshot as a system property
This commit carries through build.snapshot as a system property to the forked Scala builds.
1 parent 09ad17c commit 03ff4d4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

buildSrc/src/main/groovy/org/elasticsearch/hadoop/gradle/scala/ScalaVariantPlugin.groovy

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ class ScalaVariantPlugin implements Plugin<Project> {
4646
properties.put('localRepo', 'true')
4747
}
4848

49-
properties.put('build.snapshot', System.getProperty('build.snapshot', 'true'))
49+
Map<String, String> systemProperties = new HashMap<>()
50+
systemProperties.put('build.snapshot', System.getProperty('build.snapshot', 'true'))
5051

5152
if (OperatingSystem.current().isWindows()) {
5253
crossBuildForVariant.executable('gradlew.bat')
@@ -56,6 +57,7 @@ class ScalaVariantPlugin implements Plugin<Project> {
5657

5758
crossBuildForVariant.args(distribution.getPath())
5859
crossBuildForVariant.args(properties.collect { key, val -> "-P${key}=${val}" })
60+
crossBuildForVariant.args(systemProperties.collect { key, val -> "-D${key}=${val}" })
5961
crossBuildForVariant.args('-S')
6062
crossBuildForVariant.workingDir(project.rootDir)
6163

0 commit comments

Comments
 (0)