For Delete
task you need to comply with gradle Api
that’s why you had to create a new task that overrides the Delete
default task from gradle.
if you want to register a task that works with install
task you can do like this
task myDeleteTask(type: Delete) {
delete files("${buildDir}/jpackageAppImage")
}
myDeleteTask.mustRunAfter installerTask
installerTask
is your custom installer task.
mustRunAfter
is a gradle Api that allows to you chain tasks