task copyInstall4jTemplate {
-
def install4jTemplateFile = file("${install4jDir}/${install4j_template}")
def install4jFileAssociationsFile = file("${install4jDir}/${install4j_installer_file_associations}")
inputs.file(install4jTemplateFile)
outputs.file(install4jConfFile)
doLast {
- def install4j = new XmlParser().parse(install4jTemplateFile)
+ def install4jConfigXml = new XmlParser().parse(install4jTemplateFile)
// turn off code signing if no OSX_KEYPASS
if (OSX_KEYPASS == "") {
- install4j.'**'.codeSigning.each { codeSigning ->
+ install4jConfigXml.'**'.codeSigning.each { codeSigning ->
codeSigning.'@macEnabled' = "false"
}
- install4j.'**'.windows.each { windows ->
+ install4jConfigXml.'**'.windows.each { windows ->
windows.'@runPostProcessor' = "false"
}
}
// put file association actions where placeholder action is
def install4jFileAssociationsText = install4jFileAssociationsFile.text
def fileAssociationActions = new XmlParser().parseText("<actions>${install4jFileAssociationsText}</actions>")
- install4j.'**'.action.any { a ->
+ install4jConfigXml.'**'.action.any { a ->
if (a.'@name' == 'EXTENSIONS_REPLACED_BY_GRADLE') {
def parent = a.parent()
parent.remove(a)
}
// write install4j file
- install4jConfFile.text = XmlUtil.serialize(install4j)
+ install4jConfFile.text = XmlUtil.serialize(install4jConfigXml)
}
}