mirror of https://github.com/sbt/sbt.git
This rewroks the cleanTask so that it only removes a subset of the files in the target directory. To do this, I add a new task, outputs, that returns the glob representation of the possible output files for the task. It must be a task because some outputs will depend on streams. For each project, the default outputs are all of the files in baseDirectory / target. Long term, we could enhance the clean task to be automatically generated in any scope (as an input task). We could then add the option for the task scoped clean to delete all of the transitive outputs of the class. That is beyond the scope of this commit, however. I copied the scripted tests from #3678 and added an additional test to make sure that the manage source directory was explicitly cleaned. |
||
|---|---|---|
| .. | ||
| main | ||
| test | ||