From 00de8c5d7a16d8b0c61badba1188e4b8e087ef67 Mon Sep 17 00:00:00 2001 From: "smain@google.com" Date: Mon, 7 Mar 2016 18:38:08 -0800 Subject: [PATCH] cherrypick I4e1ca9fddc6374fd80108e4f9a3b9745f8598507 add new make target for offline docs with only the API reference. Also update the default index.html landing page to redirect to the reference. Change-Id: I2a123e49e2d6bb365bd81383ca3a9fc8e03de034 --- Android.mk | 36 +++++++++++++++++++++++++++ docs/docs-documentation-redirect.html | 4 +-- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/Android.mk b/Android.mk index 08f34688fb51a..9dd325aa95877 100644 --- a/Android.mk +++ b/Android.mk @@ -1044,6 +1044,42 @@ $(static_doc_index_redirect): \ $(full_target): $(static_doc_index_redirect) $(full_target): $(framework_built) +# ==== static html in the sdk, reference only =============================== +include $(CLEAR_VARS) + +LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) +LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES) +LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES) +LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS) +LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH) +LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR) +LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR) +LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) + +LOCAL_MODULE := offline-refonly + +LOCAL_DROIDDOC_OPTIONS:=\ + $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ + -offlinemode \ + -title "Android SDK" \ + -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \ + -sdkvalues $(OUT_DOCS) \ + -hdf android.whichdoc offline \ + -referenceonly + +LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk-refonly + +include $(BUILD_DROIDDOC) + +static_doc_index_redirect := $(out_dir)/index.html +$(static_doc_index_redirect): \ + $(LOCAL_PATH)/docs/docs-documentation-redirect.html | $(ACP) + $(hide) mkdir -p $(dir $@) + $(hide) $(ACP) $< $@ + +$(full_target): $(static_doc_index_redirect) +$(full_target): $(framework_built) + # ==== docs for the web (on the androiddevdocs app engine server) ======================= include $(CLEAR_VARS) diff --git a/docs/docs-documentation-redirect.html b/docs/docs-documentation-redirect.html index 98a265e87665e..dbdf8b45acea9 100644 --- a/docs/docs-documentation-redirect.html +++ b/docs/docs-documentation-redirect.html @@ -1,9 +1,9 @@ - + -click here if you are not redirected +click here if you are not redirected