def gradle(registry, xml_parent, data):
 gradle = XML.SubElement(xml_parent, 'hudson.plugins.gradle.Gradle')
 XML.SubElement(gradle, 'description').text = ''
 XML.SubElement(gradle, 'tasks').text = data['tasks']
 XML.SubElement(gradle, 'buildFile').text = ''
 XML.SubElement(gradle, 'rootBuildScriptDir').text = data.get('root-build-script-dir', '')
 XML.SubElement(gradle, 'gradleName').text = data.get('gradle-name', '')
 XML.SubElement(gradle, 'useWrapper').text = str(data.get('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
 XML.SubElement(gradle, 'fromRootBuildScriptDir').text = str(data.get('use-root-dir', False)).lower()

def gradle ( registry , xml_parent , data ) : gradle = XML . SubElement ( xml_parent , 'hudson.plugins.gradle.Gradle' ) XML . SubElement ( gradle , 'description' ) . text = '' XML . SubElement ( gradle , 'tasks' ) . text = data [ 'tasks' ] XML . SubElement ( gradle , 'buildFile' ) . text = '' XML . SubElement ( gradle , 'rootBuildScriptDir' ) . text = data . get ( 'root-build-script-dir' , '' ) XML . SubElement ( gradle , 'gradleName' ) . text = data . get ( 'gradle-name' , '' ) XML . SubElement ( gradle , 'useWrapper' ) . text = str ( data . get ( '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 XML . SubElement ( gradle , 'fromRootBuildScriptDir' ) . text = str ( data . get ( 'use-root-dir' , False ) ) . lower ( )
yaml: gradle execute gradle tasks .