blob: e786282cf14ef3ac5bcb89854be89bf62b6db488 [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 \
Neil Fuller371c08c2017-11-27 10:32:07 +0000171 -hidePackage com.android.server \
Bart Searsa8cc0582015-05-07 03:23:20 +0000172 -since $(SRC_API_DIR)/1.xml 1 \
173 -since $(SRC_API_DIR)/2.xml 2 \
174 -since $(SRC_API_DIR)/3.xml 3 \
175 -since $(SRC_API_DIR)/4.xml 4 \
176 -since $(SRC_API_DIR)/5.xml 5 \
177 -since $(SRC_API_DIR)/6.xml 6 \
178 -since $(SRC_API_DIR)/7.xml 7 \
179 -since $(SRC_API_DIR)/8.xml 8 \
180 -since $(SRC_API_DIR)/9.xml 9 \
181 -since $(SRC_API_DIR)/10.xml 10 \
182 -since $(SRC_API_DIR)/11.xml 11 \
183 -since $(SRC_API_DIR)/12.xml 12 \
184 -since $(SRC_API_DIR)/13.xml 13 \
185 -since $(SRC_API_DIR)/14.txt 14 \
186 -since $(SRC_API_DIR)/15.txt 15 \
187 -since $(SRC_API_DIR)/16.txt 16 \
188 -since $(SRC_API_DIR)/17.txt 17 \
189 -since $(SRC_API_DIR)/18.txt 18 \
190 -since $(SRC_API_DIR)/19.txt 19 \
191 -since $(SRC_API_DIR)/20.txt 20 \
192 -since $(SRC_API_DIR)/21.txt 21 \
193 -since $(SRC_API_DIR)/22.txt 22 \
Joe Fernandez1827e322015-08-12 19:45:22 -0700194 -since $(SRC_API_DIR)/23.txt 23 \
Dirk Dougherty5f60f7c2016-06-14 16:26:28 -0700195 -since $(SRC_API_DIR)/24.txt 24 \
Dirk Dougherty3376f582016-10-14 10:27:08 -0700196 -since $(SRC_API_DIR)/25.txt 25 \
Dirk Doughertyfdad0ba2017-06-09 14:43:32 -0700197 -since $(SRC_API_DIR)/26.txt 26 \
Andrew Solovaya6019b22017-10-06 14:27:20 -0700198 -since $(SRC_API_DIR)/27.txt 27 \
Andrew Solovay61204ce2018-02-24 16:44:28 -0800199 -since ./frameworks/base/api/current.txt P \
Jeff Sharkeyc204c222017-11-27 15:02:10 -0700200 -werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 \
Jeff Sharkey0f3f60b2017-04-24 18:06:20 -0600201 -overview $(LOCAL_PATH)/core/java/overview.html \
Bart Searsa8cc0582015-05-07 03:23:20 +0000202
203framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR:= \
204 $(call intermediates-dir-for,JAVA_LIBRARIES,framework,,COMMON)
205
206framework_docs_LOCAL_ADDITIONAL_JAVA_DIR:= \
Alan Viverette9ca513e2017-04-05 10:21:58 -0400207 $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
Bart Searsa8cc0582015-05-07 03:23:20 +0000208
209framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES := \
Narayan Kamathc21739a2015-07-14 13:39:23 +0100210 frameworks/base/docs/knowntags.txt \
Colin Cross72d359f2017-10-27 10:46:53 -0700211 $(libcore_to_document_generated)
Bart Searsa8cc0582015-05-07 03:23:20 +0000212
213samples_dir := development/samples/browseable
214
215# Whitelist of valid groups, used for default TOC grouping. Each sample must
216# belong to one (and only one) group. Assign samples to groups by setting
217# a sample.group var to one of these groups in the sample's _index.jd.
218sample_groups := -samplegroup Admin \
219 -samplegroup Background \
220 -samplegroup Connectivity \
221 -samplegroup Content \
222 -samplegroup Input \
223 -samplegroup Media \
224 -samplegroup Notification \
225 -samplegroup RenderScript \
226 -samplegroup Security \
227 -samplegroup Sensors \
Trevor Johns4cbe3592015-05-27 14:50:51 -0700228 -samplegroup System \
Bart Searsa8cc0582015-05-07 03:23:20 +0000229 -samplegroup Testing \
230 -samplegroup UI \
231 -samplegroup Views \
232 -samplegroup Wearable
233
234## SDK version identifiers used in the published docs
235 # major[.minor] version for current SDK. (full releases only)
smain@google.comdde8deb2016-08-29 18:36:50 -0700236framework_docs_SDK_VERSION:=7.0
Bart Searsa8cc0582015-05-07 03:23:20 +0000237 # release version (ie "Release x") (full releases only)
238framework_docs_SDK_REL_ID:=1
239
240framework_docs_LOCAL_DROIDDOC_OPTIONS += \
Billy Lamberta75dbc8f2017-03-03 13:09:15 -0800241 -hdf dac true \
Scott Mainf8cdfc82017-03-21 13:43:31 -0700242 -hdf sdk.codename O \
243 -hdf sdk.preview.version 1 \
Bart Searsa8cc0582015-05-07 03:23:20 +0000244 -hdf sdk.version $(framework_docs_SDK_VERSION) \
245 -hdf sdk.rel.id $(framework_docs_SDK_REL_ID) \
Scott Mainf8cdfc82017-03-21 13:43:31 -0700246 -hdf sdk.preview 0 \
247 -resourcesdir $(LOCAL_PATH)/docs/html/reference/images/ \
248 -resourcesoutdir reference/android/images/
Bart Searsa8cc0582015-05-07 03:23:20 +0000249
Alan Viverette9ca513e2017-04-05 10:21:58 -0400250# Federate Support Library references against local API file.
251framework_docs_LOCAL_DROIDDOC_OPTIONS += \
252 -federate SupportLib https://developer.android.com \
253 -federationapi SupportLib prebuilts/sdk/current/support-api.txt
254
Alan Viverette67b51d42018-03-28 17:10:20 -0400255# Federate AndroidX references against local API file.
256framework_docs_LOCAL_DROIDDOC_OPTIONS += \
257 -federate AndroidX https://developer.android.com \
258 -federationapi AndroidX prebuilts/sdk/current/androidx-api.txt
259
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700260# ==== Public API diff ===========================
Alan Viverette6b7354c2017-07-13 17:10:14 -0400261include $(CLEAR_VARS)
262
263LOCAL_SRC_FILES := $(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800264LOCAL_GENERATED_SOURCES := $(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800265LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Alan Viverette6b7354c2017-07-13 17:10:14 -0400266LOCAL_JAVA_LIBRARIES := $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
267LOCAL_MODULE_CLASS := $(framework_docs_LOCAL_MODULE_CLASS)
268LOCAL_ADDITIONAL_JAVA_DIR := $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
269LOCAL_ADDITIONAL_DEPENDENCIES := \
270 $(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) \
271 $(INTERNAL_PLATFORM_API_FILE)
272
273LOCAL_MODULE := offline-sdk-referenceonly
274
275last_released_sdk_version := $(lastword $(call numerically_sort, \
276 $(filter-out current, \
277 $(patsubst $(SRC_API_DIR)/%.txt,%, $(wildcard $(SRC_API_DIR)/*.txt)) \
278 )\
279 ))
280
281LOCAL_APIDIFF_OLDAPI := $(LOCAL_PATH)/../../$(SRC_API_DIR)/$(last_released_sdk_version)
282LOCAL_APIDIFF_NEWAPI := $(LOCAL_PATH)/../../$(basename $(INTERNAL_PLATFORM_API_FILE))
283
284include $(BUILD_APIDIFF)
285
Jeff Sharkeyc8dc2542017-12-08 14:52:37 -0700286# Hack to get diffs included in docs output
287out_zip := $(OUT_DOCS)/$(LOCAL_MODULE)-docs.zip
288$(out_zip): $(full_target)
289
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700290# ==== System API diff ===========================
291include $(CLEAR_VARS)
292
293LOCAL_SRC_FILES := $(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800294LOCAL_GENERATED_SOURCES := $(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800295LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700296LOCAL_JAVA_LIBRARIES := $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
297LOCAL_MODULE_CLASS := $(framework_docs_LOCAL_MODULE_CLASS)
298LOCAL_ADDITIONAL_JAVA_DIR := $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
299LOCAL_ADDITIONAL_DEPENDENCIES := \
300 $(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) \
301 $(INTERNAL_PLATFORM_SYSTEM_API_FILE)
302
303LOCAL_MODULE := offline-system-sdk-referenceonly
304
305last_released_sdk_version := $(lastword $(call numerically_sort, \
306 $(filter-out current, \
307 $(patsubst $(SRC_SYSTEM_API_DIR)/%.txt,%, $(wildcard $(SRC_SYSTEM_API_DIR)/*.txt)) \
308 )\
309 ))
310
311LOCAL_APIDIFF_OLDAPI := $(LOCAL_PATH)/../../$(SRC_SYSTEM_API_DIR)/$(last_released_sdk_version)
312LOCAL_APIDIFF_NEWAPI := $(LOCAL_PATH)/../../$(basename $(INTERNAL_PLATFORM_SYSTEM_API_FILE))
313
314include $(BUILD_APIDIFF)
315
Jeff Sharkeyc8dc2542017-12-08 14:52:37 -0700316# Hack to get diffs included in docs output
317out_zip := $(OUT_DOCS)/$(LOCAL_MODULE)-docs.zip
318$(out_zip): $(full_target)
319
Bart Searsa8cc0582015-05-07 03:23:20 +0000320$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE))
Bart Searsa8cc0582015-05-07 03:23:20 +0000321$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE))
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000322$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE))
323
David Brazdil68e1c1d2018-03-08 14:32:27 +0000324# ==== the complete hidden api list ===================================
325include $(CLEAR_VARS)
326
327LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
328LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
329LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
330LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
331LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
332LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
333LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
334LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
335LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
336
337LOCAL_MODULE := hidden-api-list
338
339LOCAL_DROIDDOC_OPTIONS:=\
340 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
341 -referenceonly \
342 -showUnannotated \
343 -showAnnotation android.annotation.SystemApi \
344 -showAnnotation android.annotation.TestApi \
345 -privateDexApi $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
346 -nodocs
347
348LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
349
350LOCAL_UNINSTALLABLE_MODULE := true
351
352include $(BUILD_DROIDDOC)
353
354$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
355
Bart Searsa8cc0582015-05-07 03:23:20 +0000356# ==== check javadoc comments but don't generate docs ========
357include $(CLEAR_VARS)
358
359LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800360LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800361LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000362LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
363LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
364LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
365LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
366LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
367LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
368
369LOCAL_MODULE := doc-comment-check
370
371LOCAL_DROIDDOC_OPTIONS:=\
372 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700373 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000374 -parsecomments
375
Scott Main15b85172017-02-21 14:30:58 -0800376LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000377
378LOCAL_UNINSTALLABLE_MODULE := true
379
380include $(BUILD_DROIDDOC)
381
Bart Searsa8cc0582015-05-07 03:23:20 +0000382# Run this for checkbuild
383checkbuild: doc-comment-check-docs
384# Check comment when you are updating the API
385update-api: doc-comment-check-docs
386
387# ==== static html in the sdk ==================================
388include $(CLEAR_VARS)
389
390LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800391LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800392LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000393LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
394LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
395LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
396LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
397LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
398LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
399
400LOCAL_MODULE := offline-sdk
401
402LOCAL_DROIDDOC_OPTIONS:=\
403 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
404 -offlinemode \
405 -title "Android SDK" \
406 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
smain@google.com00de8c52016-03-07 18:38:08 -0800407 -sdkvalues $(OUT_DOCS) \
smain@google.com8562ab52016-06-14 17:11:57 -0700408 -hdf android.whichdoc offline
409
Scott Main15b85172017-02-21 14:30:58 -0800410LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
smain@google.com8562ab52016-06-14 17:11:57 -0700411
412include $(BUILD_DROIDDOC)
413
414static_doc_index_redirect := $(out_dir)/index.html
415$(static_doc_index_redirect): \
416 $(LOCAL_PATH)/docs/docs-preview-index.html | $(ACP)
417 $(hide) mkdir -p $(dir $@)
418 $(hide) $(ACP) $< $@
419
420$(full_target): $(static_doc_index_redirect)
smain@google.com8562ab52016-06-14 17:11:57 -0700421
422
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700423# ==== Public API static reference docs ==================================
smain@google.com8562ab52016-06-14 17:11:57 -0700424include $(CLEAR_VARS)
425
426LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800427LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800428LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
smain@google.com8562ab52016-06-14 17:11:57 -0700429LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
430LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
431LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
432LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
433LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
434LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
435
436LOCAL_MODULE := offline-sdk-referenceonly
437
438LOCAL_DROIDDOC_OPTIONS:=\
439 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
440 -offlinemode \
441 -title "Android SDK" \
442 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
443 -sdkvalues $(OUT_DOCS) \
smain@google.com00de8c52016-03-07 18:38:08 -0800444 -hdf android.whichdoc offline \
Scott Mainf8cdfc82017-03-21 13:43:31 -0700445 -referenceonly
smain@google.com00de8c52016-03-07 18:38:08 -0800446
Scott Main15b85172017-02-21 14:30:58 -0800447LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
smain@google.com00de8c52016-03-07 18:38:08 -0800448
449include $(BUILD_DROIDDOC)
450
451static_doc_index_redirect := $(out_dir)/index.html
smain@google.com151833a2016-08-31 08:42:09 -0700452$(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html
Dan Willemsen98ff0b72016-03-23 00:42:44 -0700453 $(copy-file-to-target)
smain@google.com00de8c52016-03-07 18:38:08 -0800454
smain@google.com2f2365d2016-09-21 14:05:50 -0700455static_doc_properties := $(out_dir)/source.properties
456$(static_doc_properties): \
457 $(LOCAL_PATH)/docs/source.properties | $(ACP)
458 $(hide) mkdir -p $(dir $@)
459 $(hide) $(ACP) $< $@
460
smain@google.com00de8c52016-03-07 18:38:08 -0800461$(full_target): $(static_doc_index_redirect)
smain@google.com2f2365d2016-09-21 14:05:50 -0700462$(full_target): $(static_doc_properties)
smain@google.com00de8c52016-03-07 18:38:08 -0800463
smain@google.com7aca8be2016-03-10 14:13:30 -0800464
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700465# ==== System API static reference docs ==================================
466include $(CLEAR_VARS)
467
468LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800469LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800470LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700471LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
472LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
473LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
474LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
475LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
476LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
477
478LOCAL_MODULE := offline-system-sdk-referenceonly
479
480LOCAL_DROIDDOC_OPTIONS:=\
481 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
482 -hide 101 -hide 104 -hide 108 \
483 -showAnnotation android.annotation.SystemApi \
484 -offlinemode \
485 -title "Android System SDK" \
486 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
487 -sdkvalues $(OUT_DOCS) \
488 -hdf android.whichdoc offline \
489 -referenceonly
490
491LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
492
493include $(BUILD_DROIDDOC)
494
495static_doc_index_redirect := $(out_dir)/index.html
496$(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html
497 $(copy-file-to-target)
498
499static_doc_properties := $(out_dir)/source.properties
500$(static_doc_properties): \
501 $(LOCAL_PATH)/docs/source.properties | $(ACP)
502 $(hide) mkdir -p $(dir $@)
503 $(hide) $(ACP) $< $@
504
505$(full_target): $(static_doc_index_redirect)
506$(full_target): $(static_doc_properties)
507$(full_target): $(framework_built)
508
509
Bart Searsa8cc0582015-05-07 03:23:20 +0000510# ==== docs for the web (on the androiddevdocs app engine server) =======================
511include $(CLEAR_VARS)
512
513LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800514LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800515LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000516LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
517LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
518LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
519LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
520LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
521LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
522LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
523LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
524
525LOCAL_MODULE := online-sdk
526
527LOCAL_DROIDDOC_OPTIONS:= \
528 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
529 -toroot / \
530 -hdf android.whichdoc online \
531 $(sample_groups) \
532 -hdf android.hasSamples true \
533 -samplesdir $(samples_dir)
534
Scott Main15b85172017-02-21 14:30:58 -0800535LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000536
537include $(BUILD_DROIDDOC)
538
539# ==== docs for the web (on the androiddevdocs app engine server) =======================
Bart Searsa8cc0582015-05-07 03:23:20 +0000540include $(CLEAR_VARS)
541
542LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800543LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800544LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000545LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
546LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
547LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
548LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
549LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
550LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
551LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
552LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
553
554LOCAL_MODULE := online-system-api-sdk
555
556LOCAL_DROIDDOC_OPTIONS:= \
557 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700558 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000559 -showAnnotation android.annotation.SystemApi \
560 -title "Android SDK - Including system APIs." \
561 -toroot / \
Gina Dimino98ad8882016-05-31 17:25:48 -0700562 -hide 101 \
563 -hide 104 \
564 -hide 108 \
Bart Searsa8cc0582015-05-07 03:23:20 +0000565 -hdf android.whichdoc online \
566 $(sample_groups) \
567 -hdf android.hasSamples true \
568 -samplesdir $(samples_dir)
569
Scott Main15b85172017-02-21 14:30:58 -0800570LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Jeff Sharkey05461c02017-05-09 19:01:09 -0600571
Bart Searsa8cc0582015-05-07 03:23:20 +0000572LOCAL_UNINSTALLABLE_MODULE := true
573
574include $(BUILD_DROIDDOC)
Bart Searsa8cc0582015-05-07 03:23:20 +0000575
576# ==== docs for the web (on the devsite app engine server) =======================
577include $(CLEAR_VARS)
578LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800579LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800580LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000581LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
582LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
583LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
584LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
585LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
586LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
587LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
588# specify a second html input dir and an output path relative to OUT_DIR)
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700589LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
Bart Searsa8cc0582015-05-07 03:23:20 +0000590
591LOCAL_MODULE := ds
592
593LOCAL_DROIDDOC_OPTIONS:= \
594 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000595 -toroot / \
596 -hdf android.whichdoc online \
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700597 -devsite \
Scott Main4f9b48c2017-12-19 13:43:45 -0800598 -yamlV2 \
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700599 $(sample_groups) \
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700600 -hdf android.hasSamples true \
601 -samplesdir $(samples_dir)
Bart Searsa8cc0582015-05-07 03:23:20 +0000602
Scott Main15b85172017-02-21 14:30:58 -0800603LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000604
605include $(BUILD_DROIDDOC)
606
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700607# ==== docs for the web (on the devsite app engine server) =======================
608include $(CLEAR_VARS)
609LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800610LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800611LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700612LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
613LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
614LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
615LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
616LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
617LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
618LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
619# specify a second html input dir and an output path relative to OUT_DIR)
620LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
621
622LOCAL_MODULE := ds-static
623
624LOCAL_DROIDDOC_OPTIONS:= \
625 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
626 -hdf android.whichdoc online \
627 -staticonly \
628 -toroot / \
629 -devsite \
630 -ignoreJdLinks
631
Scott Main15b85172017-02-21 14:30:58 -0800632LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700633
634include $(BUILD_DROIDDOC)
635
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700636# ==== generates full navtree for resolving @links in ds postprocessing ====
637include $(CLEAR_VARS)
638
639LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800640LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800641LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700642LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
643LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
644LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
645LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
646LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
647LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
648
649LOCAL_MODULE := ds-ref-navtree
650
651LOCAL_DROIDDOC_OPTIONS:= \
652 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
653 -hdf android.whichdoc online \
654 -toroot / \
655 -atLinksNavtree \
656 -navtreeonly
657
Scott Main15b85172017-02-21 14:30:58 -0800658LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700659
660include $(BUILD_DROIDDOC)
661
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800662# ==== site updates for docs (on the androiddevdocs app engine server) =======================
Bart Searsa8cc0582015-05-07 03:23:20 +0000663include $(CLEAR_VARS)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800664
Bart Searsa8cc0582015-05-07 03:23:20 +0000665LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800666LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800667LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000668LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
669LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
670LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
671LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800672LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
Bart Searsa8cc0582015-05-07 03:23:20 +0000673LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
674LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800675LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
Bart Searsa8cc0582015-05-07 03:23:20 +0000676
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800677LOCAL_MODULE := online-sdk-dev
Bart Searsa8cc0582015-05-07 03:23:20 +0000678
679LOCAL_DROIDDOC_OPTIONS:= \
680 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
681 -toroot / \
682 -hdf android.whichdoc online \
683 $(sample_groups) \
684 -hdf android.hasSamples true \
685 -samplesdir $(samples_dir)
686
Scott Main15b85172017-02-21 14:30:58 -0800687LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000688
689include $(BUILD_DROIDDOC)
690
Bart Searsa8cc0582015-05-07 03:23:20 +0000691# ==== docs that have all of the stuff that's @hidden =======================
692include $(CLEAR_VARS)
693
694LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800695LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800696LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000697LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
698LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
699LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
700LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
701LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
702LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
703
704LOCAL_MODULE := hidden
705LOCAL_DROIDDOC_OPTIONS:=\
706 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700707 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000708 -title "Android SDK - Including hidden APIs."
709# -hidden
710
Scott Main15b85172017-02-21 14:30:58 -0800711LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000712
713include $(BUILD_DROIDDOC)
714
Joe Onorato1754d742016-11-21 17:51:35 -0800715# ==== java proto host library ==============================
716include $(CLEAR_VARS)
717LOCAL_MODULE := platformprotos
718LOCAL_PROTOC_OPTIMIZE_TYPE := full
719LOCAL_PROTOC_FLAGS := \
720 -Iexternal/protobuf/src
721LOCAL_SOURCE_FILES_ALL_GENERATED := true
722LOCAL_SRC_FILES := \
Mike Mada3a2952017-11-13 12:06:45 -0800723 cmds/am/proto/instrumentation_data.proto \
Primiano Tuccie4d44912018-01-10 12:14:50 +0000724 cmds/statsd/src/perfetto/perfetto_config.proto \
Joe Onorato1754d742016-11-21 17:51:35 -0800725 $(call all-proto-files-under, core/proto) \
Chenjie Yu15176cd2017-11-22 12:36:41 -0800726 $(call all-proto-files-under, libs/incident/proto) \
727 $(call all-proto-files-under, cmds/statsd/src)
Andreas Gampe3e429f32018-02-15 15:12:38 -0800728# b/72714520
729LOCAL_ERROR_PRONE_FLAGS := -Xep:MissingOverride:OFF
Joe Onorato1754d742016-11-21 17:51:35 -0800730include $(BUILD_HOST_JAVA_LIBRARY)
731
Steven Timotius7ece0422017-08-03 13:37:26 -0700732# ==== java proto device library (for test only) ==============================
733include $(CLEAR_VARS)
734LOCAL_MODULE := platformprotosnano
Joe Onorato62c220b2017-11-18 20:32:56 -0800735LOCAL_MODULE_TAGS := tests
Steven Timotius7ece0422017-08-03 13:37:26 -0700736LOCAL_PROTOC_OPTIMIZE_TYPE := nano
737LOCAL_PROTOC_FLAGS := \
738 -Iexternal/protobuf/src
739LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \
740 store_unknown_fields = true
Jiyong Parkf0048392018-02-12 21:57:59 +0900741LOCAL_SDK_VERSION := current
Steven Timotius7ece0422017-08-03 13:37:26 -0700742LOCAL_SRC_FILES := \
Yi Jin437aa6e2018-01-10 11:34:26 -0800743 $(call all-proto-files-under, core/proto) \
744 $(call all-proto-files-under, libs/incident/proto/android/os)
Steven Timotius7ece0422017-08-03 13:37:26 -0700745include $(BUILD_STATIC_JAVA_LIBRARY)
746
Bart Searsa8cc0582015-05-07 03:23:20 +0000747
Joe Onorato62c220b2017-11-18 20:32:56 -0800748# ==== java proto device library (for test only) ==============================
749include $(CLEAR_VARS)
750LOCAL_MODULE := platformprotoslite
751LOCAL_MODULE_TAGS := tests
752LOCAL_PROTOC_OPTIMIZE_TYPE := lite
753LOCAL_PROTOC_FLAGS := \
754 -Iexternal/protobuf/src
755LOCAL_SRC_FILES := \
Yi Jin437aa6e2018-01-10 11:34:26 -0800756 $(call all-proto-files-under, core/proto) \
757 $(call all-proto-files-under, libs/incident/proto/android/os)
Andreas Gampe93b64c92018-01-30 18:50:34 -0800758# Protos have lots of MissingOverride and similar.
759LOCAL_ERROR_PRONE_FLAGS := -XepDisableAllChecks
Joe Onorato62c220b2017-11-18 20:32:56 -0800760include $(BUILD_STATIC_JAVA_LIBRARY)
761
David Brazdil0649c8d2018-01-22 22:23:13 +0000762# ==== hiddenapi lists =======================================
763
David Brazdil36bbf122018-03-28 11:28:39 +0100764# Copy light and dark greylist over into the build folder.
David Brazdilf16ac002018-01-26 11:13:35 +0000765# This is for ART buildbots which need to mock these lists and have alternative
766# rules for building them. Other rules in the build system should depend on the
767# files in the build folder.
768
David Brazdil357170b12018-03-26 16:02:23 +0100769# Automatically add all methods which match the following signatures.
770# These need to be greylisted in order to allow applications to write their
771# own serializers.
772$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): REGEX_SERIALIZATION := \
773 "readObject\(Ljava/io/ObjectInputStream;\)V" \
774 "readObjectNoData\(\)V" \
775 "readResolve\(\)Ljava/lang/Object;" \
776 "serialVersionUID:J" \
777 "serialPersistentFields:\[Ljava/io/ObjectStreamField;" \
778 "writeObject\(Ljava/io/ObjectOutputStream;\)V" \
779 "writeReplace\(\)Ljava/lang/Object;"
780$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): PRIVATE_API := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
David Brazdil873d1d32018-03-13 09:41:23 +0000781# Temporarily merge light greylist from two files. Vendor list will become dark
782# grey once we remove the UI toast.
783$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): frameworks/base/config/hiddenapi-light-greylist.txt \
David Brazdil357170b12018-03-26 16:02:23 +0100784 frameworks/base/config/hiddenapi-vendor-list.txt \
785 $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
786 sort frameworks/base/config/hiddenapi-light-greylist.txt \
787 frameworks/base/config/hiddenapi-vendor-list.txt \
788 <(grep -E "\->("$(subst $(space),"|",$(REGEX_SERIALIZATION))")$$" $(PRIVATE_API)) \
789 > $@
David Brazdilf16ac002018-01-26 11:13:35 +0000790
David Brazdil36bbf122018-03-28 11:28:39 +0100791$(eval $(call copy-one-file,frameworks/base/config/hiddenapi-dark-greylist.txt,\
792 $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST)))
793
Nicolas Geoffray90fa8ef2018-02-08 17:27:15 +0000794# Generate dark greylist as private API minus (blacklist plus light greylist).
David Brazdil0649c8d2018-01-22 22:23:13 +0000795
David Brazdil36bbf122018-03-28 11:28:39 +0100796$(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST): PRIVATE_API := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
797$(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST): LIGHT_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST)
798$(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST): DARK_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST)
799$(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST): $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
800 $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST) \
801 $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST)
802 if [ ! -z "`comm -12 <(sort $(LIGHT_GREYLIST)) <(sort $(DARK_GREYLIST))`" ]; then \
803 echo "There should be no overlap between $(LIGHT_GREYLIST) and $(DARK_GREYLIST)" 1>&2; \
804 comm -12 <(sort $(LIGHT_GREYLIST)) <(sort $(DARK_GREYLIST)) 1>&2; \
David Brazdil0649c8d2018-01-22 22:23:13 +0000805 exit 1; \
David Brazdilb43351f2018-01-31 14:43:36 +0000806 elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(LIGHT_GREYLIST))`" ]; then \
807 echo "$(LIGHT_GREYLIST) must be a subset of $(PRIVATE_API)" 1>&2; \
David Brazdil36bbf122018-03-28 11:28:39 +0100808 comm -13 <(sort $(PRIVATE_API)) <(sort $(LIGHT_GREYLIST)) 1>&2; \
809 exit 2; \
810 elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(DARK_GREYLIST))`" ]; then \
811 echo "$(DARK_GREYLIST) must be a subset of $(PRIVATE_API)" 1>&2; \
812 comm -13 <(sort $(PRIVATE_API)) <(sort $(DARK_GREYLIST)) 1>&2; \
David Brazdil0649c8d2018-01-22 22:23:13 +0000813 exit 3; \
814 fi
David Brazdil36bbf122018-03-28 11:28:39 +0100815 comm -23 <(sort $(PRIVATE_API)) <(sort $(LIGHT_GREYLIST) $(DARK_GREYLIST)) > $@
David Brazdil0649c8d2018-01-22 22:23:13 +0000816
Bart Searsa8cc0582015-05-07 03:23:20 +0000817# Include subdirectory makefiles
818# ============================================================
819
820# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
821# team really wants is to build the stuff defined by this makefile.
822ifeq (,$(ONE_SHOT_MAKEFILE))
823include $(call first-makefiles-under,$(LOCAL_PATH))
824endif
825
Holly Jiuyu Sunbbc85802017-12-21 18:44:59 -0800826endif # ANDROID_BUILD_EMBEDDED
827