I needed to wrap a maven build with gradle. Bad idea, right, got it, understood. However, I have a large number of code bases that use gradle already, and some that still use maven. I have a set of gradle tools that do all my branching, deployments, and a lot of cool stuff. I want to leverage this for my maven projects too.
My top level task is "deb", as I'm building debian packages. My boilerplate infrastructure tasks depend on "deb" so regardless of how each project implements it, it works, regardless of the underlying build infrastructure, maven, make, ant, whatever. Each project just needs to define a "deb" task and make it dependent on whatever is needed to build the output debian packages. That way the infrastructure gradle scripts don't care about the specific project implementation.
My main question is, how to generate the dependencies within gradle such that I wasn't building unnecessarily.