Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 19854

How can I delete a file from inside a task?

$
0
0

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


Viewing all articles
Browse latest Browse all 19854

Trending Articles