Different bootclasspath for droiddoc.

- If it's host module, don't set bootclasspath;
- If it's arget module,
  - It can build against the API stubs;
  - It can build against a historical SDK version;
  - It can build against core.jar

Change-Id: Id1ec3ba624bc38068b206ad7173f4facf590e021
This commit is contained in:
Ying Wang 2014-04-07 15:14:50 -07:00
parent f122d41b75
commit 584d8adbea
1 changed files with 6 additions and 4 deletions

View File

@ -51,20 +51,22 @@ ifeq ($(LOCAL_DROIDDOC_CUSTOM_ASSET_DIR),)
LOCAL_DROIDDOC_CUSTOM_ASSET_DIR := assets
endif
$(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, core)
ifneq ($(LOCAL_IS_HOST_MODULE),true)
ifeq ($(LOCAL_IS_HOST_MODULE),true)
$(full_target): PRIVATE_BOOTCLASSPATH :=
else
ifneq ($(LOCAL_SDK_VERSION),)
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)
$(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, android_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))
endif
else
LOCAL_JAVA_LIBRARIES := core ext framework framework2 $(LOCAL_JAVA_LIBRARIES)
$(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, core)
endif # LOCAL_SDK_VERSION
LOCAL_JAVA_LIBRARIES := $(sort $(LOCAL_JAVA_LIBRARIES))