Gradle plugin: Support parameter passing
Introduce 2 booleans in the Gradle builder section to support passing parameters by System Properties and Project Properties Change-Id: I0de1e20b85902263e0d83ccadd64d42fc2b37193
This commit is contained in:
parent
1ffef886f8
commit
6c55bc7821
|
@ -1140,6 +1140,10 @@ def gradle(registry, xml_parent, data):
|
||||||
root) here, such as ${workspace}/parent/ instead of just
|
root) here, such as ${workspace}/parent/ instead of just
|
||||||
${workspace}.
|
${workspace}.
|
||||||
:arg str build-file: name of gradle build script (default 'build.gradle')
|
:arg str build-file: name of gradle build script (default 'build.gradle')
|
||||||
|
:arg bool pass-system-properties: Pass all parameters as
|
||||||
|
System properties (default false)
|
||||||
|
:arg bool pass-project-properties: Pass all parameters as
|
||||||
|
Project properties (default false)
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
@ -1158,6 +1162,8 @@ def gradle(registry, xml_parent, data):
|
||||||
("wrapper", "useWrapper", False),
|
("wrapper", "useWrapper", False),
|
||||||
("executable", "makeExecutable", False),
|
("executable", "makeExecutable", False),
|
||||||
("use-root-dir", "fromRootBuildScriptDir", False),
|
("use-root-dir", "fromRootBuildScriptDir", False),
|
||||||
|
("pass-system-properties", "passAllAsSystemProperties", False),
|
||||||
|
("pass-project-properties", "passAllAsProjectProperties", False),
|
||||||
]
|
]
|
||||||
helpers.convert_mapping_to_xml(gradle, data, mappings, fail_required=True)
|
helpers.convert_mapping_to_xml(gradle, data, mappings, fail_required=True)
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,8 @@ tests
|
||||||
<useWrapper>true</useWrapper>
|
<useWrapper>true</useWrapper>
|
||||||
<makeExecutable>true</makeExecutable>
|
<makeExecutable>true</makeExecutable>
|
||||||
<fromRootBuildScriptDir>true</fromRootBuildScriptDir>
|
<fromRootBuildScriptDir>true</fromRootBuildScriptDir>
|
||||||
|
<passAllAsSystemProperties>true</passAllAsSystemProperties>
|
||||||
|
<passAllAsProjectProperties>true</passAllAsProjectProperties>
|
||||||
<switches>-g /foo/bar/.gradle
|
<switches>-g /foo/bar/.gradle
|
||||||
-PmavenUserName=foobar</switches>
|
-PmavenUserName=foobar</switches>
|
||||||
</hudson.plugins.gradle.Gradle>
|
</hudson.plugins.gradle.Gradle>
|
||||||
|
|
|
@ -6,6 +6,8 @@ builders:
|
||||||
executable: true
|
executable: true
|
||||||
use-root-dir: true
|
use-root-dir: true
|
||||||
root-build-script-dir: ${workspace}/tests
|
root-build-script-dir: ${workspace}/tests
|
||||||
|
pass-system-properties: true
|
||||||
|
pass-project-properties: true
|
||||||
switches:
|
switches:
|
||||||
- "-g /foo/bar/.gradle"
|
- "-g /foo/bar/.gradle"
|
||||||
- "-PmavenUserName=foobar"
|
- "-PmavenUserName=foobar"
|
||||||
|
|
Loading…
Reference in New Issue