blob: 5a2e79de52fcbbdd9ba065bc9d97e114428798b8 [file] [log] [blame]
Bart Searsa8cc0582015-05-07 03:23:20 +00001#
2# Copyright (C) 2008 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16LOCAL_PATH := $(call my-dir)
17
Colin Crosscf3a0b52017-11-16 00:15:28 -080018# Load framework-specific path mappings used later in the build.
19include $(LOCAL_PATH)/pathmap.mk
Bart Searsa8cc0582015-05-07 03:23:20 +000020
21# Build the master framework library.
22# The framework contains too many method references (>64K) for poor old DEX.
23# So we first build the framework as a monolithic static library then split it
24# up into smaller pieces.
25# ============================================================
26
27# embedded builds use nothing in frameworks/base
28ifneq ($(ANDROID_BUILD_EMBEDDED),true)
29
Bart Searsa8cc0582015-05-07 03:23:20 +000030# Copy AIDL files to be preprocessed and included in the SDK,
31# specified relative to the root of the build tree.
32# ============================================================
33include $(CLEAR_VARS)
34
Colin Cross77ebd082017-12-15 17:30:33 -080035aidl_parcelables :=
36define stubs-to-aidl-parcelables
37 gen := $(TARGET_OUT_COMMON_INTERMEDIATES)/$1.aidl
38 aidl_parcelables += $$(gen)
Colin Crossfdbe7d12018-02-09 11:24:14 -080039 $$(gen): $(call java-lib-header-files,$1) $(HOST_OUT_EXECUTABLES)/sdkparcelables
Colin Cross77ebd082017-12-15 17:30:33 -080040 @echo Extract SDK parcelables: $$@
41 rm -f $$@
42 $(HOST_OUT_EXECUTABLES)/sdkparcelables $$< $$@
43endef
44
45$(foreach stubs,android_stubs_current android_test_stubs_current android_system_stubs_current,\
46 $(eval $(call stubs-to-aidl-parcelables,$(stubs))))
47
Bart Searsa8cc0582015-05-07 03:23:20 +000048gen := $(TARGET_OUT_COMMON_INTERMEDIATES)/framework.aidl
Colin Cross77ebd082017-12-15 17:30:33 -080049.KATI_RESTAT: $(gen)
50$(gen): $(aidl_parcelables)
51 @echo Combining SDK parcelables: $@
52 rm -f $@.tmp
53 cat $^ | sort -u > $@.tmp
54 $(call commit-change-for-toc,$@)
Bart Searsa8cc0582015-05-07 03:23:20 +000055
56# the documentation
57# ============================================================
58
59# TODO: deal with com/google/android/googleapps
60packages_to_document := \
Colin Crosscf3a0b52017-11-16 00:15:28 -080061 android \
62 javax/microedition/khronos \
63 org/apache/http/conn \
64 org/apache/http/params \
Bart Searsa8cc0582015-05-07 03:23:20 +000065
66# include definition of libcore_to_document
67include libcore/Docs.mk
68
Bart Searsa8cc0582015-05-07 03:23:20 +000069non_base_dirs := \
Colin Crosscf3a0b52017-11-16 00:15:28 -080070 ../opt/telephony/src/java/android/telephony \
71 ../opt/telephony/src/java/android/telephony/gsm \
72 ../opt/net/voip/src/java/android/net/rtp \
73 ../opt/net/voip/src/java/android/net/sip \
Bart Searsa8cc0582015-05-07 03:23:20 +000074
Colin Crosscf3a0b52017-11-16 00:15:28 -080075# Find all files in specific directories (relative to frameworks/base)
76# to document and check apis
77files_to_check_apis := \
78 $(call find-other-java-files, \
Colin Crosscf3a0b52017-11-16 00:15:28 -080079 $(non_base_dirs) \
80 )
Bart Searsa8cc0582015-05-07 03:23:20 +000081
Colin Crosscf3a0b52017-11-16 00:15:28 -080082# Find all files in specific packages that were used to compile
83# framework.jar to document and check apis
84files_to_check_apis += \
85 $(addprefix ../../,\
86 $(filter \
87 $(foreach dir,$(FRAMEWORKS_BASE_JAVA_SRC_DIRS),\
88 $(foreach package,$(packages_to_document),\
89 $(dir)/$(package)/%.java)),\
90 $(SOONG_FRAMEWORK_SRCS)))
91
92# Find all generated files that were used to compile framework.jar
Colin Crossbd200ce2017-12-04 13:45:19 -080093files_to_check_apis_generated := \
94 $(filter $(OUT_DIR)/%,\
95 $(SOONG_FRAMEWORK_SRCS))
George Mountf6be9932015-12-03 07:39:55 -080096
Bart Searsa8cc0582015-05-07 03:23:20 +000097# These are relative to frameworks/base
98# FRAMEWORKS_BASE_SUBDIRS comes from build/core/pathmap.mk
Colin Crosscf3a0b52017-11-16 00:15:28 -080099files_to_document := \
100 $(files_to_check_apis) \
101 $(call find-other-java-files,\
Paul Duffin187a48d2017-12-13 14:34:31 +0000102 test-base/src \
Paul Duffin9f6282d2017-12-15 15:49:08 +0000103 test-mock/src \
Colin Crosscf3a0b52017-11-16 00:15:28 -0800104 test-runner/src)
George Mountf6be9932015-12-03 07:39:55 -0800105
Bart Searsa8cc0582015-05-07 03:23:20 +0000106# These are relative to frameworks/base
107html_dirs := \
108 $(FRAMEWORKS_BASE_SUBDIRS) \
Colin Crosscf3a0b52017-11-16 00:15:28 -0800109 $(non_base_dirs) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000110
111# Common sources for doc check and api check
112common_src_files := \
113 $(call find-other-html-files, $(html_dirs)) \
Colin Crosscf3a0b52017-11-16 00:15:28 -0800114 $(addprefix ../../, $(libcore_to_document)) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000115
116# These are relative to frameworks/base
117framework_docs_LOCAL_SRC_FILES := \
Colin Crosscf3a0b52017-11-16 00:15:28 -0800118 $(files_to_document) \
119 $(common_src_files) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000120
121# These are relative to frameworks/base
122framework_docs_LOCAL_API_CHECK_SRC_FILES := \
Colin Crosscf3a0b52017-11-16 00:15:28 -0800123 $(files_to_check_apis) \
124 $(common_src_files) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000125
126# This is used by ide.mk as the list of source files that are
127# always included.
128INTERNAL_SDK_SOURCE_DIRS := $(addprefix $(LOCAL_PATH)/,$(dirs_to_document))
129
130framework_docs_LOCAL_DROIDDOC_SOURCE_PATH := \
131 $(FRAMEWORKS_BASE_JAVA_SRC_DIRS)
132
Colin Crosscf3a0b52017-11-16 00:15:28 -0800133framework_docs_LOCAL_SRCJARS := $(SOONG_FRAMEWORK_SRCJARS)
134
Colin Crossbd200ce2017-12-04 13:45:19 -0800135framework_docs_LOCAL_GENERATED_SOURCES := \
136 $(libcore_to_document_generated) \
137 $(files_to_check_apis_generated) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000138
139framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES := \
Piotr Jastrzebskicfa292e2015-02-17 16:58:52 +0000140 core-oj \
Bart Searsa8cc0582015-05-07 03:23:20 +0000141 core-libart \
142 conscrypt \
143 bouncycastle \
144 okhttp \
145 ext \
146 framework \
Paul Duffinc08090f2017-06-29 14:58:43 +0100147 voip-common \
Bart Searsa8cc0582015-05-07 03:23:20 +0000148
Alan Viverette9ca513e2017-04-05 10:21:58 -0400149# Platform docs can refer to Support Library APIs, but we don't actually build
150# them as part of the docs target, so we need to include them on the classpath.
Bart Searsa8cc0582015-05-07 03:23:20 +0000151framework_docs_LOCAL_JAVA_LIBRARIES := \
152 $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES) \
153 $(FRAMEWORKS_SUPPORT_JAVA_LIBRARIES)
154
155framework_docs_LOCAL_MODULE_CLASS := JAVA_LIBRARIES
156framework_docs_LOCAL_DROIDDOC_HTML_DIR := docs/html
157# The since flag (-since N.xml API_LEVEL) is used to add API Level information
158# to the reference documentation. Must be in order of oldest to newest.
159#
160# Conscrypt (com.android.org.conscrypt) is an implementation detail and should
161# not be referenced in the documentation.
162framework_docs_LOCAL_DROIDDOC_OPTIONS := \
Jeff Sharkey0f3f60b2017-04-24 18:06:20 -0600163 -android \
Bart Searsa8cc0582015-05-07 03:23:20 +0000164 -knowntags ./frameworks/base/docs/knowntags.txt \
Narayan Kamath2c4f2842015-07-27 14:02:11 +0100165 -knowntags ./libcore/known_oj_tags.txt \
Jeff Sharkeybfc4fcd2017-06-05 17:38:17 -0600166 -manifest ./frameworks/base/core/res/AndroidManifest.xml \
Tobias Thiererdda16e82018-03-05 22:55:32 +0000167 -hidePackage com.android.internal \
168 -hidePackage com.android.internal.util \
Neil Fuller57157fb2017-11-24 15:58:38 +0000169 -hidePackage com.android.okhttp \
Bart Searsa8cc0582015-05-07 03:23:20 +0000170 -hidePackage com.android.org.conscrypt \
Anton Hansson6a9e7262018-04-19 16:23:53 +0100171 -hidePackage com.android.server
172
173# Convert an sdk level to a "since" argument.
174since-arg = -since $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/$(1)/public/api/android.*) $(1)
175
176finalized_sdks := $(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/public/api/android.xml,%,\
177 $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/public/api/android.xml))
178finalized_sdks += $(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/public/api/android.txt,%,\
179 $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/public/api/android.txt))
180finalized_sdks := $(call numerically_sort,$(finalized_sdks))
181
182framework_docs_LOCAL_DROIDDOC_OPTIONS += $(foreach sdk,$(finalized_sdks),$(call since-arg,$(sdk)))
183ifneq ($(PLATFORM_VERSION_CODENAME),REL)
184 framework_docs_LOCAL_DROIDDOC_OPTIONS += \
185 -since ./frameworks/base/api/current.txt $(PLATFORM_VERSION_CODENAME)
186endif
187framework_docs_LOCAL_DROIDDOC_OPTIONS += \
Jeff Sharkeyc204c222017-11-27 15:02:10 -0700188 -werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 \
Anton Hansson6a9e7262018-04-19 16:23:53 +0100189 -overview $(LOCAL_PATH)/core/java/overview.html
Bart Searsa8cc0582015-05-07 03:23:20 +0000190
191framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR:= \
192 $(call intermediates-dir-for,JAVA_LIBRARIES,framework,,COMMON)
193
194framework_docs_LOCAL_ADDITIONAL_JAVA_DIR:= \
Alan Viverette9ca513e2017-04-05 10:21:58 -0400195 $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
Bart Searsa8cc0582015-05-07 03:23:20 +0000196
197framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES := \
Narayan Kamathc21739a2015-07-14 13:39:23 +0100198 frameworks/base/docs/knowntags.txt \
Colin Cross72d359f2017-10-27 10:46:53 -0700199 $(libcore_to_document_generated)
Bart Searsa8cc0582015-05-07 03:23:20 +0000200
201samples_dir := development/samples/browseable
202
203# Whitelist of valid groups, used for default TOC grouping. Each sample must
204# belong to one (and only one) group. Assign samples to groups by setting
205# a sample.group var to one of these groups in the sample's _index.jd.
206sample_groups := -samplegroup Admin \
207 -samplegroup Background \
208 -samplegroup Connectivity \
209 -samplegroup Content \
210 -samplegroup Input \
211 -samplegroup Media \
212 -samplegroup Notification \
213 -samplegroup RenderScript \
214 -samplegroup Security \
215 -samplegroup Sensors \
Trevor Johns4cbe3592015-05-27 14:50:51 -0700216 -samplegroup System \
Bart Searsa8cc0582015-05-07 03:23:20 +0000217 -samplegroup Testing \
218 -samplegroup UI \
219 -samplegroup Views \
220 -samplegroup Wearable
221
222## SDK version identifiers used in the published docs
223 # major[.minor] version for current SDK. (full releases only)
smain@google.comdde8deb2016-08-29 18:36:50 -0700224framework_docs_SDK_VERSION:=7.0
Bart Searsa8cc0582015-05-07 03:23:20 +0000225 # release version (ie "Release x") (full releases only)
226framework_docs_SDK_REL_ID:=1
227
228framework_docs_LOCAL_DROIDDOC_OPTIONS += \
Billy Lamberta75dbc8f2017-03-03 13:09:15 -0800229 -hdf dac true \
Scott Mainf8cdfc82017-03-21 13:43:31 -0700230 -hdf sdk.codename O \
231 -hdf sdk.preview.version 1 \
Bart Searsa8cc0582015-05-07 03:23:20 +0000232 -hdf sdk.version $(framework_docs_SDK_VERSION) \
233 -hdf sdk.rel.id $(framework_docs_SDK_REL_ID) \
Scott Mainf8cdfc82017-03-21 13:43:31 -0700234 -hdf sdk.preview 0 \
235 -resourcesdir $(LOCAL_PATH)/docs/html/reference/images/ \
236 -resourcesoutdir reference/android/images/
Bart Searsa8cc0582015-05-07 03:23:20 +0000237
Alan Viverette9ca513e2017-04-05 10:21:58 -0400238# Federate Support Library references against local API file.
239framework_docs_LOCAL_DROIDDOC_OPTIONS += \
240 -federate SupportLib https://developer.android.com \
241 -federationapi SupportLib prebuilts/sdk/current/support-api.txt
242
Alan Viverette67b51d42018-03-28 17:10:20 -0400243# Federate AndroidX references against local API file.
244framework_docs_LOCAL_DROIDDOC_OPTIONS += \
245 -federate AndroidX https://developer.android.com \
246 -federationapi AndroidX prebuilts/sdk/current/androidx-api.txt
247
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700248# ==== Public API diff ===========================
Alan Viverette6b7354c2017-07-13 17:10:14 -0400249include $(CLEAR_VARS)
250
251LOCAL_SRC_FILES := $(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800252LOCAL_GENERATED_SOURCES := $(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800253LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Alan Viverette6b7354c2017-07-13 17:10:14 -0400254LOCAL_JAVA_LIBRARIES := $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
255LOCAL_MODULE_CLASS := $(framework_docs_LOCAL_MODULE_CLASS)
256LOCAL_ADDITIONAL_JAVA_DIR := $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
257LOCAL_ADDITIONAL_DEPENDENCIES := \
258 $(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) \
259 $(INTERNAL_PLATFORM_API_FILE)
260
261LOCAL_MODULE := offline-sdk-referenceonly
262
263last_released_sdk_version := $(lastword $(call numerically_sort, \
264 $(filter-out current, \
265 $(patsubst $(SRC_API_DIR)/%.txt,%, $(wildcard $(SRC_API_DIR)/*.txt)) \
266 )\
267 ))
268
269LOCAL_APIDIFF_OLDAPI := $(LOCAL_PATH)/../../$(SRC_API_DIR)/$(last_released_sdk_version)
270LOCAL_APIDIFF_NEWAPI := $(LOCAL_PATH)/../../$(basename $(INTERNAL_PLATFORM_API_FILE))
271
272include $(BUILD_APIDIFF)
273
Jeff Sharkeyc8dc2542017-12-08 14:52:37 -0700274# Hack to get diffs included in docs output
275out_zip := $(OUT_DOCS)/$(LOCAL_MODULE)-docs.zip
276$(out_zip): $(full_target)
277
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700278# ==== System API diff ===========================
279include $(CLEAR_VARS)
280
281LOCAL_SRC_FILES := $(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800282LOCAL_GENERATED_SOURCES := $(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800283LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700284LOCAL_JAVA_LIBRARIES := $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
285LOCAL_MODULE_CLASS := $(framework_docs_LOCAL_MODULE_CLASS)
286LOCAL_ADDITIONAL_JAVA_DIR := $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
287LOCAL_ADDITIONAL_DEPENDENCIES := \
288 $(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) \
289 $(INTERNAL_PLATFORM_SYSTEM_API_FILE)
290
291LOCAL_MODULE := offline-system-sdk-referenceonly
292
293last_released_sdk_version := $(lastword $(call numerically_sort, \
294 $(filter-out current, \
295 $(patsubst $(SRC_SYSTEM_API_DIR)/%.txt,%, $(wildcard $(SRC_SYSTEM_API_DIR)/*.txt)) \
296 )\
297 ))
298
299LOCAL_APIDIFF_OLDAPI := $(LOCAL_PATH)/../../$(SRC_SYSTEM_API_DIR)/$(last_released_sdk_version)
300LOCAL_APIDIFF_NEWAPI := $(LOCAL_PATH)/../../$(basename $(INTERNAL_PLATFORM_SYSTEM_API_FILE))
301
302include $(BUILD_APIDIFF)
303
Jeff Sharkeyc8dc2542017-12-08 14:52:37 -0700304# Hack to get diffs included in docs output
305out_zip := $(OUT_DOCS)/$(LOCAL_MODULE)-docs.zip
306$(out_zip): $(full_target)
307
Bart Searsa8cc0582015-05-07 03:23:20 +0000308$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE))
Bart Searsa8cc0582015-05-07 03:23:20 +0000309$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE))
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000310$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE))
311
David Brazdil68e1c1d2018-03-08 14:32:27 +0000312# ==== the complete hidden api list ===================================
313include $(CLEAR_VARS)
314
315LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
316LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
317LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
318LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
319LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
320LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
321LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
322LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
323LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
324
325LOCAL_MODULE := hidden-api-list
326
327LOCAL_DROIDDOC_OPTIONS:=\
328 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
329 -referenceonly \
330 -showUnannotated \
331 -showAnnotation android.annotation.SystemApi \
332 -showAnnotation android.annotation.TestApi \
333 -privateDexApi $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
334 -nodocs
335
336LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
337
338LOCAL_UNINSTALLABLE_MODULE := true
339
340include $(BUILD_DROIDDOC)
341
342$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
343
Bart Searsa8cc0582015-05-07 03:23:20 +0000344# ==== check javadoc comments but don't generate docs ========
345include $(CLEAR_VARS)
346
347LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800348LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800349LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000350LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
351LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
352LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
353LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
354LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
355LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
356
357LOCAL_MODULE := doc-comment-check
358
359LOCAL_DROIDDOC_OPTIONS:=\
360 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700361 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000362 -parsecomments
363
Scott Main15b85172017-02-21 14:30:58 -0800364LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000365
366LOCAL_UNINSTALLABLE_MODULE := true
367
368include $(BUILD_DROIDDOC)
369
Bart Searsa8cc0582015-05-07 03:23:20 +0000370# Run this for checkbuild
371checkbuild: doc-comment-check-docs
372# Check comment when you are updating the API
373update-api: doc-comment-check-docs
374
375# ==== static html in the sdk ==================================
376include $(CLEAR_VARS)
377
378LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800379LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800380LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000381LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
382LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
383LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
384LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
385LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
386LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
387
388LOCAL_MODULE := offline-sdk
389
390LOCAL_DROIDDOC_OPTIONS:=\
391 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
392 -offlinemode \
393 -title "Android SDK" \
394 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
smain@google.com00de8c52016-03-07 18:38:08 -0800395 -sdkvalues $(OUT_DOCS) \
smain@google.com8562ab52016-06-14 17:11:57 -0700396 -hdf android.whichdoc offline
397
Scott Main15b85172017-02-21 14:30:58 -0800398LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
smain@google.com8562ab52016-06-14 17:11:57 -0700399
400include $(BUILD_DROIDDOC)
401
402static_doc_index_redirect := $(out_dir)/index.html
403$(static_doc_index_redirect): \
404 $(LOCAL_PATH)/docs/docs-preview-index.html | $(ACP)
405 $(hide) mkdir -p $(dir $@)
406 $(hide) $(ACP) $< $@
407
408$(full_target): $(static_doc_index_redirect)
smain@google.com8562ab52016-06-14 17:11:57 -0700409
410
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700411# ==== Public API static reference docs ==================================
smain@google.com8562ab52016-06-14 17:11:57 -0700412include $(CLEAR_VARS)
413
414LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800415LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800416LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
smain@google.com8562ab52016-06-14 17:11:57 -0700417LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
418LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
419LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
420LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
421LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
422LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
423
424LOCAL_MODULE := offline-sdk-referenceonly
425
426LOCAL_DROIDDOC_OPTIONS:=\
427 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
428 -offlinemode \
429 -title "Android SDK" \
430 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
431 -sdkvalues $(OUT_DOCS) \
smain@google.com00de8c52016-03-07 18:38:08 -0800432 -hdf android.whichdoc offline \
Scott Mainf8cdfc82017-03-21 13:43:31 -0700433 -referenceonly
smain@google.com00de8c52016-03-07 18:38:08 -0800434
Scott Main15b85172017-02-21 14:30:58 -0800435LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
smain@google.com00de8c52016-03-07 18:38:08 -0800436
437include $(BUILD_DROIDDOC)
438
439static_doc_index_redirect := $(out_dir)/index.html
smain@google.com151833a2016-08-31 08:42:09 -0700440$(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html
Dan Willemsen98ff0b72016-03-23 00:42:44 -0700441 $(copy-file-to-target)
smain@google.com00de8c52016-03-07 18:38:08 -0800442
smain@google.com2f2365d2016-09-21 14:05:50 -0700443static_doc_properties := $(out_dir)/source.properties
444$(static_doc_properties): \
445 $(LOCAL_PATH)/docs/source.properties | $(ACP)
446 $(hide) mkdir -p $(dir $@)
447 $(hide) $(ACP) $< $@
448
smain@google.com00de8c52016-03-07 18:38:08 -0800449$(full_target): $(static_doc_index_redirect)
smain@google.com2f2365d2016-09-21 14:05:50 -0700450$(full_target): $(static_doc_properties)
smain@google.com00de8c52016-03-07 18:38:08 -0800451
smain@google.com7aca8be2016-03-10 14:13:30 -0800452
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700453# ==== System API static reference docs ==================================
454include $(CLEAR_VARS)
455
456LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800457LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800458LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700459LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
460LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
461LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
462LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
463LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
464LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
465
466LOCAL_MODULE := offline-system-sdk-referenceonly
467
468LOCAL_DROIDDOC_OPTIONS:=\
469 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
470 -hide 101 -hide 104 -hide 108 \
471 -showAnnotation android.annotation.SystemApi \
472 -offlinemode \
473 -title "Android System SDK" \
474 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
475 -sdkvalues $(OUT_DOCS) \
476 -hdf android.whichdoc offline \
477 -referenceonly
478
479LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
480
481include $(BUILD_DROIDDOC)
482
483static_doc_index_redirect := $(out_dir)/index.html
484$(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html
485 $(copy-file-to-target)
486
487static_doc_properties := $(out_dir)/source.properties
488$(static_doc_properties): \
489 $(LOCAL_PATH)/docs/source.properties | $(ACP)
490 $(hide) mkdir -p $(dir $@)
491 $(hide) $(ACP) $< $@
492
493$(full_target): $(static_doc_index_redirect)
494$(full_target): $(static_doc_properties)
495$(full_target): $(framework_built)
496
497
Bart Searsa8cc0582015-05-07 03:23:20 +0000498# ==== docs for the web (on the androiddevdocs app engine server) =======================
499include $(CLEAR_VARS)
500
501LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800502LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800503LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000504LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
505LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
506LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
507LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
508LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
509LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
510LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
511LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
512
513LOCAL_MODULE := online-sdk
514
515LOCAL_DROIDDOC_OPTIONS:= \
516 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
517 -toroot / \
518 -hdf android.whichdoc online \
519 $(sample_groups) \
520 -hdf android.hasSamples true \
521 -samplesdir $(samples_dir)
522
Scott Main15b85172017-02-21 14:30:58 -0800523LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000524
525include $(BUILD_DROIDDOC)
526
527# ==== docs for the web (on the androiddevdocs app engine server) =======================
Bart Searsa8cc0582015-05-07 03:23:20 +0000528include $(CLEAR_VARS)
529
530LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800531LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800532LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000533LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
534LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
535LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
536LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
537LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
538LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
539LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
540LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
541
542LOCAL_MODULE := online-system-api-sdk
543
544LOCAL_DROIDDOC_OPTIONS:= \
545 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700546 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000547 -showAnnotation android.annotation.SystemApi \
548 -title "Android SDK - Including system APIs." \
549 -toroot / \
Gina Dimino98ad8882016-05-31 17:25:48 -0700550 -hide 101 \
551 -hide 104 \
552 -hide 108 \
Bart Searsa8cc0582015-05-07 03:23:20 +0000553 -hdf android.whichdoc online \
554 $(sample_groups) \
555 -hdf android.hasSamples true \
556 -samplesdir $(samples_dir)
557
Scott Main15b85172017-02-21 14:30:58 -0800558LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Jeff Sharkey05461c02017-05-09 19:01:09 -0600559
Bart Searsa8cc0582015-05-07 03:23:20 +0000560LOCAL_UNINSTALLABLE_MODULE := true
561
562include $(BUILD_DROIDDOC)
Bart Searsa8cc0582015-05-07 03:23:20 +0000563
564# ==== docs for the web (on the devsite app engine server) =======================
565include $(CLEAR_VARS)
566LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800567LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800568LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000569LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
570LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
571LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
572LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
573LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
574LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
575LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
576# specify a second html input dir and an output path relative to OUT_DIR)
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700577LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
Bart Searsa8cc0582015-05-07 03:23:20 +0000578
579LOCAL_MODULE := ds
580
581LOCAL_DROIDDOC_OPTIONS:= \
582 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000583 -toroot / \
584 -hdf android.whichdoc online \
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700585 -devsite \
Scott Main4f9b48c2017-12-19 13:43:45 -0800586 -yamlV2 \
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700587 $(sample_groups) \
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700588 -hdf android.hasSamples true \
589 -samplesdir $(samples_dir)
Bart Searsa8cc0582015-05-07 03:23:20 +0000590
Scott Main15b85172017-02-21 14:30:58 -0800591LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000592
593include $(BUILD_DROIDDOC)
594
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700595# ==== docs for the web (on the devsite app engine server) =======================
596include $(CLEAR_VARS)
597LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800598LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800599LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700600LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
601LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
602LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
603LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
604LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
605LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
606LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
607# specify a second html input dir and an output path relative to OUT_DIR)
608LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
609
610LOCAL_MODULE := ds-static
611
612LOCAL_DROIDDOC_OPTIONS:= \
613 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
614 -hdf android.whichdoc online \
615 -staticonly \
616 -toroot / \
617 -devsite \
618 -ignoreJdLinks
619
Scott Main15b85172017-02-21 14:30:58 -0800620LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700621
622include $(BUILD_DROIDDOC)
623
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700624# ==== generates full navtree for resolving @links in ds postprocessing ====
625include $(CLEAR_VARS)
626
627LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800628LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800629LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700630LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
631LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
632LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
633LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
634LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
635LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
636
637LOCAL_MODULE := ds-ref-navtree
638
639LOCAL_DROIDDOC_OPTIONS:= \
640 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
641 -hdf android.whichdoc online \
642 -toroot / \
643 -atLinksNavtree \
644 -navtreeonly
645
Scott Main15b85172017-02-21 14:30:58 -0800646LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700647
648include $(BUILD_DROIDDOC)
649
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800650# ==== site updates for docs (on the androiddevdocs app engine server) =======================
Bart Searsa8cc0582015-05-07 03:23:20 +0000651include $(CLEAR_VARS)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800652
Bart Searsa8cc0582015-05-07 03:23:20 +0000653LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800654LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800655LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000656LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
657LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
658LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
659LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800660LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
Bart Searsa8cc0582015-05-07 03:23:20 +0000661LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
662LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800663LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
Bart Searsa8cc0582015-05-07 03:23:20 +0000664
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800665LOCAL_MODULE := online-sdk-dev
Bart Searsa8cc0582015-05-07 03:23:20 +0000666
667LOCAL_DROIDDOC_OPTIONS:= \
668 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
669 -toroot / \
670 -hdf android.whichdoc online \
671 $(sample_groups) \
672 -hdf android.hasSamples true \
673 -samplesdir $(samples_dir)
674
Scott Main15b85172017-02-21 14:30:58 -0800675LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000676
677include $(BUILD_DROIDDOC)
678
Bart Searsa8cc0582015-05-07 03:23:20 +0000679# ==== docs that have all of the stuff that's @hidden =======================
680include $(CLEAR_VARS)
681
682LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800683LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800684LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000685LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
686LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
687LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
688LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
689LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
690LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
691
692LOCAL_MODULE := hidden
693LOCAL_DROIDDOC_OPTIONS:=\
694 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700695 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000696 -title "Android SDK - Including hidden APIs."
697# -hidden
698
Scott Main15b85172017-02-21 14:30:58 -0800699LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000700
701include $(BUILD_DROIDDOC)
702
Joe Onorato1754d742016-11-21 17:51:35 -0800703# ==== java proto host library ==============================
704include $(CLEAR_VARS)
705LOCAL_MODULE := platformprotos
706LOCAL_PROTOC_OPTIMIZE_TYPE := full
707LOCAL_PROTOC_FLAGS := \
708 -Iexternal/protobuf/src
709LOCAL_SOURCE_FILES_ALL_GENERATED := true
710LOCAL_SRC_FILES := \
Mike Mada3a2952017-11-13 12:06:45 -0800711 cmds/am/proto/instrumentation_data.proto \
Primiano Tuccie4d44912018-01-10 12:14:50 +0000712 cmds/statsd/src/perfetto/perfetto_config.proto \
Joe Onorato1754d742016-11-21 17:51:35 -0800713 $(call all-proto-files-under, core/proto) \
Chenjie Yu15176cd2017-11-22 12:36:41 -0800714 $(call all-proto-files-under, libs/incident/proto) \
715 $(call all-proto-files-under, cmds/statsd/src)
Andreas Gampe3e429f32018-02-15 15:12:38 -0800716# b/72714520
717LOCAL_ERROR_PRONE_FLAGS := -Xep:MissingOverride:OFF
Joe Onorato1754d742016-11-21 17:51:35 -0800718include $(BUILD_HOST_JAVA_LIBRARY)
719
Steven Timotius7ece0422017-08-03 13:37:26 -0700720# ==== java proto device library (for test only) ==============================
721include $(CLEAR_VARS)
722LOCAL_MODULE := platformprotosnano
Joe Onorato62c220b2017-11-18 20:32:56 -0800723LOCAL_MODULE_TAGS := tests
Steven Timotius7ece0422017-08-03 13:37:26 -0700724LOCAL_PROTOC_OPTIMIZE_TYPE := nano
725LOCAL_PROTOC_FLAGS := \
726 -Iexternal/protobuf/src
727LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \
728 store_unknown_fields = true
Jiyong Parkf0048392018-02-12 21:57:59 +0900729LOCAL_SDK_VERSION := current
Steven Timotius7ece0422017-08-03 13:37:26 -0700730LOCAL_SRC_FILES := \
Yi Jin437aa6e2018-01-10 11:34:26 -0800731 $(call all-proto-files-under, core/proto) \
732 $(call all-proto-files-under, libs/incident/proto/android/os)
Steven Timotius7ece0422017-08-03 13:37:26 -0700733include $(BUILD_STATIC_JAVA_LIBRARY)
734
Bart Searsa8cc0582015-05-07 03:23:20 +0000735
Joe Onorato62c220b2017-11-18 20:32:56 -0800736# ==== java proto device library (for test only) ==============================
737include $(CLEAR_VARS)
738LOCAL_MODULE := platformprotoslite
739LOCAL_MODULE_TAGS := tests
740LOCAL_PROTOC_OPTIMIZE_TYPE := lite
741LOCAL_PROTOC_FLAGS := \
742 -Iexternal/protobuf/src
743LOCAL_SRC_FILES := \
Yi Jin437aa6e2018-01-10 11:34:26 -0800744 $(call all-proto-files-under, core/proto) \
745 $(call all-proto-files-under, libs/incident/proto/android/os)
Andreas Gampe93b64c92018-01-30 18:50:34 -0800746# Protos have lots of MissingOverride and similar.
747LOCAL_ERROR_PRONE_FLAGS := -XepDisableAllChecks
Joe Onorato62c220b2017-11-18 20:32:56 -0800748include $(BUILD_STATIC_JAVA_LIBRARY)
749
David Brazdil0649c8d2018-01-22 22:23:13 +0000750# ==== hiddenapi lists =======================================
751
David Brazdil36bbf122018-03-28 11:28:39 +0100752# Copy light and dark greylist over into the build folder.
David Brazdilf16ac002018-01-26 11:13:35 +0000753# This is for ART buildbots which need to mock these lists and have alternative
754# rules for building them. Other rules in the build system should depend on the
755# files in the build folder.
756
David Brazdil357170b12018-03-26 16:02:23 +0100757# Automatically add all methods which match the following signatures.
758# These need to be greylisted in order to allow applications to write their
759# own serializers.
760$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): REGEX_SERIALIZATION := \
761 "readObject\(Ljava/io/ObjectInputStream;\)V" \
762 "readObjectNoData\(\)V" \
763 "readResolve\(\)Ljava/lang/Object;" \
764 "serialVersionUID:J" \
765 "serialPersistentFields:\[Ljava/io/ObjectStreamField;" \
766 "writeObject\(Ljava/io/ObjectOutputStream;\)V" \
767 "writeReplace\(\)Ljava/lang/Object;"
768$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): PRIVATE_API := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
David Brazdil873d1d32018-03-13 09:41:23 +0000769# Temporarily merge light greylist from two files. Vendor list will become dark
770# grey once we remove the UI toast.
771$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): frameworks/base/config/hiddenapi-light-greylist.txt \
David Brazdil357170b12018-03-26 16:02:23 +0100772 frameworks/base/config/hiddenapi-vendor-list.txt \
773 $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
774 sort frameworks/base/config/hiddenapi-light-greylist.txt \
775 frameworks/base/config/hiddenapi-vendor-list.txt \
776 <(grep -E "\->("$(subst $(space),"|",$(REGEX_SERIALIZATION))")$$" $(PRIVATE_API)) \
777 > $@
David Brazdilf16ac002018-01-26 11:13:35 +0000778
David Brazdil36bbf122018-03-28 11:28:39 +0100779$(eval $(call copy-one-file,frameworks/base/config/hiddenapi-dark-greylist.txt,\
780 $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST)))
781
Nicolas Geoffray90fa8ef2018-02-08 17:27:15 +0000782# Generate dark greylist as private API minus (blacklist plus light greylist).
David Brazdil0649c8d2018-01-22 22:23:13 +0000783
David Brazdil36bbf122018-03-28 11:28:39 +0100784$(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST): PRIVATE_API := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
785$(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST): LIGHT_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST)
786$(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST): DARK_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST)
787$(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST): $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
788 $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST) \
789 $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST)
790 if [ ! -z "`comm -12 <(sort $(LIGHT_GREYLIST)) <(sort $(DARK_GREYLIST))`" ]; then \
791 echo "There should be no overlap between $(LIGHT_GREYLIST) and $(DARK_GREYLIST)" 1>&2; \
792 comm -12 <(sort $(LIGHT_GREYLIST)) <(sort $(DARK_GREYLIST)) 1>&2; \
David Brazdil0649c8d2018-01-22 22:23:13 +0000793 exit 1; \
David Brazdilb43351f2018-01-31 14:43:36 +0000794 elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(LIGHT_GREYLIST))`" ]; then \
795 echo "$(LIGHT_GREYLIST) must be a subset of $(PRIVATE_API)" 1>&2; \
David Brazdil36bbf122018-03-28 11:28:39 +0100796 comm -13 <(sort $(PRIVATE_API)) <(sort $(LIGHT_GREYLIST)) 1>&2; \
797 exit 2; \
798 elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(DARK_GREYLIST))`" ]; then \
799 echo "$(DARK_GREYLIST) must be a subset of $(PRIVATE_API)" 1>&2; \
800 comm -13 <(sort $(PRIVATE_API)) <(sort $(DARK_GREYLIST)) 1>&2; \
David Brazdil0649c8d2018-01-22 22:23:13 +0000801 exit 3; \
802 fi
David Brazdil36bbf122018-03-28 11:28:39 +0100803 comm -23 <(sort $(PRIVATE_API)) <(sort $(LIGHT_GREYLIST) $(DARK_GREYLIST)) > $@
David Brazdil0649c8d2018-01-22 22:23:13 +0000804
Bart Searsa8cc0582015-05-07 03:23:20 +0000805# Include subdirectory makefiles
806# ============================================================
807
808# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
809# team really wants is to build the stuff defined by this makefile.
810ifeq (,$(ONE_SHOT_MAKEFILE))
811include $(call first-makefiles-under,$(LOCAL_PATH))
812endif
813
Holly Jiuyu Sunbbc85802017-12-21 18:44:59 -0800814endif # ANDROID_BUILD_EMBEDDED
815