This post has NOT been accepted by the mailing list yet.
We are in the process of migrating a large legacy application to a new application platform.
We have existing gradle scripts in place for the modules, however these scripts have not, so far, supported webservice build, only compile and test. Our new application platform has some constraints, in particular @Webservice annotated classes must be singular per deployed war. Since the legacy application has many cross-module dependencies this is a problem, and I'd rather not create a multitude of tiny additional modules for each webservice.
I was looking at using SourceSets to split out the webservice annotated classes within a module and allow them to be picked out individually for the webservice build. So for example:
ModuleB (depends upon ModuleA)
I'd like to be able to create a ModuleA.war that contains classes from both ModuleA/src and ModuleA/webservice/src
and a ModuleB.war that contains classes from ModuleB/src, ModuleB/webservice/src and ModuleA/src.
I've tried customizing our build scripts using SourceSets and adjustments to the new war section that was added, here's the snippet: