blob: a78a01a1600f55e4e94927dbf9815594b73d8ea7 [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)
39 $$(gen): $(call java-lib-header-files,$1) | $(HOST_OUT_EXECUTABLES)/sdkparcelables
40 @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 \
Jeff Sharkeyc204c222017-11-27 15:02:10 -0700198 -werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 \
Jeff Sharkey0f3f60b2017-04-24 18:06:20 -0600199 -overview $(LOCAL_PATH)/core/java/overview.html \
Bart Searsa8cc0582015-05-07 03:23:20 +0000200
201framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR:= \
202 $(call intermediates-dir-for,JAVA_LIBRARIES,framework,,COMMON)
203
204framework_docs_LOCAL_ADDITIONAL_JAVA_DIR:= \
Alan Viverette9ca513e2017-04-05 10:21:58 -0400205 $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
Bart Searsa8cc0582015-05-07 03:23:20 +0000206
207framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES := \
Narayan Kamathc21739a2015-07-14 13:39:23 +0100208 frameworks/base/docs/knowntags.txt \
Colin Cross72d359f2017-10-27 10:46:53 -0700209 $(libcore_to_document_generated)
Bart Searsa8cc0582015-05-07 03:23:20 +0000210
211samples_dir := development/samples/browseable
212
213# Whitelist of valid groups, used for default TOC grouping. Each sample must
214# belong to one (and only one) group. Assign samples to groups by setting
215# a sample.group var to one of these groups in the sample's _index.jd.
216sample_groups := -samplegroup Admin \
217 -samplegroup Background \
218 -samplegroup Connectivity \
219 -samplegroup Content \
220 -samplegroup Input \
221 -samplegroup Media \
222 -samplegroup Notification \
223 -samplegroup RenderScript \
224 -samplegroup Security \
225 -samplegroup Sensors \
Trevor Johns4cbe3592015-05-27 14:50:51 -0700226 -samplegroup System \
Bart Searsa8cc0582015-05-07 03:23:20 +0000227 -samplegroup Testing \
228 -samplegroup UI \
229 -samplegroup Views \
230 -samplegroup Wearable
231
232## SDK version identifiers used in the published docs
233 # major[.minor] version for current SDK. (full releases only)
smain@google.comdde8deb2016-08-29 18:36:50 -0700234framework_docs_SDK_VERSION:=7.0
Bart Searsa8cc0582015-05-07 03:23:20 +0000235 # release version (ie "Release x") (full releases only)
236framework_docs_SDK_REL_ID:=1
237
238framework_docs_LOCAL_DROIDDOC_OPTIONS += \
Billy Lamberta75dbc8f2017-03-03 13:09:15 -0800239 -hdf dac true \
Scott Mainf8cdfc82017-03-21 13:43:31 -0700240 -hdf sdk.codename O \
241 -hdf sdk.preview.version 1 \
Bart Searsa8cc0582015-05-07 03:23:20 +0000242 -hdf sdk.version $(framework_docs_SDK_VERSION) \
243 -hdf sdk.rel.id $(framework_docs_SDK_REL_ID) \
Scott Mainf8cdfc82017-03-21 13:43:31 -0700244 -hdf sdk.preview 0 \
245 -resourcesdir $(LOCAL_PATH)/docs/html/reference/images/ \
246 -resourcesoutdir reference/android/images/
Bart Searsa8cc0582015-05-07 03:23:20 +0000247
Alan Viverette9ca513e2017-04-05 10:21:58 -0400248# Federate Support Library references against local API file.
249framework_docs_LOCAL_DROIDDOC_OPTIONS += \
250 -federate SupportLib https://developer.android.com \
251 -federationapi SupportLib prebuilts/sdk/current/support-api.txt
252
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700253# ==== Public API diff ===========================
Alan Viverette6b7354c2017-07-13 17:10:14 -0400254include $(CLEAR_VARS)
255
256LOCAL_SRC_FILES := $(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800257LOCAL_GENERATED_SOURCES := $(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800258LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Alan Viverette6b7354c2017-07-13 17:10:14 -0400259LOCAL_JAVA_LIBRARIES := $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
260LOCAL_MODULE_CLASS := $(framework_docs_LOCAL_MODULE_CLASS)
261LOCAL_ADDITIONAL_JAVA_DIR := $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
262LOCAL_ADDITIONAL_DEPENDENCIES := \
263 $(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) \
264 $(INTERNAL_PLATFORM_API_FILE)
265
266LOCAL_MODULE := offline-sdk-referenceonly
267
268last_released_sdk_version := $(lastword $(call numerically_sort, \
269 $(filter-out current, \
270 $(patsubst $(SRC_API_DIR)/%.txt,%, $(wildcard $(SRC_API_DIR)/*.txt)) \
271 )\
272 ))
273
274LOCAL_APIDIFF_OLDAPI := $(LOCAL_PATH)/../../$(SRC_API_DIR)/$(last_released_sdk_version)
275LOCAL_APIDIFF_NEWAPI := $(LOCAL_PATH)/../../$(basename $(INTERNAL_PLATFORM_API_FILE))
276
277include $(BUILD_APIDIFF)
278
Jeff Sharkeyc8dc2542017-12-08 14:52:37 -0700279# Hack to get diffs included in docs output
280out_zip := $(OUT_DOCS)/$(LOCAL_MODULE)-docs.zip
281$(out_zip): $(full_target)
282
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700283# ==== System API diff ===========================
284include $(CLEAR_VARS)
285
286LOCAL_SRC_FILES := $(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800287LOCAL_GENERATED_SOURCES := $(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800288LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700289LOCAL_JAVA_LIBRARIES := $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
290LOCAL_MODULE_CLASS := $(framework_docs_LOCAL_MODULE_CLASS)
291LOCAL_ADDITIONAL_JAVA_DIR := $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
292LOCAL_ADDITIONAL_DEPENDENCIES := \
293 $(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) \
294 $(INTERNAL_PLATFORM_SYSTEM_API_FILE)
295
296LOCAL_MODULE := offline-system-sdk-referenceonly
297
298last_released_sdk_version := $(lastword $(call numerically_sort, \
299 $(filter-out current, \
300 $(patsubst $(SRC_SYSTEM_API_DIR)/%.txt,%, $(wildcard $(SRC_SYSTEM_API_DIR)/*.txt)) \
301 )\
302 ))
303
304LOCAL_APIDIFF_OLDAPI := $(LOCAL_PATH)/../../$(SRC_SYSTEM_API_DIR)/$(last_released_sdk_version)
305LOCAL_APIDIFF_NEWAPI := $(LOCAL_PATH)/../../$(basename $(INTERNAL_PLATFORM_SYSTEM_API_FILE))
306
307include $(BUILD_APIDIFF)
308
Jeff Sharkeyc8dc2542017-12-08 14:52:37 -0700309# Hack to get diffs included in docs output
310out_zip := $(OUT_DOCS)/$(LOCAL_MODULE)-docs.zip
311$(out_zip): $(full_target)
312
Bart Searsa8cc0582015-05-07 03:23:20 +0000313# ==== the api stubs and current.xml ===========================
314include $(CLEAR_VARS)
315
316LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800317LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800318LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000319LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
320LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
321LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
322LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
323LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
324LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
325
326LOCAL_MODULE := api-stubs
327
Ying Wang0f92a2e2015-07-16 14:20:22 -0700328LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_stubs_current_intermediates/src
329
Bart Searsa8cc0582015-05-07 03:23:20 +0000330LOCAL_DROIDDOC_OPTIONS:=\
331 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700332 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000333 -api $(INTERNAL_PLATFORM_API_FILE) \
David Brazdila793f3f2018-01-16 15:03:20 +0000334 -privateApi $(INTERNAL_PLATFORM_PRIVATE_API_FILE) \
335 -privateDexApi $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000336 -removedApi $(INTERNAL_PLATFORM_REMOVED_API_FILE) \
337 -nodocs
338
Scott Main15b85172017-02-21 14:30:58 -0800339LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000340
341LOCAL_UNINSTALLABLE_MODULE := true
342
343include $(BUILD_DROIDDOC)
344
David Brazdila793f3f2018-01-16 15:03:20 +0000345$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_API_FILE) \
346 $(INTERNAL_PLATFORM_PRIVATE_API_FILE) \
347 $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
Bart Searsa8cc0582015-05-07 03:23:20 +0000348$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE))
349
350# ==== the system api stubs ===================================
351include $(CLEAR_VARS)
352
353LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800354LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800355LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000356LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
357LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
358LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
359LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
360LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
361LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
362
363LOCAL_MODULE := system-api-stubs
364
Ying Wang0f92a2e2015-07-16 14:20:22 -0700365LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_system_stubs_current_intermediates/src
366
Bart Searsa8cc0582015-05-07 03:23:20 +0000367LOCAL_DROIDDOC_OPTIONS:=\
368 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700369 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000370 -showAnnotation android.annotation.SystemApi \
371 -api $(INTERNAL_PLATFORM_SYSTEM_API_FILE) \
David Brazdila793f3f2018-01-16 15:03:20 +0000372 -privateApi $(INTERNAL_PLATFORM_SYSTEM_PRIVATE_API_FILE) \
373 -privateDexApi $(INTERNAL_PLATFORM_SYSTEM_PRIVATE_DEX_API_FILE) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000374 -removedApi $(INTERNAL_PLATFORM_SYSTEM_REMOVED_API_FILE) \
Jeff Sharkey05461c02017-05-09 19:01:09 -0600375 -exactApi $(INTERNAL_PLATFORM_SYSTEM_EXACT_API_FILE) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000376 -nodocs
377
Scott Main15b85172017-02-21 14:30:58 -0800378LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000379
380LOCAL_UNINSTALLABLE_MODULE := true
381
382include $(BUILD_DROIDDOC)
383
David Brazdila793f3f2018-01-16 15:03:20 +0000384$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_SYSTEM_API_FILE) \
385 $(INTERNAL_PLATFORM_SYSTEM_PRIVATE_API_FILE) \
386 $(INTERNAL_PLATFORM_SYSTEM_PRIVATE_DEX_API_FILE)
Bart Searsa8cc0582015-05-07 03:23:20 +0000387$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE))
388
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000389# ==== the test api stubs ===================================
390include $(CLEAR_VARS)
391
392LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800393LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800394LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000395LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
396LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
397LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
398LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
399LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
400LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
401
402LOCAL_MODULE := test-api-stubs
403
404LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_test_stubs_current_intermediates/src
405
406LOCAL_DROIDDOC_OPTIONS:=\
407 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700408 -referenceonly \
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000409 -stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_test_stubs_current_intermediates/src \
410 -showAnnotation android.annotation.TestApi \
411 -api $(INTERNAL_PLATFORM_TEST_API_FILE) \
412 -removedApi $(INTERNAL_PLATFORM_TEST_REMOVED_API_FILE) \
Jeff Sharkey05461c02017-05-09 19:01:09 -0600413 -exactApi $(INTERNAL_PLATFORM_TEST_EXACT_API_FILE) \
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000414 -nodocs
415
Scott Main15b85172017-02-21 14:30:58 -0800416LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000417
418LOCAL_UNINSTALLABLE_MODULE := true
419
420include $(BUILD_DROIDDOC)
421
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000422$(INTERNAL_PLATFORM_TEST_API_FILE): $(full_target)
423$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE))
424
Bart Searsa8cc0582015-05-07 03:23:20 +0000425# ==== check javadoc comments but don't generate docs ========
426include $(CLEAR_VARS)
427
428LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800429LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800430LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000431LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
432LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
433LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
434LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
435LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
436LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
437
438LOCAL_MODULE := doc-comment-check
439
440LOCAL_DROIDDOC_OPTIONS:=\
441 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700442 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000443 -parsecomments
444
Scott Main15b85172017-02-21 14:30:58 -0800445LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000446
447LOCAL_UNINSTALLABLE_MODULE := true
448
449include $(BUILD_DROIDDOC)
450
Bart Searsa8cc0582015-05-07 03:23:20 +0000451# Run this for checkbuild
452checkbuild: doc-comment-check-docs
453# Check comment when you are updating the API
454update-api: doc-comment-check-docs
455
456# ==== static html in the sdk ==================================
457include $(CLEAR_VARS)
458
459LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800460LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800461LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000462LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
463LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
464LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
465LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
466LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
467LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
468
469LOCAL_MODULE := offline-sdk
470
471LOCAL_DROIDDOC_OPTIONS:=\
472 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
473 -offlinemode \
474 -title "Android SDK" \
475 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
smain@google.com00de8c52016-03-07 18:38:08 -0800476 -sdkvalues $(OUT_DOCS) \
smain@google.com8562ab52016-06-14 17:11:57 -0700477 -hdf android.whichdoc offline
478
Scott Main15b85172017-02-21 14:30:58 -0800479LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
smain@google.com8562ab52016-06-14 17:11:57 -0700480
481include $(BUILD_DROIDDOC)
482
483static_doc_index_redirect := $(out_dir)/index.html
484$(static_doc_index_redirect): \
485 $(LOCAL_PATH)/docs/docs-preview-index.html | $(ACP)
486 $(hide) mkdir -p $(dir $@)
487 $(hide) $(ACP) $< $@
488
489$(full_target): $(static_doc_index_redirect)
smain@google.com8562ab52016-06-14 17:11:57 -0700490
491
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700492# ==== Public API static reference docs ==================================
smain@google.com8562ab52016-06-14 17:11:57 -0700493include $(CLEAR_VARS)
494
495LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800496LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800497LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
smain@google.com8562ab52016-06-14 17:11:57 -0700498LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
499LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
500LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
501LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
502LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
503LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
504
505LOCAL_MODULE := offline-sdk-referenceonly
506
507LOCAL_DROIDDOC_OPTIONS:=\
508 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
509 -offlinemode \
510 -title "Android SDK" \
511 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
512 -sdkvalues $(OUT_DOCS) \
smain@google.com00de8c52016-03-07 18:38:08 -0800513 -hdf android.whichdoc offline \
Scott Mainf8cdfc82017-03-21 13:43:31 -0700514 -referenceonly
smain@google.com00de8c52016-03-07 18:38:08 -0800515
Scott Main15b85172017-02-21 14:30:58 -0800516LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
smain@google.com00de8c52016-03-07 18:38:08 -0800517
518include $(BUILD_DROIDDOC)
519
520static_doc_index_redirect := $(out_dir)/index.html
smain@google.com151833a2016-08-31 08:42:09 -0700521$(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html
Dan Willemsen98ff0b72016-03-23 00:42:44 -0700522 $(copy-file-to-target)
smain@google.com00de8c52016-03-07 18:38:08 -0800523
smain@google.com2f2365d2016-09-21 14:05:50 -0700524static_doc_properties := $(out_dir)/source.properties
525$(static_doc_properties): \
526 $(LOCAL_PATH)/docs/source.properties | $(ACP)
527 $(hide) mkdir -p $(dir $@)
528 $(hide) $(ACP) $< $@
529
smain@google.com00de8c52016-03-07 18:38:08 -0800530$(full_target): $(static_doc_index_redirect)
smain@google.com2f2365d2016-09-21 14:05:50 -0700531$(full_target): $(static_doc_properties)
smain@google.com00de8c52016-03-07 18:38:08 -0800532
smain@google.com7aca8be2016-03-10 14:13:30 -0800533
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700534# ==== System API static reference docs ==================================
535include $(CLEAR_VARS)
536
537LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800538LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800539LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700540LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
541LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
542LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
543LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
544LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
545LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
546
547LOCAL_MODULE := offline-system-sdk-referenceonly
548
549LOCAL_DROIDDOC_OPTIONS:=\
550 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
551 -hide 101 -hide 104 -hide 108 \
552 -showAnnotation android.annotation.SystemApi \
553 -offlinemode \
554 -title "Android System SDK" \
555 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
556 -sdkvalues $(OUT_DOCS) \
557 -hdf android.whichdoc offline \
558 -referenceonly
559
560LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
561
562include $(BUILD_DROIDDOC)
563
564static_doc_index_redirect := $(out_dir)/index.html
565$(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html
566 $(copy-file-to-target)
567
568static_doc_properties := $(out_dir)/source.properties
569$(static_doc_properties): \
570 $(LOCAL_PATH)/docs/source.properties | $(ACP)
571 $(hide) mkdir -p $(dir $@)
572 $(hide) $(ACP) $< $@
573
574$(full_target): $(static_doc_index_redirect)
575$(full_target): $(static_doc_properties)
576$(full_target): $(framework_built)
577
578
Bart Searsa8cc0582015-05-07 03:23:20 +0000579# ==== docs for the web (on the androiddevdocs app engine server) =======================
580include $(CLEAR_VARS)
581
582LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800583LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800584LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000585LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
586LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
587LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
588LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
589LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
590LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
591LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
592LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
593
594LOCAL_MODULE := online-sdk
595
596LOCAL_DROIDDOC_OPTIONS:= \
597 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
598 -toroot / \
599 -hdf android.whichdoc online \
600 $(sample_groups) \
601 -hdf android.hasSamples true \
602 -samplesdir $(samples_dir)
603
Scott Main15b85172017-02-21 14:30:58 -0800604LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000605
606include $(BUILD_DROIDDOC)
607
608# ==== docs for the web (on the androiddevdocs app engine server) =======================
Bart Searsa8cc0582015-05-07 03:23:20 +0000609include $(CLEAR_VARS)
610
611LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800612LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800613LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000614LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
615LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
616LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
617LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
618LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
619LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
620LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
621LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
622
623LOCAL_MODULE := online-system-api-sdk
624
625LOCAL_DROIDDOC_OPTIONS:= \
626 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700627 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000628 -showAnnotation android.annotation.SystemApi \
629 -title "Android SDK - Including system APIs." \
630 -toroot / \
Gina Dimino98ad8882016-05-31 17:25:48 -0700631 -hide 101 \
632 -hide 104 \
633 -hide 108 \
Bart Searsa8cc0582015-05-07 03:23:20 +0000634 -hdf android.whichdoc online \
635 $(sample_groups) \
636 -hdf android.hasSamples true \
637 -samplesdir $(samples_dir)
638
Scott Main15b85172017-02-21 14:30:58 -0800639LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Jeff Sharkey05461c02017-05-09 19:01:09 -0600640
Bart Searsa8cc0582015-05-07 03:23:20 +0000641LOCAL_UNINSTALLABLE_MODULE := true
642
643include $(BUILD_DROIDDOC)
Bart Searsa8cc0582015-05-07 03:23:20 +0000644
645# ==== docs for the web (on the devsite app engine server) =======================
646include $(CLEAR_VARS)
647LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800648LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800649LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000650LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
651LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
652LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
653LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
654LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
655LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
656LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
657# specify a second html input dir and an output path relative to OUT_DIR)
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700658LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
Bart Searsa8cc0582015-05-07 03:23:20 +0000659
660LOCAL_MODULE := ds
661
662LOCAL_DROIDDOC_OPTIONS:= \
663 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000664 -toroot / \
665 -hdf android.whichdoc online \
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700666 -devsite \
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700667 $(sample_groups) \
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700668 -hdf android.hasSamples true \
669 -samplesdir $(samples_dir)
Bart Searsa8cc0582015-05-07 03:23:20 +0000670
Scott Main15b85172017-02-21 14:30:58 -0800671LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000672
673include $(BUILD_DROIDDOC)
674
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700675# ==== docs for the web (on the devsite app engine server) =======================
676include $(CLEAR_VARS)
677LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800678LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800679LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700680LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
681LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
682LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
683LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
684LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
685LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
686LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
687# specify a second html input dir and an output path relative to OUT_DIR)
688LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
689
690LOCAL_MODULE := ds-static
691
692LOCAL_DROIDDOC_OPTIONS:= \
693 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
694 -hdf android.whichdoc online \
695 -staticonly \
696 -toroot / \
697 -devsite \
698 -ignoreJdLinks
699
Scott Main15b85172017-02-21 14:30:58 -0800700LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700701
702include $(BUILD_DROIDDOC)
703
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700704# ==== generates full navtree for resolving @links in ds postprocessing ====
705include $(CLEAR_VARS)
706
707LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800708LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800709LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700710LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
711LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
712LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
713LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
714LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
715LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
716
717LOCAL_MODULE := ds-ref-navtree
718
719LOCAL_DROIDDOC_OPTIONS:= \
720 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
721 -hdf android.whichdoc online \
722 -toroot / \
723 -atLinksNavtree \
724 -navtreeonly
725
Scott Main15b85172017-02-21 14:30:58 -0800726LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700727
728include $(BUILD_DROIDDOC)
729
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800730# ==== site updates for docs (on the androiddevdocs app engine server) =======================
Bart Searsa8cc0582015-05-07 03:23:20 +0000731include $(CLEAR_VARS)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800732
Bart Searsa8cc0582015-05-07 03:23:20 +0000733LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800734LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800735LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000736LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
737LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
738LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
739LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800740LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
Bart Searsa8cc0582015-05-07 03:23:20 +0000741LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
742LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800743LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
Bart Searsa8cc0582015-05-07 03:23:20 +0000744
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800745LOCAL_MODULE := online-sdk-dev
Bart Searsa8cc0582015-05-07 03:23:20 +0000746
747LOCAL_DROIDDOC_OPTIONS:= \
748 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
749 -toroot / \
750 -hdf android.whichdoc online \
751 $(sample_groups) \
752 -hdf android.hasSamples true \
753 -samplesdir $(samples_dir)
754
Scott Main15b85172017-02-21 14:30:58 -0800755LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000756
757include $(BUILD_DROIDDOC)
758
Bart Searsa8cc0582015-05-07 03:23:20 +0000759# ==== docs that have all of the stuff that's @hidden =======================
760include $(CLEAR_VARS)
761
762LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800763LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800764LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000765LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
766LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
767LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
768LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
769LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
770LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
771
772LOCAL_MODULE := hidden
773LOCAL_DROIDDOC_OPTIONS:=\
774 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700775 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000776 -title "Android SDK - Including hidden APIs."
777# -hidden
778
Scott Main15b85172017-02-21 14:30:58 -0800779LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000780
781include $(BUILD_DROIDDOC)
782
Joe Onorato1754d742016-11-21 17:51:35 -0800783# ==== java proto host library ==============================
784include $(CLEAR_VARS)
785LOCAL_MODULE := platformprotos
786LOCAL_PROTOC_OPTIMIZE_TYPE := full
787LOCAL_PROTOC_FLAGS := \
788 -Iexternal/protobuf/src
789LOCAL_SOURCE_FILES_ALL_GENERATED := true
790LOCAL_SRC_FILES := \
Mike Mada3a2952017-11-13 12:06:45 -0800791 cmds/am/proto/instrumentation_data.proto \
Primiano Tuccie4d44912018-01-10 12:14:50 +0000792 cmds/statsd/src/perfetto/perfetto_config.proto \
Joe Onorato1754d742016-11-21 17:51:35 -0800793 $(call all-proto-files-under, core/proto) \
Chenjie Yu15176cd2017-11-22 12:36:41 -0800794 $(call all-proto-files-under, libs/incident/proto) \
795 $(call all-proto-files-under, cmds/statsd/src)
Joe Onorato1754d742016-11-21 17:51:35 -0800796include $(BUILD_HOST_JAVA_LIBRARY)
797
Steven Timotius7ece0422017-08-03 13:37:26 -0700798# ==== java proto device library (for test only) ==============================
799include $(CLEAR_VARS)
800LOCAL_MODULE := platformprotosnano
Joe Onorato62c220b2017-11-18 20:32:56 -0800801LOCAL_MODULE_TAGS := tests
Steven Timotius7ece0422017-08-03 13:37:26 -0700802LOCAL_PROTOC_OPTIMIZE_TYPE := nano
803LOCAL_PROTOC_FLAGS := \
804 -Iexternal/protobuf/src
805LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \
806 store_unknown_fields = true
807LOCAL_JAVA_LIBRARIES := core-oj core-libart
808LOCAL_SRC_FILES := \
Yi Jin437aa6e2018-01-10 11:34:26 -0800809 $(call all-proto-files-under, core/proto) \
810 $(call all-proto-files-under, libs/incident/proto/android/os)
Steven Timotius7ece0422017-08-03 13:37:26 -0700811include $(BUILD_STATIC_JAVA_LIBRARY)
812
Bart Searsa8cc0582015-05-07 03:23:20 +0000813
Joe Onorato62c220b2017-11-18 20:32:56 -0800814# ==== java proto device library (for test only) ==============================
815include $(CLEAR_VARS)
816LOCAL_MODULE := platformprotoslite
817LOCAL_MODULE_TAGS := tests
818LOCAL_PROTOC_OPTIMIZE_TYPE := lite
819LOCAL_PROTOC_FLAGS := \
820 -Iexternal/protobuf/src
821LOCAL_SRC_FILES := \
Yi Jin437aa6e2018-01-10 11:34:26 -0800822 $(call all-proto-files-under, core/proto) \
823 $(call all-proto-files-under, libs/incident/proto/android/os)
Andreas Gampe93b64c92018-01-30 18:50:34 -0800824# Protos have lots of MissingOverride and similar.
825LOCAL_ERROR_PRONE_FLAGS := -XepDisableAllChecks
Joe Onorato62c220b2017-11-18 20:32:56 -0800826include $(BUILD_STATIC_JAVA_LIBRARY)
827
David Brazdil0649c8d2018-01-22 22:23:13 +0000828# ==== hiddenapi lists =======================================
829
Nicolas Geoffray90fa8ef2018-02-08 17:27:15 +0000830# Copy blacklist and light greylist over into the build folder.
David Brazdilf16ac002018-01-26 11:13:35 +0000831# This is for ART buildbots which need to mock these lists and have alternative
832# rules for building them. Other rules in the build system should depend on the
833# files in the build folder.
834
Nicolas Geoffray90fa8ef2018-02-08 17:27:15 +0000835$(eval $(call copy-one-file,frameworks/base/config/hiddenapi-blacklist.txt,\
836 $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST)))
David Brazdilb43351f2018-01-31 14:43:36 +0000837$(eval $(call copy-one-file,frameworks/base/config/hiddenapi-light-greylist.txt,\
838 $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST)))
David Brazdilf16ac002018-01-26 11:13:35 +0000839
Nicolas Geoffray90fa8ef2018-02-08 17:27:15 +0000840# Generate dark greylist as private API minus (blacklist plus light greylist).
David Brazdil0649c8d2018-01-22 22:23:13 +0000841
Nicolas Geoffray90fa8ef2018-02-08 17:27:15 +0000842$(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST): PRIVATE_API := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
843$(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST): BLACKLIST := $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST)
844$(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST): LIGHT_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST)
845$(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST): $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
846 $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST) \
847 $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST)
848 if [ ! -z "`comm -12 <(sort $(BLACKLIST)) <(sort $(LIGHT_GREYLIST))`" ]; then \
849 echo "There should be no overlap between $(BLACKLIST) and $(LIGHT_GREYLIST)" 1>&2; \
David Brazdil0649c8d2018-01-22 22:23:13 +0000850 exit 1; \
Nicolas Geoffray90fa8ef2018-02-08 17:27:15 +0000851 elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(BLACKLIST))`" ]; then \
852 echo "$(BLACKLIST) must be a subset of $(PRIVATE_API)" 1>&2; \
853 exit 2; \
David Brazdilb43351f2018-01-31 14:43:36 +0000854 elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(LIGHT_GREYLIST))`" ]; then \
855 echo "$(LIGHT_GREYLIST) must be a subset of $(PRIVATE_API)" 1>&2; \
David Brazdil0649c8d2018-01-22 22:23:13 +0000856 exit 3; \
857 fi
Nicolas Geoffray90fa8ef2018-02-08 17:27:15 +0000858 comm -23 <(sort $(PRIVATE_API)) <(sort $(BLACKLIST) $(LIGHT_GREYLIST)) > $@
David Brazdil0649c8d2018-01-22 22:23:13 +0000859
Bart Searsa8cc0582015-05-07 03:23:20 +0000860# Include subdirectory makefiles
861# ============================================================
862
863# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
864# team really wants is to build the stuff defined by this makefile.
865ifeq (,$(ONE_SHOT_MAKEFILE))
866include $(call first-makefiles-under,$(LOCAL_PATH))
867endif
868
Holly Jiuyu Sunbbc85802017-12-21 18:44:59 -0800869endif # ANDROID_BUILD_EMBEDDED
870