move helper function to ext in build.gradle

Signed-off-by: Rob Gallagher <rgallagher@pivotallabs.com>