blob: 308a85aa6f99b0ee5338a620a4d6b0f5b2f1cb6c [file] [log] [blame]
Bart Searsa8cc0582015-05-07 03:23:20 +00001#
2# Copyright (C) 2008 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16LOCAL_PATH := $(call my-dir)
17
Colin Crosscf3a0b52017-11-16 00:15:28 -080018# Load framework-specific path mappings used later in the build.
19include $(LOCAL_PATH)/pathmap.mk
Bart Searsa8cc0582015-05-07 03:23:20 +000020
21# Build the master framework library.
22# The framework contains too many method references (>64K) for poor old DEX.
23# So we first build the framework as a monolithic static library then split it
24# up into smaller pieces.
25# ============================================================
26
27# embedded builds use nothing in frameworks/base
28ifneq ($(ANDROID_BUILD_EMBEDDED),true)
29
Bart Searsa8cc0582015-05-07 03:23:20 +000030# Copy AIDL files to be preprocessed and included in the SDK,
31# specified relative to the root of the build tree.
32# ============================================================
33include $(CLEAR_VARS)
34
Colin Cross77ebd082017-12-15 17:30:33 -080035aidl_parcelables :=
36define stubs-to-aidl-parcelables
37 gen := $(TARGET_OUT_COMMON_INTERMEDIATES)/$1.aidl
38 aidl_parcelables += $$(gen)
Colin Crossfdbe7d12018-02-09 11:24:14 -080039 $$(gen): $(call java-lib-header-files,$1) $(HOST_OUT_EXECUTABLES)/sdkparcelables
Colin Cross77ebd082017-12-15 17:30:33 -080040 @echo Extract SDK parcelables: $$@
41 rm -f $$@
42 $(HOST_OUT_EXECUTABLES)/sdkparcelables $$< $$@
43endef
44
45$(foreach stubs,android_stubs_current android_test_stubs_current android_system_stubs_current,\
46 $(eval $(call stubs-to-aidl-parcelables,$(stubs))))
47
Bart Searsa8cc0582015-05-07 03:23:20 +000048gen := $(TARGET_OUT_COMMON_INTERMEDIATES)/framework.aidl
Colin Cross77ebd082017-12-15 17:30:33 -080049.KATI_RESTAT: $(gen)
50$(gen): $(aidl_parcelables)
51 @echo Combining SDK parcelables: $@
52 rm -f $@.tmp
53 cat $^ | sort -u > $@.tmp
54 $(call commit-change-for-toc,$@)
Bart Searsa8cc0582015-05-07 03:23:20 +000055
56# the documentation
57# ============================================================
58
59# TODO: deal with com/google/android/googleapps
60packages_to_document := \
Colin Crosscf3a0b52017-11-16 00:15:28 -080061 android \
62 javax/microedition/khronos \
63 org/apache/http/conn \
64 org/apache/http/params \
Bart Searsa8cc0582015-05-07 03:23:20 +000065
66# include definition of libcore_to_document
67include libcore/Docs.mk
68
Bart Searsa8cc0582015-05-07 03:23:20 +000069non_base_dirs := \
Colin Crosscf3a0b52017-11-16 00:15:28 -080070 ../opt/telephony/src/java/android/telephony \
71 ../opt/telephony/src/java/android/telephony/gsm \
72 ../opt/net/voip/src/java/android/net/rtp \
73 ../opt/net/voip/src/java/android/net/sip \
Bart Searsa8cc0582015-05-07 03:23:20 +000074
Colin Crosscf3a0b52017-11-16 00:15:28 -080075# Find all files in specific directories (relative to frameworks/base)
76# to document and check apis
77files_to_check_apis := \
78 $(call find-other-java-files, \
Colin Crosscf3a0b52017-11-16 00:15:28 -080079 $(non_base_dirs) \
80 )
Bart Searsa8cc0582015-05-07 03:23:20 +000081
Colin Crosscf3a0b52017-11-16 00:15:28 -080082# Find all files in specific packages that were used to compile
83# framework.jar to document and check apis
84files_to_check_apis += \
85 $(addprefix ../../,\
86 $(filter \
87 $(foreach dir,$(FRAMEWORKS_BASE_JAVA_SRC_DIRS),\
88 $(foreach package,$(packages_to_document),\
89 $(dir)/$(package)/%.java)),\
90 $(SOONG_FRAMEWORK_SRCS)))
91
92# Find all generated files that were used to compile framework.jar
Colin Crossbd200ce2017-12-04 13:45:19 -080093files_to_check_apis_generated := \
94 $(filter $(OUT_DIR)/%,\
95 $(SOONG_FRAMEWORK_SRCS))
George Mountf6be9932015-12-03 07:39:55 -080096
Bart Searsa8cc0582015-05-07 03:23:20 +000097# These are relative to frameworks/base
98# FRAMEWORKS_BASE_SUBDIRS comes from build/core/pathmap.mk
Colin Crosscf3a0b52017-11-16 00:15:28 -080099files_to_document := \
100 $(files_to_check_apis) \
101 $(call find-other-java-files,\
Paul Duffin187a48d2017-12-13 14:34:31 +0000102 test-base/src \
Paul Duffin9f6282d2017-12-15 15:49:08 +0000103 test-mock/src \
Colin Crosscf3a0b52017-11-16 00:15:28 -0800104 test-runner/src)
George Mountf6be9932015-12-03 07:39:55 -0800105
Bart Searsa8cc0582015-05-07 03:23:20 +0000106# These are relative to frameworks/base
107html_dirs := \
108 $(FRAMEWORKS_BASE_SUBDIRS) \
Colin Crosscf3a0b52017-11-16 00:15:28 -0800109 $(non_base_dirs) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000110
111# Common sources for doc check and api check
112common_src_files := \
113 $(call find-other-html-files, $(html_dirs)) \
Colin Crosscf3a0b52017-11-16 00:15:28 -0800114 $(addprefix ../../, $(libcore_to_document)) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000115
116# These are relative to frameworks/base
117framework_docs_LOCAL_SRC_FILES := \
Colin Crosscf3a0b52017-11-16 00:15:28 -0800118 $(files_to_document) \
119 $(common_src_files) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000120
121# These are relative to frameworks/base
122framework_docs_LOCAL_API_CHECK_SRC_FILES := \
Colin Crosscf3a0b52017-11-16 00:15:28 -0800123 $(files_to_check_apis) \
124 $(common_src_files) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000125
126# This is used by ide.mk as the list of source files that are
127# always included.
128INTERNAL_SDK_SOURCE_DIRS := $(addprefix $(LOCAL_PATH)/,$(dirs_to_document))
129
130framework_docs_LOCAL_DROIDDOC_SOURCE_PATH := \
131 $(FRAMEWORKS_BASE_JAVA_SRC_DIRS)
132
Colin Crosscf3a0b52017-11-16 00:15:28 -0800133framework_docs_LOCAL_SRCJARS := $(SOONG_FRAMEWORK_SRCJARS)
134
Colin Crossbd200ce2017-12-04 13:45:19 -0800135framework_docs_LOCAL_GENERATED_SOURCES := \
136 $(libcore_to_document_generated) \
137 $(files_to_check_apis_generated) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000138
139framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES := \
Piotr Jastrzebskicfa292e2015-02-17 16:58:52 +0000140 core-oj \
Bart Searsa8cc0582015-05-07 03:23:20 +0000141 core-libart \
142 conscrypt \
143 bouncycastle \
144 okhttp \
145 ext \
146 framework \
Paul Duffinc08090f2017-06-29 14:58:43 +0100147 voip-common \
Bart Searsa8cc0582015-05-07 03:23:20 +0000148
Alan Viverette9ca513e2017-04-05 10:21:58 -0400149# Platform docs can refer to Support Library APIs, but we don't actually build
150# them as part of the docs target, so we need to include them on the classpath.
Bart Searsa8cc0582015-05-07 03:23:20 +0000151framework_docs_LOCAL_JAVA_LIBRARIES := \
152 $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES) \
153 $(FRAMEWORKS_SUPPORT_JAVA_LIBRARIES)
154
155framework_docs_LOCAL_MODULE_CLASS := JAVA_LIBRARIES
156framework_docs_LOCAL_DROIDDOC_HTML_DIR := docs/html
157# The since flag (-since N.xml API_LEVEL) is used to add API Level information
158# to the reference documentation. Must be in order of oldest to newest.
159#
160# Conscrypt (com.android.org.conscrypt) is an implementation detail and should
161# not be referenced in the documentation.
162framework_docs_LOCAL_DROIDDOC_OPTIONS := \
Jeff Sharkey0f3f60b2017-04-24 18:06:20 -0600163 -android \
Bart Searsa8cc0582015-05-07 03:23:20 +0000164 -knowntags ./frameworks/base/docs/knowntags.txt \
Narayan Kamath2c4f2842015-07-27 14:02:11 +0100165 -knowntags ./libcore/known_oj_tags.txt \
Jeff Sharkeybfc4fcd2017-06-05 17:38:17 -0600166 -manifest ./frameworks/base/core/res/AndroidManifest.xml \
Tobias Thiererdda16e82018-03-05 22:55:32 +0000167 -hidePackage com.android.internal \
168 -hidePackage com.android.internal.util \
Neil Fuller57157fb2017-11-24 15:58:38 +0000169 -hidePackage com.android.okhttp \
Bart Searsa8cc0582015-05-07 03:23:20 +0000170 -hidePackage com.android.org.conscrypt \
Neil Fuller371c08c2017-11-27 10:32:07 +0000171 -hidePackage com.android.server \
Bart Searsa8cc0582015-05-07 03:23:20 +0000172 -since $(SRC_API_DIR)/1.xml 1 \
173 -since $(SRC_API_DIR)/2.xml 2 \
174 -since $(SRC_API_DIR)/3.xml 3 \
175 -since $(SRC_API_DIR)/4.xml 4 \
176 -since $(SRC_API_DIR)/5.xml 5 \
177 -since $(SRC_API_DIR)/6.xml 6 \
178 -since $(SRC_API_DIR)/7.xml 7 \
179 -since $(SRC_API_DIR)/8.xml 8 \
180 -since $(SRC_API_DIR)/9.xml 9 \
181 -since $(SRC_API_DIR)/10.xml 10 \
182 -since $(SRC_API_DIR)/11.xml 11 \
183 -since $(SRC_API_DIR)/12.xml 12 \
184 -since $(SRC_API_DIR)/13.xml 13 \
185 -since $(SRC_API_DIR)/14.txt 14 \
186 -since $(SRC_API_DIR)/15.txt 15 \
187 -since $(SRC_API_DIR)/16.txt 16 \
188 -since $(SRC_API_DIR)/17.txt 17 \
189 -since $(SRC_API_DIR)/18.txt 18 \
190 -since $(SRC_API_DIR)/19.txt 19 \
191 -since $(SRC_API_DIR)/20.txt 20 \
192 -since $(SRC_API_DIR)/21.txt 21 \
193 -since $(SRC_API_DIR)/22.txt 22 \
Joe Fernandez1827e322015-08-12 19:45:22 -0700194 -since $(SRC_API_DIR)/23.txt 23 \
Dirk Dougherty5f60f7c2016-06-14 16:26:28 -0700195 -since $(SRC_API_DIR)/24.txt 24 \
Dirk Dougherty3376f582016-10-14 10:27:08 -0700196 -since $(SRC_API_DIR)/25.txt 25 \
Dirk Doughertyfdad0ba2017-06-09 14:43:32 -0700197 -since $(SRC_API_DIR)/26.txt 26 \
Andrew Solovaya6019b22017-10-06 14:27:20 -0700198 -since $(SRC_API_DIR)/27.txt 27 \
Andrew Solovay61204ce2018-02-24 16:44:28 -0800199 -since ./frameworks/base/api/current.txt P \
Jeff Sharkeyc204c222017-11-27 15:02:10 -0700200 -werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 \
Jeff Sharkey0f3f60b2017-04-24 18:06:20 -0600201 -overview $(LOCAL_PATH)/core/java/overview.html \
Bart Searsa8cc0582015-05-07 03:23:20 +0000202
203framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR:= \
204 $(call intermediates-dir-for,JAVA_LIBRARIES,framework,,COMMON)
205
206framework_docs_LOCAL_ADDITIONAL_JAVA_DIR:= \
Alan Viverette9ca513e2017-04-05 10:21:58 -0400207 $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
Bart Searsa8cc0582015-05-07 03:23:20 +0000208
209framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES := \
Narayan Kamathc21739a2015-07-14 13:39:23 +0100210 frameworks/base/docs/knowntags.txt \
Colin Cross72d359f2017-10-27 10:46:53 -0700211 $(libcore_to_document_generated)
Bart Searsa8cc0582015-05-07 03:23:20 +0000212
213samples_dir := development/samples/browseable
214
215# Whitelist of valid groups, used for default TOC grouping. Each sample must
216# belong to one (and only one) group. Assign samples to groups by setting
217# a sample.group var to one of these groups in the sample's _index.jd.
218sample_groups := -samplegroup Admin \
219 -samplegroup Background \
220 -samplegroup Connectivity \
221 -samplegroup Content \
222 -samplegroup Input \
223 -samplegroup Media \
224 -samplegroup Notification \
225 -samplegroup RenderScript \
226 -samplegroup Security \
227 -samplegroup Sensors \
Trevor Johns4cbe3592015-05-27 14:50:51 -0700228 -samplegroup System \
Bart Searsa8cc0582015-05-07 03:23:20 +0000229 -samplegroup Testing \
230 -samplegroup UI \
231 -samplegroup Views \
232 -samplegroup Wearable
233
234## SDK version identifiers used in the published docs
235 # major[.minor] version for current SDK. (full releases only)
smain@google.comdde8deb2016-08-29 18:36:50 -0700236framework_docs_SDK_VERSION:=7.0
Bart Searsa8cc0582015-05-07 03:23:20 +0000237 # release version (ie "Release x") (full releases only)
238framework_docs_SDK_REL_ID:=1
239
240framework_docs_LOCAL_DROIDDOC_OPTIONS += \
Billy Lamberta75dbc8f2017-03-03 13:09:15 -0800241 -hdf dac true \
Scott Mainf8cdfc82017-03-21 13:43:31 -0700242 -hdf sdk.codename O \
243 -hdf sdk.preview.version 1 \
Bart Searsa8cc0582015-05-07 03:23:20 +0000244 -hdf sdk.version $(framework_docs_SDK_VERSION) \
245 -hdf sdk.rel.id $(framework_docs_SDK_REL_ID) \
Scott Mainf8cdfc82017-03-21 13:43:31 -0700246 -hdf sdk.preview 0 \
247 -resourcesdir $(LOCAL_PATH)/docs/html/reference/images/ \
248 -resourcesoutdir reference/android/images/
Bart Searsa8cc0582015-05-07 03:23:20 +0000249
Alan Viverette9ca513e2017-04-05 10:21:58 -0400250# Federate Support Library references against local API file.
251framework_docs_LOCAL_DROIDDOC_OPTIONS += \
252 -federate SupportLib https://developer.android.com \
253 -federationapi SupportLib prebuilts/sdk/current/support-api.txt
254
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700255# ==== Public API diff ===========================
Alan Viverette6b7354c2017-07-13 17:10:14 -0400256include $(CLEAR_VARS)
257
258LOCAL_SRC_FILES := $(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800259LOCAL_GENERATED_SOURCES := $(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800260LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Alan Viverette6b7354c2017-07-13 17:10:14 -0400261LOCAL_JAVA_LIBRARIES := $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
262LOCAL_MODULE_CLASS := $(framework_docs_LOCAL_MODULE_CLASS)
263LOCAL_ADDITIONAL_JAVA_DIR := $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
264LOCAL_ADDITIONAL_DEPENDENCIES := \
265 $(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) \
266 $(INTERNAL_PLATFORM_API_FILE)
267
268LOCAL_MODULE := offline-sdk-referenceonly
269
270last_released_sdk_version := $(lastword $(call numerically_sort, \
271 $(filter-out current, \
272 $(patsubst $(SRC_API_DIR)/%.txt,%, $(wildcard $(SRC_API_DIR)/*.txt)) \
273 )\
274 ))
275
276LOCAL_APIDIFF_OLDAPI := $(LOCAL_PATH)/../../$(SRC_API_DIR)/$(last_released_sdk_version)
277LOCAL_APIDIFF_NEWAPI := $(LOCAL_PATH)/../../$(basename $(INTERNAL_PLATFORM_API_FILE))
278
279include $(BUILD_APIDIFF)
280
Jeff Sharkeyc8dc2542017-12-08 14:52:37 -0700281# Hack to get diffs included in docs output
282out_zip := $(OUT_DOCS)/$(LOCAL_MODULE)-docs.zip
283$(out_zip): $(full_target)
284
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700285# ==== System API diff ===========================
286include $(CLEAR_VARS)
287
288LOCAL_SRC_FILES := $(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800289LOCAL_GENERATED_SOURCES := $(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800290LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700291LOCAL_JAVA_LIBRARIES := $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
292LOCAL_MODULE_CLASS := $(framework_docs_LOCAL_MODULE_CLASS)
293LOCAL_ADDITIONAL_JAVA_DIR := $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
294LOCAL_ADDITIONAL_DEPENDENCIES := \
295 $(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) \
296 $(INTERNAL_PLATFORM_SYSTEM_API_FILE)
297
298LOCAL_MODULE := offline-system-sdk-referenceonly
299
300last_released_sdk_version := $(lastword $(call numerically_sort, \
301 $(filter-out current, \
302 $(patsubst $(SRC_SYSTEM_API_DIR)/%.txt,%, $(wildcard $(SRC_SYSTEM_API_DIR)/*.txt)) \
303 )\
304 ))
305
306LOCAL_APIDIFF_OLDAPI := $(LOCAL_PATH)/../../$(SRC_SYSTEM_API_DIR)/$(last_released_sdk_version)
307LOCAL_APIDIFF_NEWAPI := $(LOCAL_PATH)/../../$(basename $(INTERNAL_PLATFORM_SYSTEM_API_FILE))
308
309include $(BUILD_APIDIFF)
310
Jeff Sharkeyc8dc2542017-12-08 14:52:37 -0700311# Hack to get diffs included in docs output
312out_zip := $(OUT_DOCS)/$(LOCAL_MODULE)-docs.zip
313$(out_zip): $(full_target)
314
Bart Searsa8cc0582015-05-07 03:23:20 +0000315# ==== the api stubs and current.xml ===========================
316include $(CLEAR_VARS)
317
318LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800319LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800320LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000321LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
322LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
323LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
324LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
325LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
326LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
327
328LOCAL_MODULE := api-stubs
329
Ying Wang0f92a2e2015-07-16 14:20:22 -0700330LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_stubs_current_intermediates/src
331
Bart Searsa8cc0582015-05-07 03:23:20 +0000332LOCAL_DROIDDOC_OPTIONS:=\
333 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700334 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000335 -api $(INTERNAL_PLATFORM_API_FILE) \
David Brazdila793f3f2018-01-16 15:03:20 +0000336 -privateApi $(INTERNAL_PLATFORM_PRIVATE_API_FILE) \
337 -privateDexApi $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000338 -removedApi $(INTERNAL_PLATFORM_REMOVED_API_FILE) \
339 -nodocs
340
Scott Main15b85172017-02-21 14:30:58 -0800341LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000342
343LOCAL_UNINSTALLABLE_MODULE := true
344
345include $(BUILD_DROIDDOC)
346
David Brazdila793f3f2018-01-16 15:03:20 +0000347$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_API_FILE) \
348 $(INTERNAL_PLATFORM_PRIVATE_API_FILE) \
349 $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
Bart Searsa8cc0582015-05-07 03:23:20 +0000350$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE))
351
352# ==== the system api stubs ===================================
353include $(CLEAR_VARS)
354
355LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800356LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800357LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000358LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
359LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
360LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
361LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
362LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
363LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
364
365LOCAL_MODULE := system-api-stubs
366
Ying Wang0f92a2e2015-07-16 14:20:22 -0700367LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_system_stubs_current_intermediates/src
368
Bart Searsa8cc0582015-05-07 03:23:20 +0000369LOCAL_DROIDDOC_OPTIONS:=\
370 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700371 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000372 -showAnnotation android.annotation.SystemApi \
373 -api $(INTERNAL_PLATFORM_SYSTEM_API_FILE) \
David Brazdila793f3f2018-01-16 15:03:20 +0000374 -privateApi $(INTERNAL_PLATFORM_SYSTEM_PRIVATE_API_FILE) \
375 -privateDexApi $(INTERNAL_PLATFORM_SYSTEM_PRIVATE_DEX_API_FILE) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000376 -removedApi $(INTERNAL_PLATFORM_SYSTEM_REMOVED_API_FILE) \
Jeff Sharkey05461c02017-05-09 19:01:09 -0600377 -exactApi $(INTERNAL_PLATFORM_SYSTEM_EXACT_API_FILE) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000378 -nodocs
379
Scott Main15b85172017-02-21 14:30:58 -0800380LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000381
382LOCAL_UNINSTALLABLE_MODULE := true
383
384include $(BUILD_DROIDDOC)
385
David Brazdila793f3f2018-01-16 15:03:20 +0000386$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_SYSTEM_API_FILE) \
387 $(INTERNAL_PLATFORM_SYSTEM_PRIVATE_API_FILE) \
388 $(INTERNAL_PLATFORM_SYSTEM_PRIVATE_DEX_API_FILE)
Bart Searsa8cc0582015-05-07 03:23:20 +0000389$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE))
390
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000391# ==== the test api stubs ===================================
392include $(CLEAR_VARS)
393
394LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800395LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800396LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000397LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
398LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
399LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
400LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
401LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
402LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
403
404LOCAL_MODULE := test-api-stubs
405
406LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_test_stubs_current_intermediates/src
407
408LOCAL_DROIDDOC_OPTIONS:=\
409 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700410 -referenceonly \
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000411 -stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_test_stubs_current_intermediates/src \
412 -showAnnotation android.annotation.TestApi \
413 -api $(INTERNAL_PLATFORM_TEST_API_FILE) \
414 -removedApi $(INTERNAL_PLATFORM_TEST_REMOVED_API_FILE) \
Jeff Sharkey05461c02017-05-09 19:01:09 -0600415 -exactApi $(INTERNAL_PLATFORM_TEST_EXACT_API_FILE) \
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000416 -nodocs
417
Scott Main15b85172017-02-21 14:30:58 -0800418LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000419
420LOCAL_UNINSTALLABLE_MODULE := true
421
422include $(BUILD_DROIDDOC)
423
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000424$(INTERNAL_PLATFORM_TEST_API_FILE): $(full_target)
425$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE))
426
Bart Searsa8cc0582015-05-07 03:23:20 +0000427# ==== check javadoc comments but don't generate docs ========
428include $(CLEAR_VARS)
429
430LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800431LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800432LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000433LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
434LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
435LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
436LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
437LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
438LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
439
440LOCAL_MODULE := doc-comment-check
441
442LOCAL_DROIDDOC_OPTIONS:=\
443 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700444 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000445 -parsecomments
446
Scott Main15b85172017-02-21 14:30:58 -0800447LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000448
449LOCAL_UNINSTALLABLE_MODULE := true
450
451include $(BUILD_DROIDDOC)
452
Bart Searsa8cc0582015-05-07 03:23:20 +0000453# Run this for checkbuild
454checkbuild: doc-comment-check-docs
455# Check comment when you are updating the API
456update-api: doc-comment-check-docs
457
458# ==== static html in the sdk ==================================
459include $(CLEAR_VARS)
460
461LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800462LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800463LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000464LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
465LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
466LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
467LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
468LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
469LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
470
471LOCAL_MODULE := offline-sdk
472
473LOCAL_DROIDDOC_OPTIONS:=\
474 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
475 -offlinemode \
476 -title "Android SDK" \
477 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
smain@google.com00de8c52016-03-07 18:38:08 -0800478 -sdkvalues $(OUT_DOCS) \
smain@google.com8562ab52016-06-14 17:11:57 -0700479 -hdf android.whichdoc offline
480
Scott Main15b85172017-02-21 14:30:58 -0800481LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
smain@google.com8562ab52016-06-14 17:11:57 -0700482
483include $(BUILD_DROIDDOC)
484
485static_doc_index_redirect := $(out_dir)/index.html
486$(static_doc_index_redirect): \
487 $(LOCAL_PATH)/docs/docs-preview-index.html | $(ACP)
488 $(hide) mkdir -p $(dir $@)
489 $(hide) $(ACP) $< $@
490
491$(full_target): $(static_doc_index_redirect)
smain@google.com8562ab52016-06-14 17:11:57 -0700492
493
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700494# ==== Public API static reference docs ==================================
smain@google.com8562ab52016-06-14 17:11:57 -0700495include $(CLEAR_VARS)
496
497LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800498LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800499LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
smain@google.com8562ab52016-06-14 17:11:57 -0700500LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
501LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
502LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
503LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
504LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
505LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
506
507LOCAL_MODULE := offline-sdk-referenceonly
508
509LOCAL_DROIDDOC_OPTIONS:=\
510 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
511 -offlinemode \
512 -title "Android SDK" \
513 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
514 -sdkvalues $(OUT_DOCS) \
smain@google.com00de8c52016-03-07 18:38:08 -0800515 -hdf android.whichdoc offline \
Scott Mainf8cdfc82017-03-21 13:43:31 -0700516 -referenceonly
smain@google.com00de8c52016-03-07 18:38:08 -0800517
Scott Main15b85172017-02-21 14:30:58 -0800518LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
smain@google.com00de8c52016-03-07 18:38:08 -0800519
520include $(BUILD_DROIDDOC)
521
522static_doc_index_redirect := $(out_dir)/index.html
smain@google.com151833a2016-08-31 08:42:09 -0700523$(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html
Dan Willemsen98ff0b72016-03-23 00:42:44 -0700524 $(copy-file-to-target)
smain@google.com00de8c52016-03-07 18:38:08 -0800525
smain@google.com2f2365d2016-09-21 14:05:50 -0700526static_doc_properties := $(out_dir)/source.properties
527$(static_doc_properties): \
528 $(LOCAL_PATH)/docs/source.properties | $(ACP)
529 $(hide) mkdir -p $(dir $@)
530 $(hide) $(ACP) $< $@
531
smain@google.com00de8c52016-03-07 18:38:08 -0800532$(full_target): $(static_doc_index_redirect)
smain@google.com2f2365d2016-09-21 14:05:50 -0700533$(full_target): $(static_doc_properties)
smain@google.com00de8c52016-03-07 18:38:08 -0800534
smain@google.com7aca8be2016-03-10 14:13:30 -0800535
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700536# ==== System API static reference docs ==================================
537include $(CLEAR_VARS)
538
539LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800540LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800541LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700542LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
543LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
544LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
545LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
546LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
547LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
548
549LOCAL_MODULE := offline-system-sdk-referenceonly
550
551LOCAL_DROIDDOC_OPTIONS:=\
552 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
553 -hide 101 -hide 104 -hide 108 \
554 -showAnnotation android.annotation.SystemApi \
555 -offlinemode \
556 -title "Android System SDK" \
557 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
558 -sdkvalues $(OUT_DOCS) \
559 -hdf android.whichdoc offline \
560 -referenceonly
561
562LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
563
564include $(BUILD_DROIDDOC)
565
566static_doc_index_redirect := $(out_dir)/index.html
567$(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html
568 $(copy-file-to-target)
569
570static_doc_properties := $(out_dir)/source.properties
571$(static_doc_properties): \
572 $(LOCAL_PATH)/docs/source.properties | $(ACP)
573 $(hide) mkdir -p $(dir $@)
574 $(hide) $(ACP) $< $@
575
576$(full_target): $(static_doc_index_redirect)
577$(full_target): $(static_doc_properties)
578$(full_target): $(framework_built)
579
580
Bart Searsa8cc0582015-05-07 03:23:20 +0000581# ==== docs for the web (on the androiddevdocs app engine server) =======================
582include $(CLEAR_VARS)
583
584LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800585LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800586LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000587LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
588LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
589LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
590LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
591LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
592LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
593LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
594LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
595
596LOCAL_MODULE := online-sdk
597
598LOCAL_DROIDDOC_OPTIONS:= \
599 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
600 -toroot / \
601 -hdf android.whichdoc online \
602 $(sample_groups) \
603 -hdf android.hasSamples true \
604 -samplesdir $(samples_dir)
605
Scott Main15b85172017-02-21 14:30:58 -0800606LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000607
608include $(BUILD_DROIDDOC)
609
610# ==== docs for the web (on the androiddevdocs app engine server) =======================
Bart Searsa8cc0582015-05-07 03:23:20 +0000611include $(CLEAR_VARS)
612
613LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800614LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800615LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000616LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
617LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
618LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
619LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
620LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
621LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
622LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
623LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
624
625LOCAL_MODULE := online-system-api-sdk
626
627LOCAL_DROIDDOC_OPTIONS:= \
628 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700629 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000630 -showAnnotation android.annotation.SystemApi \
631 -title "Android SDK - Including system APIs." \
632 -toroot / \
Gina Dimino98ad8882016-05-31 17:25:48 -0700633 -hide 101 \
634 -hide 104 \
635 -hide 108 \
Bart Searsa8cc0582015-05-07 03:23:20 +0000636 -hdf android.whichdoc online \
637 $(sample_groups) \
638 -hdf android.hasSamples true \
639 -samplesdir $(samples_dir)
640
Scott Main15b85172017-02-21 14:30:58 -0800641LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Jeff Sharkey05461c02017-05-09 19:01:09 -0600642
Bart Searsa8cc0582015-05-07 03:23:20 +0000643LOCAL_UNINSTALLABLE_MODULE := true
644
645include $(BUILD_DROIDDOC)
Bart Searsa8cc0582015-05-07 03:23:20 +0000646
647# ==== docs for the web (on the devsite app engine server) =======================
648include $(CLEAR_VARS)
649LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800650LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800651LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000652LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
653LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
654LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
655LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
656LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
657LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
658LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
659# specify a second html input dir and an output path relative to OUT_DIR)
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700660LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
Bart Searsa8cc0582015-05-07 03:23:20 +0000661
662LOCAL_MODULE := ds
663
664LOCAL_DROIDDOC_OPTIONS:= \
665 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000666 -toroot / \
667 -hdf android.whichdoc online \
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700668 -devsite \
Scott Main4f9b48c2017-12-19 13:43:45 -0800669 -yamlV2 \
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700670 $(sample_groups) \
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700671 -hdf android.hasSamples true \
672 -samplesdir $(samples_dir)
Bart Searsa8cc0582015-05-07 03:23:20 +0000673
Scott Main15b85172017-02-21 14:30:58 -0800674LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000675
676include $(BUILD_DROIDDOC)
677
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700678# ==== docs for the web (on the devsite app engine server) =======================
679include $(CLEAR_VARS)
680LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800681LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800682LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700683LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
684LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
685LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
686LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
687LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
688LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
689LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
690# specify a second html input dir and an output path relative to OUT_DIR)
691LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
692
693LOCAL_MODULE := ds-static
694
695LOCAL_DROIDDOC_OPTIONS:= \
696 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
697 -hdf android.whichdoc online \
698 -staticonly \
699 -toroot / \
700 -devsite \
701 -ignoreJdLinks
702
Scott Main15b85172017-02-21 14:30:58 -0800703LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700704
705include $(BUILD_DROIDDOC)
706
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700707# ==== generates full navtree for resolving @links in ds postprocessing ====
708include $(CLEAR_VARS)
709
710LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800711LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800712LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700713LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
714LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
715LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
716LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
717LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
718LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
719
720LOCAL_MODULE := ds-ref-navtree
721
722LOCAL_DROIDDOC_OPTIONS:= \
723 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
724 -hdf android.whichdoc online \
725 -toroot / \
726 -atLinksNavtree \
727 -navtreeonly
728
Scott Main15b85172017-02-21 14:30:58 -0800729LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700730
731include $(BUILD_DROIDDOC)
732
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800733# ==== site updates for docs (on the androiddevdocs app engine server) =======================
Bart Searsa8cc0582015-05-07 03:23:20 +0000734include $(CLEAR_VARS)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800735
Bart Searsa8cc0582015-05-07 03:23:20 +0000736LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800737LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800738LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000739LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
740LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
741LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
742LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800743LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
Bart Searsa8cc0582015-05-07 03:23:20 +0000744LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
745LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800746LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
Bart Searsa8cc0582015-05-07 03:23:20 +0000747
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800748LOCAL_MODULE := online-sdk-dev
Bart Searsa8cc0582015-05-07 03:23:20 +0000749
750LOCAL_DROIDDOC_OPTIONS:= \
751 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
752 -toroot / \
753 -hdf android.whichdoc online \
754 $(sample_groups) \
755 -hdf android.hasSamples true \
756 -samplesdir $(samples_dir)
757
Scott Main15b85172017-02-21 14:30:58 -0800758LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000759
760include $(BUILD_DROIDDOC)
761
Bart Searsa8cc0582015-05-07 03:23:20 +0000762# ==== docs that have all of the stuff that's @hidden =======================
763include $(CLEAR_VARS)
764
765LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800766LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800767LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000768LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
769LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
770LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
771LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
772LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
773LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
774
775LOCAL_MODULE := hidden
776LOCAL_DROIDDOC_OPTIONS:=\
777 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700778 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000779 -title "Android SDK - Including hidden APIs."
780# -hidden
781
Scott Main15b85172017-02-21 14:30:58 -0800782LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000783
784include $(BUILD_DROIDDOC)
785
Joe Onorato1754d742016-11-21 17:51:35 -0800786# ==== java proto host library ==============================
787include $(CLEAR_VARS)
788LOCAL_MODULE := platformprotos
789LOCAL_PROTOC_OPTIMIZE_TYPE := full
790LOCAL_PROTOC_FLAGS := \
791 -Iexternal/protobuf/src
792LOCAL_SOURCE_FILES_ALL_GENERATED := true
793LOCAL_SRC_FILES := \
Mike Mada3a2952017-11-13 12:06:45 -0800794 cmds/am/proto/instrumentation_data.proto \
Primiano Tuccie4d44912018-01-10 12:14:50 +0000795 cmds/statsd/src/perfetto/perfetto_config.proto \
Joe Onorato1754d742016-11-21 17:51:35 -0800796 $(call all-proto-files-under, core/proto) \
Chenjie Yu15176cd2017-11-22 12:36:41 -0800797 $(call all-proto-files-under, libs/incident/proto) \
798 $(call all-proto-files-under, cmds/statsd/src)
Andreas Gampe3e429f32018-02-15 15:12:38 -0800799# b/72714520
800LOCAL_ERROR_PRONE_FLAGS := -Xep:MissingOverride:OFF
Joe Onorato1754d742016-11-21 17:51:35 -0800801include $(BUILD_HOST_JAVA_LIBRARY)
802
Steven Timotius7ece0422017-08-03 13:37:26 -0700803# ==== java proto device library (for test only) ==============================
804include $(CLEAR_VARS)
805LOCAL_MODULE := platformprotosnano
Joe Onorato62c220b2017-11-18 20:32:56 -0800806LOCAL_MODULE_TAGS := tests
Steven Timotius7ece0422017-08-03 13:37:26 -0700807LOCAL_PROTOC_OPTIMIZE_TYPE := nano
808LOCAL_PROTOC_FLAGS := \
809 -Iexternal/protobuf/src
810LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \
811 store_unknown_fields = true
Jiyong Parkf0048392018-02-12 21:57:59 +0900812LOCAL_SDK_VERSION := current
Steven Timotius7ece0422017-08-03 13:37:26 -0700813LOCAL_SRC_FILES := \
Yi Jin437aa6e2018-01-10 11:34:26 -0800814 $(call all-proto-files-under, core/proto) \
815 $(call all-proto-files-under, libs/incident/proto/android/os)
Steven Timotius7ece0422017-08-03 13:37:26 -0700816include $(BUILD_STATIC_JAVA_LIBRARY)
817
Bart Searsa8cc0582015-05-07 03:23:20 +0000818
Joe Onorato62c220b2017-11-18 20:32:56 -0800819# ==== java proto device library (for test only) ==============================
820include $(CLEAR_VARS)
821LOCAL_MODULE := platformprotoslite
822LOCAL_MODULE_TAGS := tests
823LOCAL_PROTOC_OPTIMIZE_TYPE := lite
824LOCAL_PROTOC_FLAGS := \
825 -Iexternal/protobuf/src
826LOCAL_SRC_FILES := \
Yi Jin437aa6e2018-01-10 11:34:26 -0800827 $(call all-proto-files-under, core/proto) \
828 $(call all-proto-files-under, libs/incident/proto/android/os)
Andreas Gampe93b64c92018-01-30 18:50:34 -0800829# Protos have lots of MissingOverride and similar.
830LOCAL_ERROR_PRONE_FLAGS := -XepDisableAllChecks
Joe Onorato62c220b2017-11-18 20:32:56 -0800831include $(BUILD_STATIC_JAVA_LIBRARY)
832
David Brazdil0649c8d2018-01-22 22:23:13 +0000833# ==== hiddenapi lists =======================================
834
Nicolas Geoffray90fa8ef2018-02-08 17:27:15 +0000835# Copy blacklist and light greylist over into the build folder.
David Brazdilf16ac002018-01-26 11:13:35 +0000836# This is for ART buildbots which need to mock these lists and have alternative
837# rules for building them. Other rules in the build system should depend on the
838# files in the build folder.
839
Nicolas Geoffray90fa8ef2018-02-08 17:27:15 +0000840$(eval $(call copy-one-file,frameworks/base/config/hiddenapi-blacklist.txt,\
841 $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST)))
David Brazdilb43351f2018-01-31 14:43:36 +0000842$(eval $(call copy-one-file,frameworks/base/config/hiddenapi-light-greylist.txt,\
843 $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST)))
David Brazdilf16ac002018-01-26 11:13:35 +0000844
Nicolas Geoffray90fa8ef2018-02-08 17:27:15 +0000845# Generate dark greylist as private API minus (blacklist plus light greylist).
David Brazdil0649c8d2018-01-22 22:23:13 +0000846
Nicolas Geoffray90fa8ef2018-02-08 17:27:15 +0000847$(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST): PRIVATE_API := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
848$(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST): BLACKLIST := $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST)
849$(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST): LIGHT_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST)
850$(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST): $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
851 $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST) \
852 $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST)
853 if [ ! -z "`comm -12 <(sort $(BLACKLIST)) <(sort $(LIGHT_GREYLIST))`" ]; then \
854 echo "There should be no overlap between $(BLACKLIST) and $(LIGHT_GREYLIST)" 1>&2; \
David Brazdil0649c8d2018-01-22 22:23:13 +0000855 exit 1; \
Nicolas Geoffray90fa8ef2018-02-08 17:27:15 +0000856 elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(BLACKLIST))`" ]; then \
857 echo "$(BLACKLIST) must be a subset of $(PRIVATE_API)" 1>&2; \
858 exit 2; \
David Brazdilb43351f2018-01-31 14:43:36 +0000859 elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(LIGHT_GREYLIST))`" ]; then \
860 echo "$(LIGHT_GREYLIST) must be a subset of $(PRIVATE_API)" 1>&2; \
David Brazdil0649c8d2018-01-22 22:23:13 +0000861 exit 3; \
862 fi
Nicolas Geoffray90fa8ef2018-02-08 17:27:15 +0000863 comm -23 <(sort $(PRIVATE_API)) <(sort $(BLACKLIST) $(LIGHT_GREYLIST)) > $@
David Brazdil0649c8d2018-01-22 22:23:13 +0000864
Bart Searsa8cc0582015-05-07 03:23:20 +0000865# Include subdirectory makefiles
866# ============================================================
867
868# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
869# team really wants is to build the stuff defined by this makefile.
870ifeq (,$(ONE_SHOT_MAKEFILE))
871include $(call first-makefiles-under,$(LOCAL_PATH))
872endif
873
Holly Jiuyu Sunbbc85802017-12-21 18:44:59 -0800874endif # ANDROID_BUILD_EMBEDDED
875