Adding 'switches' to gradle
This change adds the ability to specify switches to be passed to gradle. This change was only two functional code lines and several lines of documentation. The only file that changed was builders.py Change-Id: Idb1199cd4a63e6fbfdabe57cf50a8b431dd9e914 Reviewed-on: https://review.openstack.org/25929 Reviewed-by: Tollef Fog Heen <tfheen@varnish-software.com> Reviewed-by: Arnaud Fabre <fabre.arnaud@gmail.com> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Approved: James E. Blair <corvus@inaugust.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
This commit is contained in:
parent
bc235fdfc9
commit
8609576985
@ -444,6 +444,7 @@ def gradle(parser, xml_parent, data):
|
||||
:arg str tasks: List of tasks to execute
|
||||
:arg bool wrapper: use gradle wrapper (default false)
|
||||
:arg bool executable: make gradlew executable (default false)
|
||||
:arg list switches: Switches for gradle, can have multiples
|
||||
|
||||
Example::
|
||||
|
||||
@ -451,6 +452,9 @@ def gradle(parser, xml_parent, data):
|
||||
- gradle:
|
||||
wrapper: true
|
||||
executable: true
|
||||
switches:
|
||||
- "-g /foo/bar/.gradle"
|
||||
- "-PmavenUserName=foobar"
|
||||
tasks: |
|
||||
init
|
||||
build
|
||||
@ -458,7 +462,6 @@ def gradle(parser, xml_parent, data):
|
||||
"""
|
||||
gradle = XML.SubElement(xml_parent, 'hudson.plugins.gradle.Gradle')
|
||||
XML.SubElement(gradle, 'description').text = ''
|
||||
XML.SubElement(gradle, 'switches').text = ''
|
||||
XML.SubElement(gradle, 'tasks').text = data['tasks']
|
||||
XML.SubElement(gradle, 'rootBuildScriptDir').text = ''
|
||||
XML.SubElement(gradle, 'buildFile').text = ''
|
||||
@ -466,6 +469,8 @@ def gradle(parser, xml_parent, data):
|
||||
'wrapper', False)).lower()
|
||||
XML.SubElement(gradle, 'makeExecutable').text = str(data.get(
|
||||
'executable', False)).lower()
|
||||
switch_string = '\n'.join(data.get('switches', []))
|
||||
XML.SubElement(gradle, 'switches').text = switch_string
|
||||
|
||||
|
||||
def batch(parser, xml_parent, data):
|
||||
|
Loading…
Reference in New Issue
Block a user