I have a task that produces an MSI using wix and am having a hard time getting that aligned with an artifactory publish. I thought it was due to output declaration but I end up with this error.
A problem occurred evaluating script. > Cannot convert the provided notation to an object of type PublishArtifact: task ‘:wfm-reporting-msi:wfm-reporting-install-green:wixLight’.
The following types/formats are supported:
-
Instances of PublishArtifact.
-
Instances of AbstractArchiveTask, e.g. jar.
-
Maps
-
Instances of File.
The task is defined as follows and depends on one before it (also an exec):
task wixLight(dependsOn: wixCandle) {
description 'Links and binds one or more .wixobj files and creates a Windows Installer database.'
File out = file("${buildDir}/libs/${project.name}-${project.version}.msi")
//destFile = file("${buildDir}/libs/*.msi")
outputs.upToDateWhen { false }
doLast {
println "Exec Time: ${project.msiName}"
if (project.hasProperty("msiName")) {
out = file("${buildDir}/libs/${msiName}")
}
outputs.file out
exec {
executable file("${buildDir}\wix-lib\wix-" + wixVersion + "\bin\light.exe")
args "-out", out
args fileTree(wixCandle.outputs.files.singleFile).files
args "-ext", "WixUtilExtension.dll"
args "-ext", "WixUIExtension.dll"
}
}
}
with an artifact declaration of
artifacts {
archives wixLight
}