Support to build against prebuilt current SDK in unbundled branch
Bug: 6465084 With this change and prebuilt current SDK checked in, you can build unbundled apps with LOCAL_SDK_VERSION current in an unbundled branch. Change-Id: I4efcee611d08a3a903bd6bf5a80de11500564206
This commit is contained in:
parent
0c5db81fb2
commit
0ec188f1c1
5 changed files with 12 additions and 7 deletions
|
@ -226,7 +226,8 @@ endif
|
|||
aidl_preprocess_import :=
|
||||
LOCAL_SDK_VERSION:=$(strip $(LOCAL_SDK_VERSION))
|
||||
ifdef LOCAL_SDK_VERSION
|
||||
ifeq ($(LOCAL_SDK_VERSION),current)
|
||||
ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),current)
|
||||
# LOCAL_SDK_VERSION is current and no TARGET_BUILD_APPS
|
||||
aidl_preprocess_import := $(TARGET_OUT_COMMON_INTERMEDIATES)/framework.aidl
|
||||
else
|
||||
aidl_preprocess_import := $(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_VERSION)/framework.aidl
|
||||
|
@ -399,7 +400,8 @@ ifeq ($(my_prefix),TARGET_)
|
|||
ifeq ($(LOCAL_SDK_VERSION),)
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(call java-lib-files,core)
|
||||
else
|
||||
ifeq ($(LOCAL_SDK_VERSION),current)
|
||||
ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),current)
|
||||
# LOCAL_SDK_VERSION is current and no TARGET_BUILD_APPS.
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(call java-lib-files,android_stubs_current)
|
||||
else
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(call java-lib-files,sdk_v$(LOCAL_SDK_VERSION))
|
||||
|
|
|
@ -64,7 +64,8 @@ endif
|
|||
ifneq ($(LOCAL_IS_HOST_MODULE),true)
|
||||
|
||||
ifneq ($(LOCAL_SDK_VERSION),)
|
||||
ifeq ($(LOCAL_SDK_VERSION),current)
|
||||
ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),current)
|
||||
# Use android_stubs_current if LOCAL_SDK_VERSION is current and no TARGET_BUILD_APPS.
|
||||
LOCAL_JAVA_LIBRARIES := android_stubs_current $(LOCAL_JAVA_LIBRARIES)
|
||||
else
|
||||
LOCAL_JAVA_LIBRARIES := sdk_v$(LOCAL_SDK_VERSION) $(LOCAL_JAVA_LIBRARIES)
|
||||
|
|
|
@ -28,7 +28,8 @@ ifneq ($(LOCAL_SDK_VERSION),)
|
|||
$(error $(LOCAL_PATH): Invalid LOCAL_SDK_VERSION '$(LOCAL_SDK_VERSION)' \
|
||||
Choices are: $(TARGET_AVAILABLE_SDK_VERSIONS))
|
||||
else
|
||||
ifeq ($(LOCAL_SDK_VERSION),current)
|
||||
ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),current)
|
||||
# Use android_stubs_current if LOCAL_SDK_VERSION is current and no TARGET_BUILD_APPS.
|
||||
LOCAL_JAVA_LIBRARIES := android_stubs_current $(LOCAL_JAVA_LIBRARIES)
|
||||
else
|
||||
LOCAL_JAVA_LIBRARIES := sdk_v$(LOCAL_SDK_VERSION) $(LOCAL_JAVA_LIBRARIES)
|
||||
|
@ -166,7 +167,8 @@ renderscript_flags := -Wall -Werror
|
|||
renderscript_flags += $(LOCAL_RENDERSCRIPT_FLAGS)
|
||||
|
||||
# prepend the RenderScript system include path
|
||||
ifneq ($(filter-out current,$(LOCAL_SDK_VERSION)),)
|
||||
ifneq ($(filter-out current,$(LOCAL_SDK_VERSION))$(if $(TARGET_BUILD_APPS),$(filter current,$(LOCAL_SDK_VERSION))),)
|
||||
# if a numeric LOCAL_SDK_VERSION, or current LOCAL_SDK_VERSION with TARGET_BUILD_APPS
|
||||
LOCAL_RENDERSCRIPT_INCLUDES := \
|
||||
$(HISTORICAL_SDK_VERSIONS_ROOT)/renderscript/clang-include \
|
||||
$(HISTORICAL_SDK_VERSIONS_ROOT)/renderscript/include \
|
||||
|
|
|
@ -267,7 +267,7 @@ else
|
|||
# Most packages should link against the resources defined by framework-res.
|
||||
# Even if they don't have their own resources, they may use framework
|
||||
# resources.
|
||||
ifneq ($(filter-out current,$(LOCAL_SDK_RES_VERSION)),)
|
||||
ifneq ($(filter-out current,$(LOCAL_SDK_RES_VERSION))$(if $(TARGET_BUILD_APPS),$(filter 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
|
||||
|
|
|
@ -64,7 +64,7 @@ framework_res_package_export :=
|
|||
framework_res_package_export_deps :=
|
||||
# Please refer to package.mk
|
||||
ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
||||
ifneq ($(filter-out current,$(LOCAL_SDK_RES_VERSION)),)
|
||||
ifneq ($(filter-out current,$(LOCAL_SDK_RES_VERSION))$(if $(TARGET_BUILD_APPS),$(filter current,$(LOCAL_SDK_RES_VERSION))),)
|
||||
framework_res_package_export := \
|
||||
$(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_RES_VERSION)/android.jar
|
||||
framework_res_package_export_deps := $(framework_res_package_export)
|
||||
|
|
Loading…
Reference in a new issue