I am stumped on a very basic problem: My sourceSets isn’t being populated because FileResolver isn’t returning what I think it should. I copied AntlrSourceVirtualDirectoryImpl and replaced “.g” with “.xml”:
mpfw = new DefaultSourceDirectorySet(displayName, fileResolver);
mpfw.getFilter().include("\*\*/*.xml");
Here, fileResolver was created with a
srcDir = "src/main/mpfw"
so that
fileResolver.resolve(srcDir).toString() = "C:\Users\mmaxey\Documents\mpfw\testProjects\src\main\mpfw"
I expected mpfw.getFiles() to return me
C:\Users\mmaxey\Documents\mpfw\testProjects\src\main\mpfw\org\gradle\Person.xml
but it came back empty.
In the plugin, the “main” sourceSet returns the file correctly. However, if I change the filter above to be
"\*\*/*.foobar"
instead of
"\*\*/*.xml"
it still returns the file (even though it shouldn’t).
I must be doing something simply horribly wrong, but what could it be?