I’m trying to setup a Gradle build for a source tree that has followed the “big ball of mud” architectural style for many years. One result of this is that the relationship between components and the filesystem is unpredictable, often surprising.
For example, I have defined a “coredb” component that consists of all *.java files from the directories
plus one additional file:
I do not want to pull any other model-related code into the build of coredb. (Eventually I want to fix this weird dependency, but for now I’m trying to create a new build system with the code as it is. Then we can work on fixing our architecture.)
Creating a sourceSet that finds *.java from the specified directories was easy enough. But how do I add one single additional source file from a completely unrelated directory?