diff --git a/core/soong_config.mk b/core/soong_config.mk index 3cffef2538..534270e308 100644 --- a/core/soong_config.mk +++ b/core/soong_config.mk @@ -52,8 +52,6 @@ $(call add_json_str, Platform_version_known_codenames, $(PLATFORM_VERSION_KNOW $(call add_json_bool, Release_aidl_use_unfrozen, $(RELEASE_AIDL_USE_UNFROZEN)) -$(call add_json_str, Platform_min_supported_target_sdk_version, $(PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION)) - $(call add_json_bool, Allow_missing_dependencies, $(filter true,$(ALLOW_MISSING_DEPENDENCIES))) $(call add_json_bool, Unbundled_build, $(TARGET_BUILD_UNBUNDLED)) $(call add_json_list, Unbundled_build_apps, $(TARGET_BUILD_APPS)) diff --git a/core/version_util.mk b/core/version_util.mk index 610cdaf107..eb568becc4 100644 --- a/core/version_util.mk +++ b/core/version_util.mk @@ -221,10 +221,8 @@ ifndef HAS_BUILD_NUMBER endif .KATI_READONLY := HAS_BUILD_NUMBER -ifndef PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION - # Used to set minimum supported target sdk version. Apps targeting sdk - # version lower than the set value will result in a warning being shown - # when any activity from the app is started. - PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION := 28 +ifdef PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION + $(error Do not set PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION directly. Use RELEASE_PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION. value: $(PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION)) endif +PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION := $(RELEASE_PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION) .KATI_READONLY := PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION