forked from openkylin/platform_build
Update make rules to use new android.jar location.
This file has been copied into a 'public' subdir. Use that, so that the old file can be deleted. Also introduce a new macro to avoid duplicating this path in a bunch of places. Bug: 77525052 Test: m checkbuild Change-Id: Ifcf59c6fb357769b2765e417c8dd56d2ad9b97aa
This commit is contained in:
parent
5f7e4f6bbf
commit
66d47b884e
|
@ -960,6 +960,10 @@ else
|
|||
SUPPORT_LIBRARY_ROOT := frameworks/support
|
||||
endif
|
||||
|
||||
get-sdk-version = $(if $(findstring _,$(1)),$(subst core_,,$(subst system_,,$(subst test_,,$(1)))),$(1))
|
||||
get-sdk-api = $(if $(findstring _,$(1)),$(patsubst %_$(call get-sdk-version,$(1)),%,$(1)),public)
|
||||
get-prebuilt-sdk-dir = $(HISTORICAL_SDK_VERSIONS_ROOT)/$(call get-sdk-version,$(1))/$(call get-sdk-api,$(1))
|
||||
|
||||
# Resolve LOCAL_SDK_VERSION to prebuilt module name, e.g.:
|
||||
# 23 -> sdk_public_23_android
|
||||
# system_current -> sdk_system_current_android
|
||||
|
@ -971,11 +975,13 @@ $(if $(findstring _,$(1)),\
|
|||
sdk_public_$(1)_$(or $(2),android))
|
||||
endef
|
||||
|
||||
# Resolve LOCAL_SDK_VERSION to prebuilt android.jar
|
||||
# $(1): LOCAL_SDK_VERSION
|
||||
resolve-prebuilt-sdk-jar-path = $(call get-prebuilt-sdk-dir,$(1))/android.jar
|
||||
|
||||
# Resolve LOCAL_SDK_VERSION to prebuilt framework.aidl
|
||||
# $(1): An sdk version (LOCAL_SDK_VERSION)
|
||||
define resolve-prebuilt-aidl-path
|
||||
$(HISTORICAL_SDK_VERSIONS_ROOT)/$(subst core_,,$(subst system_,,$(subst test_,,$(1))))/public/framework.aidl
|
||||
endef
|
||||
resolve-prebuilt-sdk-aidl-path = $(call get-prebuilt-sdk-dir,$(call get-sdk-version,$(1)))/framework.aidl
|
||||
|
||||
# Historical SDK version N is stored in $(HISTORICAL_SDK_VERSIONS_ROOT)/N.
|
||||
# The 'current' version is whatever this source tree is.
|
||||
|
|
|
@ -120,7 +120,7 @@ ifneq ($(filter current system_current test_current core_current, $(LOCAL_SDK_VE
|
|||
# LOCAL_SDK_VERSION is current and no TARGET_BUILD_APPS
|
||||
aidl_preprocess_import := $(TARGET_OUT_COMMON_INTERMEDIATES)/framework.aidl
|
||||
else
|
||||
aidl_preprocess_import := $(call resolve-prebuilt-aidl-path,$(LOCAL_SDK_VERSION))
|
||||
aidl_preprocess_import := $(call resolve-prebuilt-sdk-aidl-path,$(LOCAL_SDK_VERSION))
|
||||
endif # not current or system_current
|
||||
else
|
||||
# build against the platform.
|
||||
|
|
|
@ -486,7 +486,7 @@ ifeq ($(LOCAL_SDK_RES_VERSION),core_current)
|
|||
else ifneq ($(filter-out current system_current test_current,$(LOCAL_SDK_RES_VERSION))$(if $(TARGET_BUILD_APPS),$(filter current system_current test_current,$(LOCAL_SDK_RES_VERSION))),)
|
||||
# for released sdk versions, the platform resources were built into android.jar.
|
||||
framework_res_package_export := \
|
||||
$(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_RES_VERSION)/android.jar
|
||||
$(call resolve-prebuilt-sdk-jar-path,$(LOCAL_SDK_RES_VERSION))
|
||||
else # LOCAL_SDK_RES_VERSION
|
||||
framework_res_package_export := \
|
||||
$(call intermediates-dir-for,APPS,framework-res,,COMMON)/package-export.apk
|
||||
|
|
|
@ -627,7 +627,7 @@ framework_res_package_export :=
|
|||
ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
||||
ifneq ($(filter-out current system_current test_current,$(LOCAL_SDK_RES_VERSION))$(if $(TARGET_BUILD_APPS),$(filter current system_current test_current,$(LOCAL_SDK_RES_VERSION))),)
|
||||
framework_res_package_export := \
|
||||
$(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_RES_VERSION)/android.jar
|
||||
$(call resolve-prebuilt-sdk-jar-path,$(LOCAL_SDK_RES_VERSION))
|
||||
else
|
||||
framework_res_package_export := \
|
||||
$(call intermediates-dir-for,APPS,framework-res,,COMMON)/package-export.apk
|
||||
|
|
|
@ -107,7 +107,7 @@ framework_res_package_export :=
|
|||
ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
||||
ifneq ($(filter-out current system_current test_current,$(LOCAL_SDK_RES_VERSION))$(if $(TARGET_BUILD_APPS),$(filter current system_current test_current,$(LOCAL_SDK_RES_VERSION))),)
|
||||
framework_res_package_export := \
|
||||
$(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_RES_VERSION)/android.jar
|
||||
$(call resolve-prebuilt-sdk-jar-path,$(LOCAL_SDK_RES_VERSION))
|
||||
else
|
||||
framework_res_package_export := \
|
||||
$(call intermediates-dir-for,APPS,framework-res,,COMMON)/package-export.apk
|
||||
|
|
Loading…
Reference in New Issue