Don't use old VNDK and SystemSDK versions for new devices

We need to prevent vendors from using old VNDK and SystemSDK versions
for newly launched device. Otherwise, deprecating old versions of the
APIs would be really difficult.

Specifically, it is enforced that

PRODUCT_SHIPPING_API_LEVEL <= BOARD_VNDK_VERSION

PRODUCT_SHIPPING_API_LEVEL <= min(BOARD_SYSTEMSDK_VERSIONS)

Bug: 72126206
Test: manually setting BOARD_VNDK_VERSION to 24 in
device/google/wahoo/BoardConfig.mk and choosecom to walleye
Test: m -j shows an error on BOARD_VNDK_VERSION
Test: BOARD_SYSTEMSDK_VERSION="25 26" m -j shows an error on
BOARD_SYSTEMSDK_VERSION

Change-Id: I17646487a9c77a6a5110749e22ba47f0f75920cf
diff --git a/core/config.mk b/core/config.mk
index b11e9fd..f4ce3c0 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -824,6 +824,9 @@
       $(error When PRODUCT_SHIPPING_API_LEVEL >= 27, TARGET_USES_MKE2FS must be true)
     endif
   endif
+  ifneq ($(call numbers_less_than,$(PRODUCT_SHIPPING_API_LEVEL),$(BOARD_SYSTEMSDK_VERSIONS)),)
+    $(error BOARD_SYSTEMSDK_VERSIONS ($(BOARD_SYSTEMSDK_VERSIONS)) must all be greater than or equal to PRODUCT_SHIPPING_API_LEVEL ($(PRODUCT_SHIPPING_API_LEVEL)))
+  endif
 endif
 
 # The default key if not set as LOCAL_CERTIFICATE