Merge pull request #18 from petefoth/pf-fix-broken-18-builds
Use the `math_gt_or_eq` conditional to fix pre-19.1 builds
diff --git a/GmsCore/Android.mk b/GmsCore/Android.mk
index 8bdc8b3..4e63729 100644
--- a/GmsCore/Android.mk
+++ b/GmsCore/Android.mk
@@ -30,8 +30,10 @@
LOCAL_CERTIFICATE := PRESIGNED
LOCAL_OVERRIDES_PACKAGES := com.qualcomm.location
LOCAL_REQUIRED_MODULES := privapp-permissions-com.google.android.gms.xml default-permissions-com.google.android.gms.xml sysconfig-com.google.android.gms.xml
-LOCAL_PRODUCT_MODULE := true
+# these lines will break builds before 19.1 so make them conditional
+ifneq ($(call math_gt_or_eq, $(PLATFORM_SDK_VERSION), 31),)
LOCAL_USES_LIBRARIES := com.android.location.provider
LOCAL_OPTIONAL_USES_LIBRARIES := androidx.window.extensions androidx.window.sidecar
+endif
+LOCAL_PRODUCT_MODULE := true
include $(BUILD_PREBUILT)
-