You will have to explicitly tell Gradle the file to use here. Unfortunately you can only pass a Task
instance when that task extends from AbstractArchiveTask
. You could simply change your build script like so. This will also instruct Gradle that to publish this artifact it must execute the buildWindowsInstaller
task.
artifacts {
archives(buildWindowsInstaller.target) {
builtBy buildWindowsInstaller
}
}