How are the files you want to delete generated? If they are created by another task, let's say "generateFiles", you can just:
Copy code
tasks.clean {
dependsOn(":cleanGenerateFiles")
}
Gradle automatically creates a task prefixed with
clean
for all tasks, which cleans things generated by that task.
This is a much better solution, because if the paths change etc, the clean task will still work.
think smart 2
e
Edoardo Luppi
08/18/2023, 12:18 PM
@CLOVIS damn, that's pretty neat. Exactly what I need, thanks!