Add new make variables for extension SDK version

- PLATFORM_SDK_EXTENSION_VERSION is the sdk extension version of the
  tree
- PLATFORM_BASE_SDK_EXTENSION_VERSION is the sdk extension version that
  PLATFORM_SDK_VERSION ships with.

Also propagate PLATFORM_SDK_EXTENSION_VERSION to soong to that it can be
used in genrules.

Bug: 195281582
Test: via development/ CL in this topic
Change-Id: Ib078a922e9bd9bc6ae82ab74feaeb743703a64b8
Merged-In: Ib078a922e9bd9bc6ae82ab74feaeb743703a64b8
(cherry picked from commit ee524aa4f7bae2cc4d32eec3689aecf3e766dec4)
diff --git a/core/soong_config.mk b/core/soong_config.mk
index 66cd47e..e0fd9be 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -27,6 +27,7 @@
 $(call add_json_val,  Platform_sdk_version,              $(PLATFORM_SDK_VERSION))
 $(call add_json_str,  Platform_sdk_codename,             $(PLATFORM_VERSION_CODENAME))
 $(call add_json_bool, Platform_sdk_final,                $(filter REL,$(PLATFORM_VERSION_CODENAME)))
+$(call add_json_val,  Platform_sdk_extension_version,    $(PLATFORM_SDK_EXTENSION_VERSION))
 $(call add_json_csv,  Platform_version_active_codenames, $(PLATFORM_VERSION_ALL_CODENAMES))
 $(call add_json_str,  Platform_security_patch,           $(PLATFORM_SECURITY_PATCH))
 $(call add_json_str,  Platform_preview_sdk_version,      $(PLATFORM_PREVIEW_SDK_VERSION))
diff --git a/core/version_defaults.mk b/core/version_defaults.mk
index 85f63c9..b4329f7 100644
--- a/core/version_defaults.mk
+++ b/core/version_defaults.mk
@@ -155,6 +155,12 @@
 endif
 .KATI_READONLY := PLATFORM_SDK_VERSION
 
+# This is the sdk extension version of this tree.
+PLATFORM_SDK_EXTENSION_VERSION :=$= 1
+
+# This is the sdk extension version that PLATFORM_SDK_VERSION ships with.
+PLATFORM_BASE_SDK_EXTENSION_VERSION :=$= 0
+
 ifeq (REL,$(PLATFORM_VERSION_CODENAME))
   PLATFORM_PREVIEW_SDK_VERSION := 0
 else