What is the best way to build all modules under a folder? For a simplified example, given the following settings.gradle:
include ‘:foo:bar’ include ‘:foo:bar2’ include ‘:foo:bar3’ include ‘:other:other1’ include ‘:other:other2’ …
I want to build everything under ‘foo’, while ignoring things under ‘other’ (unless they are dependencies of course, which is fine).
I am looking for something along the lines of "gradle :foo::mytask" or “gradle :foo:mytask” I don’t want to explicitly list out all of the :foo: things. The point of this is we have a build server which is set to build everything under foo (explicitly listing the modules right now). When we add a new module under foo, the build server configuration needs updated, and other people on another branch will instantly break since they don’t have that module yet.
The only thing I can think of is to make ‘foo’ a module itself, which is basically an empty build.gradle with task-passthrough to the modules underneath it.
Any thoughts on a better solution? Thanks!