build: envsetup: export additional GMS defaults

Check if vendor/partner_gms exists and export GMS defaults.

Change-Id: Ia0e30f751cb6613ba1b731e87ecd79dca1d1049b
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
diff --git a/build/envsetup.sh b/build/envsetup.sh
index 448f61d..bb9b132 100644
--- a/build/envsetup.sh
+++ b/build/envsetup.sh
@@ -29,6 +29,13 @@
     export SHIFT_BUILD_IS_BETA=true
 }
 
+# Check if PARTNER_GMS exists
+_PARTNER_GMS_EXISTING=$([ -d "vendor/partner_gms" ] && echo true || echo false)
+
 # set GMS property if not specified
-: ${SHIFT_BUILD_WITH_GMS:=true}
+: ${BUILD_GMS:=$_PARTNER_GMS_EXISTING}
+: ${SHIFT_BUILD_WITH_GMS:=$_PARTNER_GMS_EXISTING}
+: ${WITH_GMS:=$_PARTNER_GMS_EXISTING}
+export BUILD_GMS
 export SHIFT_BUILD_WITH_GMS
+export WITH_GMS