C++ how to build 32 and 64 bit targets in one fell swoop

I am working with gradle and c++. I have a simple library I am trying to build and need to build both 32 bit and 64 bit versions. I am able to make my build.gradle script build either a 32 bit lib or a 64 bit lib, but not both in one build.

Does anyone have a simple build.gradle file that builds a simple library with two targets? I think one of my complications is that I have a different dependency for the 32 bit library than I do for the 64 bit library. This seems like a common and trivial problem, but I have worked on it for over a day with no results.