blob: 86d691d9170737df5061125862938908b4aeebf6 [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 \
Rayhaan Jaufeerally2e47a6e2015-08-03 13:54:28 +0100146 icu4j \
Bart Searsa8cc0582015-05-07 03:23:20 +0000147 framework \
Paul Duffinc08090f2017-06-29 14:58:43 +0100148 voip-common \
Bart Searsa8cc0582015-05-07 03:23:20 +0000149
Alan Viverette9ca513e2017-04-05 10:21:58 -0400150# Platform docs can refer to Support Library APIs, but we don't actually build
151# them as part of the docs target, so we need to include them on the classpath.
Bart Searsa8cc0582015-05-07 03:23:20 +0000152framework_docs_LOCAL_JAVA_LIBRARIES := \
153 $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES) \
154 $(FRAMEWORKS_SUPPORT_JAVA_LIBRARIES)
155
156framework_docs_LOCAL_MODULE_CLASS := JAVA_LIBRARIES
157framework_docs_LOCAL_DROIDDOC_HTML_DIR := docs/html
158# The since flag (-since N.xml API_LEVEL) is used to add API Level information
159# to the reference documentation. Must be in order of oldest to newest.
160#
161# Conscrypt (com.android.org.conscrypt) is an implementation detail and should
162# not be referenced in the documentation.
163framework_docs_LOCAL_DROIDDOC_OPTIONS := \
Jeff Sharkey0f3f60b2017-04-24 18:06:20 -0600164 -android \
Bart Searsa8cc0582015-05-07 03:23:20 +0000165 -knowntags ./frameworks/base/docs/knowntags.txt \
Narayan Kamath2c4f2842015-07-27 14:02:11 +0100166 -knowntags ./libcore/known_oj_tags.txt \
Jeff Sharkeybfc4fcd2017-06-05 17:38:17 -0600167 -manifest ./frameworks/base/core/res/AndroidManifest.xml \
Neil Fuller57157fb2017-11-24 15:58:38 +0000168 -hidePackage com.android.okhttp \
Bart Searsa8cc0582015-05-07 03:23:20 +0000169 -hidePackage com.android.org.conscrypt \
Neil Fuller371c08c2017-11-27 10:32:07 +0000170 -hidePackage com.android.server \
Bart Searsa8cc0582015-05-07 03:23:20 +0000171 -since $(SRC_API_DIR)/1.xml 1 \
172 -since $(SRC_API_DIR)/2.xml 2 \
173 -since $(SRC_API_DIR)/3.xml 3 \
174 -since $(SRC_API_DIR)/4.xml 4 \
175 -since $(SRC_API_DIR)/5.xml 5 \
176 -since $(SRC_API_DIR)/6.xml 6 \
177 -since $(SRC_API_DIR)/7.xml 7 \
178 -since $(SRC_API_DIR)/8.xml 8 \
179 -since $(SRC_API_DIR)/9.xml 9 \
180 -since $(SRC_API_DIR)/10.xml 10 \
181 -since $(SRC_API_DIR)/11.xml 11 \
182 -since $(SRC_API_DIR)/12.xml 12 \
183 -since $(SRC_API_DIR)/13.xml 13 \
184 -since $(SRC_API_DIR)/14.txt 14 \
185 -since $(SRC_API_DIR)/15.txt 15 \
186 -since $(SRC_API_DIR)/16.txt 16 \
187 -since $(SRC_API_DIR)/17.txt 17 \
188 -since $(SRC_API_DIR)/18.txt 18 \
189 -since $(SRC_API_DIR)/19.txt 19 \
190 -since $(SRC_API_DIR)/20.txt 20 \
191 -since $(SRC_API_DIR)/21.txt 21 \
192 -since $(SRC_API_DIR)/22.txt 22 \
Joe Fernandez1827e322015-08-12 19:45:22 -0700193 -since $(SRC_API_DIR)/23.txt 23 \
Dirk Dougherty5f60f7c2016-06-14 16:26:28 -0700194 -since $(SRC_API_DIR)/24.txt 24 \
Dirk Dougherty3376f582016-10-14 10:27:08 -0700195 -since $(SRC_API_DIR)/25.txt 25 \
Dirk Doughertyfdad0ba2017-06-09 14:43:32 -0700196 -since $(SRC_API_DIR)/26.txt 26 \
Andrew Solovaya6019b22017-10-06 14:27:20 -0700197 -since $(SRC_API_DIR)/27.txt 27 \
Andrew Solovay61204ce2018-02-24 16:44:28 -0800198 -since ./frameworks/base/api/current.txt P \
Jeff Sharkeyc204c222017-11-27 15:02:10 -0700199 -werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 \
Jeff Sharkey0f3f60b2017-04-24 18:06:20 -0600200 -overview $(LOCAL_PATH)/core/java/overview.html \
Bart Searsa8cc0582015-05-07 03:23:20 +0000201
202framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR:= \
203 $(call intermediates-dir-for,JAVA_LIBRARIES,framework,,COMMON)
204
205framework_docs_LOCAL_ADDITIONAL_JAVA_DIR:= \
Alan Viverette9ca513e2017-04-05 10:21:58 -0400206 $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
Bart Searsa8cc0582015-05-07 03:23:20 +0000207
208framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES := \
Narayan Kamathc21739a2015-07-14 13:39:23 +0100209 frameworks/base/docs/knowntags.txt \
Colin Cross72d359f2017-10-27 10:46:53 -0700210 $(libcore_to_document_generated)
Bart Searsa8cc0582015-05-07 03:23:20 +0000211
212samples_dir := development/samples/browseable
213
214# Whitelist of valid groups, used for default TOC grouping. Each sample must
215# belong to one (and only one) group. Assign samples to groups by setting
216# a sample.group var to one of these groups in the sample's _index.jd.
217sample_groups := -samplegroup Admin \
218 -samplegroup Background \
219 -samplegroup Connectivity \
220 -samplegroup Content \
221 -samplegroup Input \
222 -samplegroup Media \
223 -samplegroup Notification \
224 -samplegroup RenderScript \
225 -samplegroup Security \
226 -samplegroup Sensors \
Trevor Johns4cbe3592015-05-27 14:50:51 -0700227 -samplegroup System \
Bart Searsa8cc0582015-05-07 03:23:20 +0000228 -samplegroup Testing \
229 -samplegroup UI \
230 -samplegroup Views \
231 -samplegroup Wearable
232
233## SDK version identifiers used in the published docs
234 # major[.minor] version for current SDK. (full releases only)
smain@google.comdde8deb2016-08-29 18:36:50 -0700235framework_docs_SDK_VERSION:=7.0
Bart Searsa8cc0582015-05-07 03:23:20 +0000236 # release version (ie "Release x") (full releases only)
237framework_docs_SDK_REL_ID:=1
238
239framework_docs_LOCAL_DROIDDOC_OPTIONS += \
Billy Lamberta75dbc8f2017-03-03 13:09:15 -0800240 -hdf dac true \
Scott Mainf8cdfc82017-03-21 13:43:31 -0700241 -hdf sdk.codename O \
242 -hdf sdk.preview.version 1 \
Bart Searsa8cc0582015-05-07 03:23:20 +0000243 -hdf sdk.version $(framework_docs_SDK_VERSION) \
244 -hdf sdk.rel.id $(framework_docs_SDK_REL_ID) \
Scott Mainf8cdfc82017-03-21 13:43:31 -0700245 -hdf sdk.preview 0 \
246 -resourcesdir $(LOCAL_PATH)/docs/html/reference/images/ \
247 -resourcesoutdir reference/android/images/
Bart Searsa8cc0582015-05-07 03:23:20 +0000248
Alan Viverette9ca513e2017-04-05 10:21:58 -0400249# Federate Support Library references against local API file.
250framework_docs_LOCAL_DROIDDOC_OPTIONS += \
251 -federate SupportLib https://developer.android.com \
252 -federationapi SupportLib prebuilts/sdk/current/support-api.txt
253
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700254# ==== Public API diff ===========================
Alan Viverette6b7354c2017-07-13 17:10:14 -0400255include $(CLEAR_VARS)
256
257LOCAL_SRC_FILES := $(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800258LOCAL_GENERATED_SOURCES := $(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800259LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Alan Viverette6b7354c2017-07-13 17:10:14 -0400260LOCAL_JAVA_LIBRARIES := $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
261LOCAL_MODULE_CLASS := $(framework_docs_LOCAL_MODULE_CLASS)
262LOCAL_ADDITIONAL_JAVA_DIR := $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
263LOCAL_ADDITIONAL_DEPENDENCIES := \
264 $(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) \
265 $(INTERNAL_PLATFORM_API_FILE)
266
267LOCAL_MODULE := offline-sdk-referenceonly
268
269last_released_sdk_version := $(lastword $(call numerically_sort, \
270 $(filter-out current, \
271 $(patsubst $(SRC_API_DIR)/%.txt,%, $(wildcard $(SRC_API_DIR)/*.txt)) \
272 )\
273 ))
274
275LOCAL_APIDIFF_OLDAPI := $(LOCAL_PATH)/../../$(SRC_API_DIR)/$(last_released_sdk_version)
276LOCAL_APIDIFF_NEWAPI := $(LOCAL_PATH)/../../$(basename $(INTERNAL_PLATFORM_API_FILE))
277
278include $(BUILD_APIDIFF)
279
Jeff Sharkeyc8dc2542017-12-08 14:52:37 -0700280# Hack to get diffs included in docs output
281out_zip := $(OUT_DOCS)/$(LOCAL_MODULE)-docs.zip
282$(out_zip): $(full_target)
283
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700284# ==== System API diff ===========================
285include $(CLEAR_VARS)
286
287LOCAL_SRC_FILES := $(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800288LOCAL_GENERATED_SOURCES := $(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800289LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700290LOCAL_JAVA_LIBRARIES := $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
291LOCAL_MODULE_CLASS := $(framework_docs_LOCAL_MODULE_CLASS)
292LOCAL_ADDITIONAL_JAVA_DIR := $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
293LOCAL_ADDITIONAL_DEPENDENCIES := \
294 $(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) \
295 $(INTERNAL_PLATFORM_SYSTEM_API_FILE)
296
297LOCAL_MODULE := offline-system-sdk-referenceonly
298
299last_released_sdk_version := $(lastword $(call numerically_sort, \
300 $(filter-out current, \
301 $(patsubst $(SRC_SYSTEM_API_DIR)/%.txt,%, $(wildcard $(SRC_SYSTEM_API_DIR)/*.txt)) \
302 )\
303 ))
304
305LOCAL_APIDIFF_OLDAPI := $(LOCAL_PATH)/../../$(SRC_SYSTEM_API_DIR)/$(last_released_sdk_version)
306LOCAL_APIDIFF_NEWAPI := $(LOCAL_PATH)/../../$(basename $(INTERNAL_PLATFORM_SYSTEM_API_FILE))
307
308include $(BUILD_APIDIFF)
309
Jeff Sharkeyc8dc2542017-12-08 14:52:37 -0700310# Hack to get diffs included in docs output
311out_zip := $(OUT_DOCS)/$(LOCAL_MODULE)-docs.zip
312$(out_zip): $(full_target)
313
Bart Searsa8cc0582015-05-07 03:23:20 +0000314# ==== the api stubs and current.xml ===========================
315include $(CLEAR_VARS)
316
317LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800318LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800319LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000320LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
321LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
322LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
323LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
324LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
325LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
326
327LOCAL_MODULE := api-stubs
328
Ying Wang0f92a2e2015-07-16 14:20:22 -0700329LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_stubs_current_intermediates/src
330
Bart Searsa8cc0582015-05-07 03:23:20 +0000331LOCAL_DROIDDOC_OPTIONS:=\
332 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700333 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000334 -api $(INTERNAL_PLATFORM_API_FILE) \
David Brazdila793f3f2018-01-16 15:03:20 +0000335 -privateApi $(INTERNAL_PLATFORM_PRIVATE_API_FILE) \
336 -privateDexApi $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000337 -removedApi $(INTERNAL_PLATFORM_REMOVED_API_FILE) \
338 -nodocs
339
Scott Main15b85172017-02-21 14:30:58 -0800340LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000341
342LOCAL_UNINSTALLABLE_MODULE := true
343
344include $(BUILD_DROIDDOC)
345
David Brazdila793f3f2018-01-16 15:03:20 +0000346$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_API_FILE) \
347 $(INTERNAL_PLATFORM_PRIVATE_API_FILE) \
348 $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
Bart Searsa8cc0582015-05-07 03:23:20 +0000349$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE))
350
351# ==== the system api stubs ===================================
352include $(CLEAR_VARS)
353
354LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800355LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800356LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000357LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
358LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
359LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
360LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
361LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
362LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
363
364LOCAL_MODULE := system-api-stubs
365
Ying Wang0f92a2e2015-07-16 14:20:22 -0700366LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_system_stubs_current_intermediates/src
367
Bart Searsa8cc0582015-05-07 03:23:20 +0000368LOCAL_DROIDDOC_OPTIONS:=\
369 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700370 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000371 -showAnnotation android.annotation.SystemApi \
372 -api $(INTERNAL_PLATFORM_SYSTEM_API_FILE) \
David Brazdila793f3f2018-01-16 15:03:20 +0000373 -privateApi $(INTERNAL_PLATFORM_SYSTEM_PRIVATE_API_FILE) \
374 -privateDexApi $(INTERNAL_PLATFORM_SYSTEM_PRIVATE_DEX_API_FILE) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000375 -removedApi $(INTERNAL_PLATFORM_SYSTEM_REMOVED_API_FILE) \
Jeff Sharkey05461c02017-05-09 19:01:09 -0600376 -exactApi $(INTERNAL_PLATFORM_SYSTEM_EXACT_API_FILE) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000377 -nodocs
378
Scott Main15b85172017-02-21 14:30:58 -0800379LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000380
381LOCAL_UNINSTALLABLE_MODULE := true
382
383include $(BUILD_DROIDDOC)
384
David Brazdila793f3f2018-01-16 15:03:20 +0000385$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_SYSTEM_API_FILE) \
386 $(INTERNAL_PLATFORM_SYSTEM_PRIVATE_API_FILE) \
387 $(INTERNAL_PLATFORM_SYSTEM_PRIVATE_DEX_API_FILE)
Bart Searsa8cc0582015-05-07 03:23:20 +0000388$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE))
389
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000390# ==== the test api stubs ===================================
391include $(CLEAR_VARS)
392
393LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800394LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800395LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000396LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
397LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
398LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
399LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
400LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
401LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
402
403LOCAL_MODULE := test-api-stubs
404
405LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_test_stubs_current_intermediates/src
406
407LOCAL_DROIDDOC_OPTIONS:=\
408 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700409 -referenceonly \
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000410 -stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_test_stubs_current_intermediates/src \
411 -showAnnotation android.annotation.TestApi \
412 -api $(INTERNAL_PLATFORM_TEST_API_FILE) \
413 -removedApi $(INTERNAL_PLATFORM_TEST_REMOVED_API_FILE) \
Jeff Sharkey05461c02017-05-09 19:01:09 -0600414 -exactApi $(INTERNAL_PLATFORM_TEST_EXACT_API_FILE) \
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000415 -nodocs
416
Scott Main15b85172017-02-21 14:30:58 -0800417LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000418
419LOCAL_UNINSTALLABLE_MODULE := true
420
421include $(BUILD_DROIDDOC)
422
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000423$(INTERNAL_PLATFORM_TEST_API_FILE): $(full_target)
424$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE))
425
Bart Searsa8cc0582015-05-07 03:23:20 +0000426# ==== check javadoc comments but don't generate docs ========
427include $(CLEAR_VARS)
428
429LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800430LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800431LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000432LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
433LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
434LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
435LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
436LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
437LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
438
439LOCAL_MODULE := doc-comment-check
440
441LOCAL_DROIDDOC_OPTIONS:=\
442 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700443 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000444 -parsecomments
445
Scott Main15b85172017-02-21 14:30:58 -0800446LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000447
448LOCAL_UNINSTALLABLE_MODULE := true
449
450include $(BUILD_DROIDDOC)
451
Bart Searsa8cc0582015-05-07 03:23:20 +0000452# Run this for checkbuild
453checkbuild: doc-comment-check-docs
454# Check comment when you are updating the API
455update-api: doc-comment-check-docs
456
457# ==== static html in the sdk ==================================
458include $(CLEAR_VARS)
459
460LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800461LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800462LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000463LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
464LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
465LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
466LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
467LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
468LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
469
470LOCAL_MODULE := offline-sdk
471
472LOCAL_DROIDDOC_OPTIONS:=\
473 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
474 -offlinemode \
475 -title "Android SDK" \
476 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
smain@google.com00de8c52016-03-07 18:38:08 -0800477 -sdkvalues $(OUT_DOCS) \
smain@google.com8562ab52016-06-14 17:11:57 -0700478 -hdf android.whichdoc offline
479
Scott Main15b85172017-02-21 14:30:58 -0800480LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
smain@google.com8562ab52016-06-14 17:11:57 -0700481
482include $(BUILD_DROIDDOC)
483
484static_doc_index_redirect := $(out_dir)/index.html
485$(static_doc_index_redirect): \
486 $(LOCAL_PATH)/docs/docs-preview-index.html | $(ACP)
487 $(hide) mkdir -p $(dir $@)
488 $(hide) $(ACP) $< $@
489
490$(full_target): $(static_doc_index_redirect)
smain@google.com8562ab52016-06-14 17:11:57 -0700491
492
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700493# ==== Public API static reference docs ==================================
smain@google.com8562ab52016-06-14 17:11:57 -0700494include $(CLEAR_VARS)
495
496LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800497LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800498LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
smain@google.com8562ab52016-06-14 17:11:57 -0700499LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
500LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
501LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
502LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
503LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
504LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
505
506LOCAL_MODULE := offline-sdk-referenceonly
507
508LOCAL_DROIDDOC_OPTIONS:=\
509 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
510 -offlinemode \
511 -title "Android SDK" \
512 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
513 -sdkvalues $(OUT_DOCS) \
smain@google.com00de8c52016-03-07 18:38:08 -0800514 -hdf android.whichdoc offline \
Scott Mainf8cdfc82017-03-21 13:43:31 -0700515 -referenceonly
smain@google.com00de8c52016-03-07 18:38:08 -0800516
Scott Main15b85172017-02-21 14:30:58 -0800517LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
smain@google.com00de8c52016-03-07 18:38:08 -0800518
519include $(BUILD_DROIDDOC)
520
521static_doc_index_redirect := $(out_dir)/index.html
smain@google.com151833a2016-08-31 08:42:09 -0700522$(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html
Dan Willemsen98ff0b72016-03-23 00:42:44 -0700523 $(copy-file-to-target)
smain@google.com00de8c52016-03-07 18:38:08 -0800524
smain@google.com2f2365d2016-09-21 14:05:50 -0700525static_doc_properties := $(out_dir)/source.properties
526$(static_doc_properties): \
527 $(LOCAL_PATH)/docs/source.properties | $(ACP)
528 $(hide) mkdir -p $(dir $@)
529 $(hide) $(ACP) $< $@
530
smain@google.com00de8c52016-03-07 18:38:08 -0800531$(full_target): $(static_doc_index_redirect)
smain@google.com2f2365d2016-09-21 14:05:50 -0700532$(full_target): $(static_doc_properties)
smain@google.com00de8c52016-03-07 18:38:08 -0800533
smain@google.com7aca8be2016-03-10 14:13:30 -0800534
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700535# ==== System API static reference docs ==================================
536include $(CLEAR_VARS)
537
538LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800539LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800540LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700541LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
542LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
543LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
544LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
545LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
546LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
547
548LOCAL_MODULE := offline-system-sdk-referenceonly
549
550LOCAL_DROIDDOC_OPTIONS:=\
551 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
552 -hide 101 -hide 104 -hide 108 \
553 -showAnnotation android.annotation.SystemApi \
554 -offlinemode \
555 -title "Android System SDK" \
556 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
557 -sdkvalues $(OUT_DOCS) \
558 -hdf android.whichdoc offline \
559 -referenceonly
560
561LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
562
563include $(BUILD_DROIDDOC)
564
565static_doc_index_redirect := $(out_dir)/index.html
566$(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html
567 $(copy-file-to-target)
568
569static_doc_properties := $(out_dir)/source.properties
570$(static_doc_properties): \
571 $(LOCAL_PATH)/docs/source.properties | $(ACP)
572 $(hide) mkdir -p $(dir $@)
573 $(hide) $(ACP) $< $@
574
575$(full_target): $(static_doc_index_redirect)
576$(full_target): $(static_doc_properties)
577$(full_target): $(framework_built)
578
579
Bart Searsa8cc0582015-05-07 03:23:20 +0000580# ==== docs for the web (on the androiddevdocs app engine server) =======================
581include $(CLEAR_VARS)
582
583LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800584LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800585LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000586LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
587LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
588LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
589LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
590LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
591LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
592LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
593LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
594
595LOCAL_MODULE := online-sdk
596
597LOCAL_DROIDDOC_OPTIONS:= \
598 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
599 -toroot / \
600 -hdf android.whichdoc online \
601 $(sample_groups) \
602 -hdf android.hasSamples true \
603 -samplesdir $(samples_dir)
604
Scott Main15b85172017-02-21 14:30:58 -0800605LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000606
607include $(BUILD_DROIDDOC)
608
609# ==== docs for the web (on the androiddevdocs app engine server) =======================
Bart Searsa8cc0582015-05-07 03:23:20 +0000610include $(CLEAR_VARS)
611
612LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800613LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800614LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000615LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
616LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
617LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
618LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
619LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
620LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
621LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
622LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
623
624LOCAL_MODULE := online-system-api-sdk
625
626LOCAL_DROIDDOC_OPTIONS:= \
627 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700628 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000629 -showAnnotation android.annotation.SystemApi \
630 -title "Android SDK - Including system APIs." \
631 -toroot / \
Gina Dimino98ad8882016-05-31 17:25:48 -0700632 -hide 101 \
633 -hide 104 \
634 -hide 108 \
Bart Searsa8cc0582015-05-07 03:23:20 +0000635 -hdf android.whichdoc online \
636 $(sample_groups) \
637 -hdf android.hasSamples true \
638 -samplesdir $(samples_dir)
639
Scott Main15b85172017-02-21 14:30:58 -0800640LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Jeff Sharkey05461c02017-05-09 19:01:09 -0600641
Bart Searsa8cc0582015-05-07 03:23:20 +0000642LOCAL_UNINSTALLABLE_MODULE := true
643
644include $(BUILD_DROIDDOC)
Bart Searsa8cc0582015-05-07 03:23:20 +0000645
646# ==== docs for the web (on the devsite app engine server) =======================
647include $(CLEAR_VARS)
648LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800649LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800650LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000651LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
652LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
653LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
654LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
655LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
656LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
657LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
658# specify a second html input dir and an output path relative to OUT_DIR)
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700659LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
Bart Searsa8cc0582015-05-07 03:23:20 +0000660
661LOCAL_MODULE := ds
662
663LOCAL_DROIDDOC_OPTIONS:= \
664 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000665 -toroot / \
666 -hdf android.whichdoc online \
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700667 -devsite \
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700668 $(sample_groups) \
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700669 -hdf android.hasSamples true \
670 -samplesdir $(samples_dir)
Bart Searsa8cc0582015-05-07 03:23:20 +0000671
Scott Main15b85172017-02-21 14:30:58 -0800672LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000673
674include $(BUILD_DROIDDOC)
675
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700676# ==== docs for the web (on the devsite app engine server) =======================
677include $(CLEAR_VARS)
678LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800679LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800680LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700681LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
682LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
683LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
684LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
685LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
686LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
687LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
688# specify a second html input dir and an output path relative to OUT_DIR)
689LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
690
691LOCAL_MODULE := ds-static
692
693LOCAL_DROIDDOC_OPTIONS:= \
694 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
695 -hdf android.whichdoc online \
696 -staticonly \
697 -toroot / \
698 -devsite \
699 -ignoreJdLinks
700
Scott Main15b85172017-02-21 14:30:58 -0800701LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700702
703include $(BUILD_DROIDDOC)
704
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700705# ==== generates full navtree for resolving @links in ds postprocessing ====
706include $(CLEAR_VARS)
707
708LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800709LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800710LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700711LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
712LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
713LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
714LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
715LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
716LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
717
718LOCAL_MODULE := ds-ref-navtree
719
720LOCAL_DROIDDOC_OPTIONS:= \
721 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
722 -hdf android.whichdoc online \
723 -toroot / \
724 -atLinksNavtree \
725 -navtreeonly
726
Scott Main15b85172017-02-21 14:30:58 -0800727LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700728
729include $(BUILD_DROIDDOC)
730
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800731# ==== site updates for docs (on the androiddevdocs app engine server) =======================
Bart Searsa8cc0582015-05-07 03:23:20 +0000732include $(CLEAR_VARS)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800733
Bart Searsa8cc0582015-05-07 03:23:20 +0000734LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800735LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800736LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000737LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
738LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
739LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
740LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800741LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
Bart Searsa8cc0582015-05-07 03:23:20 +0000742LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
743LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800744LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
Bart Searsa8cc0582015-05-07 03:23:20 +0000745
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800746LOCAL_MODULE := online-sdk-dev
Bart Searsa8cc0582015-05-07 03:23:20 +0000747
748LOCAL_DROIDDOC_OPTIONS:= \
749 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
750 -toroot / \
751 -hdf android.whichdoc online \
752 $(sample_groups) \
753 -hdf android.hasSamples true \
754 -samplesdir $(samples_dir)
755
Scott Main15b85172017-02-21 14:30:58 -0800756LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000757
758include $(BUILD_DROIDDOC)
759
Bart Searsa8cc0582015-05-07 03:23:20 +0000760# ==== docs that have all of the stuff that's @hidden =======================
761include $(CLEAR_VARS)
762
763LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800764LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800765LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000766LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
767LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
768LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
769LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
770LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
771LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
772
773LOCAL_MODULE := hidden
774LOCAL_DROIDDOC_OPTIONS:=\
775 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700776 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000777 -title "Android SDK - Including hidden APIs."
778# -hidden
779
Scott Main15b85172017-02-21 14:30:58 -0800780LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000781
782include $(BUILD_DROIDDOC)
783
Joe Onorato1754d742016-11-21 17:51:35 -0800784# ==== java proto host library ==============================
785include $(CLEAR_VARS)
786LOCAL_MODULE := platformprotos
787LOCAL_PROTOC_OPTIMIZE_TYPE := full
788LOCAL_PROTOC_FLAGS := \
789 -Iexternal/protobuf/src
790LOCAL_SOURCE_FILES_ALL_GENERATED := true
791LOCAL_SRC_FILES := \
Mike Mada3a2952017-11-13 12:06:45 -0800792 cmds/am/proto/instrumentation_data.proto \
Primiano Tuccie4d44912018-01-10 12:14:50 +0000793 cmds/statsd/src/perfetto/perfetto_config.proto \
Joe Onorato1754d742016-11-21 17:51:35 -0800794 $(call all-proto-files-under, core/proto) \
Chenjie Yu15176cd2017-11-22 12:36:41 -0800795 $(call all-proto-files-under, libs/incident/proto) \
796 $(call all-proto-files-under, cmds/statsd/src)
Andreas Gampe3e429f32018-02-15 15:12:38 -0800797# b/72714520
798LOCAL_ERROR_PRONE_FLAGS := -Xep:MissingOverride:OFF
Joe Onorato1754d742016-11-21 17:51:35 -0800799include $(BUILD_HOST_JAVA_LIBRARY)
800
Steven Timotius7ece0422017-08-03 13:37:26 -0700801# ==== java proto device library (for test only) ==============================
802include $(CLEAR_VARS)
803LOCAL_MODULE := platformprotosnano
Joe Onorato62c220b2017-11-18 20:32:56 -0800804LOCAL_MODULE_TAGS := tests
Steven Timotius7ece0422017-08-03 13:37:26 -0700805LOCAL_PROTOC_OPTIMIZE_TYPE := nano
806LOCAL_PROTOC_FLAGS := \
807 -Iexternal/protobuf/src
808LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \
809 store_unknown_fields = true
Jiyong Parkf0048392018-02-12 21:57:59 +0900810LOCAL_SDK_VERSION := current
Steven Timotius7ece0422017-08-03 13:37:26 -0700811LOCAL_SRC_FILES := \
Yi Jin437aa6e2018-01-10 11:34:26 -0800812 $(call all-proto-files-under, core/proto) \
813 $(call all-proto-files-under, libs/incident/proto/android/os)
Steven Timotius7ece0422017-08-03 13:37:26 -0700814include $(BUILD_STATIC_JAVA_LIBRARY)
815
Bart Searsa8cc0582015-05-07 03:23:20 +0000816
Joe Onorato62c220b2017-11-18 20:32:56 -0800817# ==== java proto device library (for test only) ==============================
818include $(CLEAR_VARS)
819LOCAL_MODULE := platformprotoslite
820LOCAL_MODULE_TAGS := tests
821LOCAL_PROTOC_OPTIMIZE_TYPE := lite
822LOCAL_PROTOC_FLAGS := \
823 -Iexternal/protobuf/src
824LOCAL_SRC_FILES := \
Yi Jin437aa6e2018-01-10 11:34:26 -0800825 $(call all-proto-files-under, core/proto) \
826 $(call all-proto-files-under, libs/incident/proto/android/os)
Andreas Gampe93b64c92018-01-30 18:50:34 -0800827# Protos have lots of MissingOverride and similar.
828LOCAL_ERROR_PRONE_FLAGS := -XepDisableAllChecks
Joe Onorato62c220b2017-11-18 20:32:56 -0800829include $(BUILD_STATIC_JAVA_LIBRARY)
830
David Brazdil0649c8d2018-01-22 22:23:13 +0000831# ==== hiddenapi lists =======================================
832
Nicolas Geoffray90fa8ef2018-02-08 17:27:15 +0000833# Copy blacklist and light greylist over into the build folder.
David Brazdilf16ac002018-01-26 11:13:35 +0000834# This is for ART buildbots which need to mock these lists and have alternative
835# rules for building them. Other rules in the build system should depend on the
836# files in the build folder.
837
Nicolas Geoffray90fa8ef2018-02-08 17:27:15 +0000838$(eval $(call copy-one-file,frameworks/base/config/hiddenapi-blacklist.txt,\
839 $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST)))
David Brazdilb43351f2018-01-31 14:43:36 +0000840$(eval $(call copy-one-file,frameworks/base/config/hiddenapi-light-greylist.txt,\
841 $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST)))
David Brazdilf16ac002018-01-26 11:13:35 +0000842
Nicolas Geoffray90fa8ef2018-02-08 17:27:15 +0000843# Generate dark greylist as private API minus (blacklist plus light greylist).
David Brazdil0649c8d2018-01-22 22:23:13 +0000844
Nicolas Geoffray90fa8ef2018-02-08 17:27:15 +0000845$(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST): PRIVATE_API := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
846$(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST): BLACKLIST := $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST)
847$(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST): LIGHT_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST)
848$(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST): $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
849 $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST) \
850 $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST)
851 if [ ! -z "`comm -12 <(sort $(BLACKLIST)) <(sort $(LIGHT_GREYLIST))`" ]; then \
852 echo "There should be no overlap between $(BLACKLIST) and $(LIGHT_GREYLIST)" 1>&2; \
David Brazdil0649c8d2018-01-22 22:23:13 +0000853 exit 1; \
Nicolas Geoffray90fa8ef2018-02-08 17:27:15 +0000854 elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(BLACKLIST))`" ]; then \
855 echo "$(BLACKLIST) must be a subset of $(PRIVATE_API)" 1>&2; \
856 exit 2; \
David Brazdilb43351f2018-01-31 14:43:36 +0000857 elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(LIGHT_GREYLIST))`" ]; then \
858 echo "$(LIGHT_GREYLIST) must be a subset of $(PRIVATE_API)" 1>&2; \
David Brazdil0649c8d2018-01-22 22:23:13 +0000859 exit 3; \
860 fi
Nicolas Geoffray90fa8ef2018-02-08 17:27:15 +0000861 comm -23 <(sort $(PRIVATE_API)) <(sort $(BLACKLIST) $(LIGHT_GREYLIST)) > $@
David Brazdil0649c8d2018-01-22 22:23:13 +0000862
Bart Searsa8cc0582015-05-07 03:23:20 +0000863# Include subdirectory makefiles
864# ============================================================
865
866# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
867# team really wants is to build the stuff defined by this makefile.
868ifeq (,$(ONE_SHOT_MAKEFILE))
869include $(call first-makefiles-under,$(LOCAL_PATH))
870endif
871
Holly Jiuyu Sunbbc85802017-12-21 18:44:59 -0800872endif # ANDROID_BUILD_EMBEDDED
873