project.Delete()
cannot be called from outside a task or a buildScript. It also requires a path to yourFile
orDir
Right, so why doesn’t it work when I do this inside a custom task inside my build.gradle.kts
open class WindowsInstaller () : DefaultTask() {
...
@TaskAction
fun generateWindowsInstaller() {
project.delete(
fileTree("${project.buildDir}/jpackageAppImage")
)
...
}
...
}
Unless I am misunderstanding something, according to the docs it should work.