Add support for the gradle build system

I also fixed the way the android-mode-builder custom variable worked.  It previously broke things when customized.