How to build debug and release versions with one build.gradle file - C++

Is there an easy way to build both debug and release c++ libraries with gradle?

I am on Linux, in case that is important.

Thanks for any insight/help you can provide!