Clean bin folder

(sergey.morenets) #1


I am newbie in Gradle. The project contains bin folder with .class files. Is there any task to delete all these files? I supposed clean task should do that. But it just deletes “build” directory.

(Peter Niederwieser) #2

The ‘bin’ folder is typically created by Eclipse, not by Gradle. You could make the ‘clean’ task delete it, but it wouldn’t make much sense.

(sergey.morenets) #3

Thank you, Peter.

In Maven maven clean command deletes everything except source code so I expected the same behavior with Gradle.

(Peter Niederwieser) #4

The Maven ‘clean’ command won’t delete the ‘bin’ directory either. As I said, it’s easy to configure the Gradle ‘clean’ task to delete the ‘bin’ directory (see ‘Delete’ in the Gradle Build Language Reference). However, I don’t see much value in doing so, and it may lead to problems with Eclipse.