I have a huge java web-project. Recently I have migrated to gradle build from ant build.
Is it necessary to do 'clean' task each time I build ?
Or
What is the actual purpose of 'clean' task ?
(I know that 'clean' will clean the output directory. But I think always the files will get replaced each time I compile. Then why do we need to spend time to clean again)
There is one reason to clean (as I know) : If you remove a file and build without cleaning it, the old file will remain in the output folder until you clean it.