OSDN Git Service

Federate platform docs against support library API file
authorAlan Viverette <alanv@google.com>
Wed, 5 Apr 2017 14:21:58 +0000 (10:21 -0400)
committerXin Li <delphij@google.com>
Tue, 31 Oct 2017 16:25:06 +0000 (09:25 -0700)
Bug: 36959367
Test: make docs
Change-Id: I7c6dffed25566c2bb1183aba60103c437888ba21

Android.mk

index 14819d9..4e036b5 100644 (file)
@@ -906,8 +906,7 @@ endef
 # FRAMEWORKS_BASE_SUBDIRS comes from build/core/pathmap.mk
 dirs_to_document := \
        $(dirs_to_check_apis) \
-  $(addprefix ../../, $(FRAMEWORKS_DATA_BINDING_JAVA_SRC_DIRS)) \
-  $(addprefix ../../, $(FRAMEWORKS_SUPPORT_JAVA_SRC_DIRS)) \
+       $(addprefix ../../, $(FRAMEWORKS_DATA_BINDING_JAVA_SRC_DIRS))
 
 patterns_to_not_document := \
        $(call find-no-docs-pattern, $(dirs_to_document))
@@ -956,6 +955,8 @@ framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES := \
        framework \
        voip-common
 
+# Platform docs can refer to Support Library APIs, but we don't actually build
+# them as part of the docs target, so we need to include them on the classpath.
 framework_docs_LOCAL_JAVA_LIBRARIES := \
        $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES) \
        $(FRAMEWORKS_SUPPORT_JAVA_LIBRARIES)
@@ -1002,16 +1003,11 @@ framework_docs_LOCAL_DROIDDOC_OPTIONS := \
     -werror -hide 111 -hide 113 -hide 121 \
     -overview $(LOCAL_PATH)/core/java/overview.html \
 
-# Allow the support library to add its own droiddoc options.
-include $(LOCAL_PATH)/../support/droiddoc.mk
-
 framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR:= \
        $(call intermediates-dir-for,JAVA_LIBRARIES,framework,,COMMON)
 
 framework_docs_LOCAL_ADDITIONAL_JAVA_DIR:= \
-       $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR) \
-       $(foreach lib,$(FRAMEWORKS_SUPPORT_JAVA_LIBRARIES),$(call intermediates-dir-for,JAVA_LIBRARIES,$(lib),,COMMON)) \
-       $(foreach lib,$(FRAMEWORKS_SUPPORT_JAVA_LIBRARIES),$(call intermediates-dir-for,JAVA_LIBRARIES,$(lib)-res,,COMMON))
+       $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
 
 framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES := \
     frameworks/base/docs/knowntags.txt \
@@ -1054,6 +1050,11 @@ framework_docs_LOCAL_DROIDDOC_OPTIONS += \
                -resourcesdir $(LOCAL_PATH)/docs/html/reference/images/ \
                -resourcesoutdir reference/android/images/
 
+# Federate Support Library references against local API file.
+framework_docs_LOCAL_DROIDDOC_OPTIONS += \
+               -federate SupportLib https://developer.android.com \
+               -federationapi SupportLib prebuilts/sdk/current/support-api.txt
+
 # ====  the api stubs and current.xml ===========================
 include $(CLEAR_VARS)