Merge changes from topic "system-api"
* changes: Fix build error Add LOCAL_SDK_VERSION := system_$(VER)
This commit is contained in:
commit
6e4e9f32ec
14 changed files with 85 additions and 13 deletions
|
@ -86,6 +86,7 @@ $(call pretty-error,Only one of LOCAL_PROPRIETARY_MODULE[$(LOCAL_PROPRIETARY_MOD
|
|||
endif
|
||||
|
||||
include $(BUILD_SYSTEM)/local_vndk.mk
|
||||
include $(BUILD_SYSTEM)/local_vsdk.mk
|
||||
|
||||
my_module_tags := $(LOCAL_MODULE_TAGS)
|
||||
ifeq ($(my_host_cross),true)
|
||||
|
|
|
@ -806,7 +806,7 @@ else
|
|||
ifneq (,$(LOCAL_SDK_VERSION))
|
||||
# Set target-api for LOCAL_SDK_VERSIONs other than current.
|
||||
ifneq (,$(filter-out current system_current test_current, $(LOCAL_SDK_VERSION)))
|
||||
renderscript_target_api := $(LOCAL_SDK_VERSION)
|
||||
renderscript_target_api := $(call get-numeric-sdk-version,$(LOCAL_SDK_VERSION))
|
||||
endif
|
||||
endif # LOCAL_SDK_VERSION is set
|
||||
endif # LOCAL_RENDERSCRIPT_TARGET_API is set
|
||||
|
|
|
@ -875,6 +875,11 @@ TARGET_AVAILABLE_SDK_VERSIONS := $(call numerically_sort,\
|
|||
$(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/android.jar,%, \
|
||||
$(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/android.jar)))
|
||||
|
||||
TARGET_AVAILABLE_SDK_VERSIONS := $(addprefix system_,$(call numerically_sort,\
|
||||
$(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/android_system.jar,%, \
|
||||
$(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/android_system.jar)))) \
|
||||
$(TARGET_AVAILABLE_SDK_VERSIONS)
|
||||
|
||||
# We don't have prebuilt test_current SDK yet.
|
||||
TARGET_AVAILABLE_SDK_VERSIONS := test_current $(TARGET_AVAILABLE_SDK_VERSIONS)
|
||||
|
||||
|
|
|
@ -3386,3 +3386,22 @@ $(foreach source,$(ENFORCE_RRO_SOURCES), \
|
|||
$(eval ALL_MODULES.$(enforce_rro_source_module).REQUIRED += $(enforce_rro_module)) \
|
||||
)
|
||||
endef
|
||||
|
||||
###########################################################
|
||||
## Find system_$(VER) in LOCAL_SDK_VERSION
|
||||
##
|
||||
## $(1): LOCAL_SDK_VERSION
|
||||
###########################################################
|
||||
define has-system-sdk-version
|
||||
$(filter system_%,$(1))
|
||||
endef
|
||||
|
||||
###########################################################
|
||||
## Get numerical version in LOCAL_SDK_VERSION
|
||||
##
|
||||
## $(1): LOCAL_SDK_VERSION
|
||||
###########################################################
|
||||
define get-numeric-sdk-version
|
||||
$(filter-out current,\
|
||||
$(if $(call has-system-sdk-version,$(1)),$(patsubst system_%,%,$(1)),$(1)))
|
||||
endef
|
||||
|
|
|
@ -19,7 +19,7 @@ $(built_dpi_apk): PRIVATE_ASSET_DIR := $(LOCAL_ASSET_DIR)
|
|||
$(built_dpi_apk): PRIVATE_AAPT_INCLUDES := $(all_library_res_package_exports)
|
||||
$(built_dpi_apk): PRIVATE_RESOURCE_LIST := $(all_res_assets)
|
||||
ifneq (,$(filter-out current system_current test_current, $(LOCAL_SDK_VERSION)))
|
||||
$(built_dpi_apk): PRIVATE_DEFAULT_APP_TARGET_SDK := $(LOCAL_SDK_VERSION)
|
||||
$(built_dpi_apk): PRIVATE_DEFAULT_APP_TARGET_SDK := $(call get-numeric-sdk-version,$(LOCAL_SDK_VERSION))
|
||||
else
|
||||
$(built_dpi_apk): PRIVATE_DEFAULT_APP_TARGET_SDK := $(DEFAULT_APP_TARGET_SDK)
|
||||
endif
|
||||
|
|
|
@ -72,8 +72,18 @@ ifneq ($(LOCAL_SDK_VERSION),)
|
|||
LOCAL_JAVA_LIBRARIES := android_test_stubs_current $(LOCAL_JAVA_LIBRARIES)
|
||||
$(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, android_test_stubs_current)
|
||||
else
|
||||
LOCAL_JAVA_LIBRARIES := sdk_v$(LOCAL_SDK_VERSION) $(LOCAL_JAVA_LIBRARIES)
|
||||
$(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, sdk_v$(LOCAL_SDK_VERSION))
|
||||
ifneq (,$(call has-system-sdk-version,$(LOCAL_SDK_VERSION)))
|
||||
ifeq (,$(TARGET_BUILD_APPS))
|
||||
LOCAL_JAVA_LIBRARIES := system_sdk_v$(call get-numeric-sdk-version,$(LOCAL_SDK_VERSION)) $(LOCAL_JAVA_LIBRARIES)
|
||||
$(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, system_sdk_v$(call get-numeric-sdk-version,$(LOCAL_SDK_VERSION)))
|
||||
else
|
||||
LOCAL_JAVA_LIBRARIES := sdk_v$(LOCAL_SDK_VERSION) $(LOCAL_JAVA_LIBRARIES)
|
||||
$(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, sdk_v$(LOCAL_SDK_VERSION))
|
||||
endif
|
||||
else
|
||||
LOCAL_JAVA_LIBRARIES := sdk_v$(LOCAL_SDK_VERSION) $(LOCAL_JAVA_LIBRARIES)
|
||||
$(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, sdk_v$(LOCAL_SDK_VERSION))
|
||||
endif
|
||||
endif
|
||||
else
|
||||
LOCAL_JAVA_LIBRARIES := core-oj core-libart ext framework $(LOCAL_JAVA_LIBRARIES)
|
||||
|
|
|
@ -186,8 +186,8 @@ $(LOCAL_BUILT_MODULE): $(built_dex) $(java_resource_sources)
|
|||
endif # !LOCAL_IS_STATIC_JAVA_LIBRARY
|
||||
|
||||
ifneq (,$(filter-out current system_current test_current, $(LOCAL_SDK_VERSION)))
|
||||
my_default_app_target_sdk := $(LOCAL_SDK_VERSION)
|
||||
my_sdk_version := $(LOCAL_SDK_VERSION)
|
||||
my_default_app_target_sdk := $(call get-numeric-sdk-version,$(LOCAL_SDK_VERSION))
|
||||
my_sdk_version := $(call get-numeric-sdk-version,$(LOCAL_SDK_VERSION))
|
||||
else
|
||||
my_default_app_target_sdk := $(DEFAULT_APP_TARGET_SDK)
|
||||
my_sdk_version := $(PLATFORM_SDK_VERSION)
|
||||
|
|
|
@ -135,7 +135,7 @@ else
|
|||
ifneq (,$(LOCAL_SDK_VERSION))
|
||||
# Set target-api for LOCAL_SDK_VERSIONs other than current.
|
||||
ifneq (,$(filter-out current system_current test_current, $(LOCAL_SDK_VERSION)))
|
||||
renderscript_target_api := $(LOCAL_SDK_VERSION)
|
||||
renderscript_target_api := $(call get-numeric-sdk-version,$(LOCAL_SDK_VERSION))
|
||||
endif
|
||||
endif # LOCAL_SDK_VERSION is set
|
||||
endif # LOCAL_RENDERSCRIPT_TARGET_API is set
|
||||
|
@ -801,8 +801,8 @@ $(LOCAL_MODULE)-findbugs : $(findbugs_html)
|
|||
endif # full_classes_jar is defined
|
||||
|
||||
ifneq (,$(filter-out current system_current test_current, $(LOCAL_SDK_VERSION)))
|
||||
my_default_app_target_sdk := $(LOCAL_SDK_VERSION)
|
||||
my_sdk_version := $(LOCAL_SDK_VERSION)
|
||||
my_default_app_target_sdk := $(call get-numeric-sdk-version,$(LOCAL_SDK_VERSION))
|
||||
my_sdk_version := $(call get-numeric-sdk-version,$(LOCAL_SDK_VERSION))
|
||||
else
|
||||
my_default_app_target_sdk := $(DEFAULT_APP_TARGET_SDK)
|
||||
my_sdk_version := $(PLATFORM_SDK_VERSION)
|
||||
|
|
|
@ -229,8 +229,16 @@ ifndef LOCAL_IS_HOST_MODULE
|
|||
else ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),test_current)
|
||||
full_java_bootclasspath_libs := $(call java-lib-header-files,android_test_stubs_current)
|
||||
else
|
||||
full_java_bootclasspath_libs := $(call java-lib-header-files,sdk_v$(LOCAL_SDK_VERSION))
|
||||
endif # current, system_current, or test_current
|
||||
ifneq (,$(call has-system-sdk-version,$(LOCAL_SDK_VERSION)))
|
||||
ifeq (,$(TARGET_BUILD_APPS))
|
||||
full_java_bootclasspath_libs := $(call java-lib-header-files,system_sdk_v$(call get-numeric-sdk-version,$(LOCAL_SDK_VERSION)))
|
||||
else
|
||||
full_java_bootclasspath_libs := $(call java-lib-header-files,sdk_v$(LOCAL_SDK_VERSION))
|
||||
endif
|
||||
else
|
||||
full_java_bootclasspath_libs := $(call java-lib-header-files,sdk_v$(LOCAL_SDK_VERSION))
|
||||
endif
|
||||
endif # current, system_current, system_${VER} or test_current
|
||||
endif # LOCAL_SDK_VERSION
|
||||
|
||||
ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
||||
|
@ -404,6 +412,10 @@ ifeq ($(LOCAL_SDK_VERSION),system_current)
|
|||
my_link_type := java:system
|
||||
my_warn_types := java:platform
|
||||
my_allowed_types := java:sdk java:system
|
||||
else ifneq (,$(call has-system-sdk-version,$(LOCAL_SDK_VERSION)))
|
||||
my_link_type := java:system
|
||||
my_warn_types := java:platform
|
||||
my_allowed_types := java:sdk java:system
|
||||
else ifneq ($(LOCAL_SDK_VERSION),)
|
||||
my_link_type := java:sdk
|
||||
my_warn_types := java:system java:platform
|
||||
|
|
19
core/local_vsdk.mk
Normal file
19
core/local_vsdk.mk
Normal file
|
@ -0,0 +1,19 @@
|
|||
|
||||
ifdef BOARD_VSDK_VERSION
|
||||
# Set LOCAL_SDK_VERSION to system_current, If LOCAL_SDK_VERSION is not defined and LOCAL_VENDOR_MODULE is true
|
||||
_is_vendor_app :=
|
||||
ifneq (,$(filter true,$(LOCAL_VENDOR_MODULE) $(LOCAL_ODM_MODULE) $(LOCAL_OEM_MODULE) $(LOCAL_PROPRIETARY_MODULE)))
|
||||
_is_vendor_app := true
|
||||
else
|
||||
ifneq (,$(filter $(TARGET_OUT_VENDOR)%,$(LOCAL_MODULE_PATH) $(LOCAL_MODULE_PATH_32) $(LOCAL_MODULE_PATH_64)))
|
||||
_is_vendor_app := true
|
||||
endif
|
||||
endif
|
||||
ifneq (,$(filter JAVA_LIBRARIES APPS,$(LOCAL_MODULE_CLASS)))
|
||||
ifndef LOCAL_SDK_VERSION
|
||||
ifeq ($(_is_vendor_app),true)
|
||||
LOCAL_SDK_VERSION := system_current
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
|
@ -365,7 +365,7 @@ else
|
|||
ifneq (,$(LOCAL_SDK_VERSION))
|
||||
# Set target-api for LOCAL_SDK_VERSIONs other than current.
|
||||
ifneq (,$(filter-out current system_current test_current, $(LOCAL_SDK_VERSION)))
|
||||
renderscript_target_api := $(LOCAL_SDK_VERSION)
|
||||
renderscript_target_api := $(call get-numeric-sdk-version,$(LOCAL_SDK_VERSION))
|
||||
endif
|
||||
endif # LOCAL_SDK_VERSION is set
|
||||
endif # LOCAL_RENDERSCRIPT_TARGET_API is set
|
||||
|
|
|
@ -500,6 +500,8 @@ $(common_classes_jar) $(common_classes_pre_proguard_jar) $(common_javalib_jar):
|
|||
|
||||
ifeq ($(LOCAL_SDK_VERSION),system_current)
|
||||
my_link_type := java:system
|
||||
else ifneq (,$(call has-system-sdk-version,$(LOCAL_SDK_VERSION)))
|
||||
my_link_type := java:system
|
||||
else ifneq ($(LOCAL_SDK_VERSION),)
|
||||
my_link_type := java:sdk
|
||||
else
|
||||
|
|
|
@ -81,6 +81,10 @@ ifeq ($(LOCAL_SDK_VERSION),system_current)
|
|||
my_link_type := java:system
|
||||
my_warn_types := java:platform
|
||||
my_allowed_types := java:sdk java:system
|
||||
else ifneq (,$(call has-system-sdk-version,$(LOCAL_SDK_VERSION)))
|
||||
my_link_type := java:system
|
||||
my_warn_types := java:platform
|
||||
my_allowed_types := java:sdk java:system
|
||||
else ifneq ($(LOCAL_SDK_VERSION),)
|
||||
my_link_type := java:sdk
|
||||
my_warn_types := java:system java:platform
|
||||
|
|
|
@ -150,7 +150,7 @@ else
|
|||
ifneq (,$(LOCAL_SDK_VERSION))
|
||||
# Set target-api for LOCAL_SDK_VERSIONs other than current.
|
||||
ifneq (,$(filter-out current system_current test_current, $(LOCAL_SDK_VERSION)))
|
||||
renderscript_target_api := $(LOCAL_SDK_VERSION)
|
||||
renderscript_target_api := $(call get-numeric-sdk-version,$(LOCAL_SDK_VERSION))
|
||||
endif
|
||||
endif # LOCAL_SDK_VERSION is set
|
||||
endif # LOCAL_RENDERSCRIPT_TARGET_API is set
|
||||
|
|
Loading…
Reference in a new issue