Per the docs and what I've read online sourceSets are a logical grouping of files that should be packaged together. When you specify a sourceSet you can also specify a class path and other associated attributes. But could someone explain what is the purpose of a sourceSet? What basic problem does it solve?
CodePudding user response:
Older projects (with Apache ANT builds for example) do not necessarily adhere to a standardized file structure.
sourceSets
allows for conversion of these projects without rearranging the file structure. This can keep the original project management, or any scripts (possibly used in deployment or whatever) -- that rely on the file structure remaining the same -- intact.
For a new project, it makes very little sense to change the sourceSets, and it is better to adhere to the standard.