Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 726
Dimitri Kopriwa Avatar asked Jan 30 '23 06:01

Dimitri Kopriwa


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
}
like image 60
Lukas Körfer Avatar answered Feb 05 '23 16:02

Lukas Körfer