CB-7512 Speed up gradle builds by building debug or release (not both)
Merge branch 'master' into 4.0.x (gradle debug v release)