How can I tell `./gradlew clean` to also delete out folders produces by IntelliJ

Viewed 1723

As in the title, how can I tell ./gradlew clean to also delete out folders produces by IntelliJ ? It seems that IntelliJ uses this directory for execution context.

1 Answers

Even if it's possible to use the delete method of the Project instance in a doLast closure, you should actually use the delete method of the Delete task:

clean {
    delete 'out'     // interpreted relative to the project directory
}
Related