blob: bdad6c3d14832371ba9c3f96e3000d745454d76a [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 \
Anton Hansson092d9b82018-04-19 14:04:32 +0100199 -since $(SRC_API_DIR)/28.txt 28 \
Jeff Sharkeyc204c222017-11-27 15:02:10 -0700200 -werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 \
Jeff Sharkey0f3f60b2017-04-24 18:06:20 -0600201 -overview $(LOCAL_PATH)/core/java/overview.html \
Bart Searsa8cc0582015-05-07 03:23:20 +0000202
203framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR:= \
204 $(call intermediates-dir-for,JAVA_LIBRARIES,framework,,COMMON)
205
206framework_docs_LOCAL_ADDITIONAL_JAVA_DIR:= \
Alan Viverette9ca513e2017-04-05 10:21:58 -0400207 $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
Bart Searsa8cc0582015-05-07 03:23:20 +0000208
209framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES := \
Narayan Kamathc21739a2015-07-14 13:39:23 +0100210 frameworks/base/docs/knowntags.txt \
Colin Cross72d359f2017-10-27 10:46:53 -0700211 $(libcore_to_document_generated)
Bart Searsa8cc0582015-05-07 03:23:20 +0000212
213samples_dir := development/samples/browseable
214
215# Whitelist of valid groups, used for default TOC grouping. Each sample must
216# belong to one (and only one) group. Assign samples to groups by setting
217# a sample.group var to one of these groups in the sample's _index.jd.
218sample_groups := -samplegroup Admin \
219 -samplegroup Background \
220 -samplegroup Connectivity \
221 -samplegroup Content \
222 -samplegroup Input \
223 -samplegroup Media \
224 -samplegroup Notification \
225 -samplegroup RenderScript \
226 -samplegroup Security \
227 -samplegroup Sensors \
Trevor Johns4cbe3592015-05-27 14:50:51 -0700228 -samplegroup System \
Bart Searsa8cc0582015-05-07 03:23:20 +0000229 -samplegroup Testing \
230 -samplegroup UI \
231 -samplegroup Views \
232 -samplegroup Wearable
233
234## SDK version identifiers used in the published docs
235 # major[.minor] version for current SDK. (full releases only)
smain@google.comdde8deb2016-08-29 18:36:50 -0700236framework_docs_SDK_VERSION:=7.0
Bart Searsa8cc0582015-05-07 03:23:20 +0000237 # release version (ie "Release x") (full releases only)
238framework_docs_SDK_REL_ID:=1
239
240framework_docs_LOCAL_DROIDDOC_OPTIONS += \
Billy Lamberta75dbc8f2017-03-03 13:09:15 -0800241 -hdf dac true \
Scott Mainf8cdfc82017-03-21 13:43:31 -0700242 -hdf sdk.codename O \
243 -hdf sdk.preview.version 1 \
Bart Searsa8cc0582015-05-07 03:23:20 +0000244 -hdf sdk.version $(framework_docs_SDK_VERSION) \
245 -hdf sdk.rel.id $(framework_docs_SDK_REL_ID) \
Scott Mainf8cdfc82017-03-21 13:43:31 -0700246 -hdf sdk.preview 0 \
247 -resourcesdir $(LOCAL_PATH)/docs/html/reference/images/ \
248 -resourcesoutdir reference/android/images/
Bart Searsa8cc0582015-05-07 03:23:20 +0000249
Alan Viverette9ca513e2017-04-05 10:21:58 -0400250# Federate Support Library references against local API file.
251framework_docs_LOCAL_DROIDDOC_OPTIONS += \
252 -federate SupportLib https://developer.android.com \
253 -federationapi SupportLib prebuilts/sdk/current/support-api.txt
254
Alan Viverette67b51d42018-03-28 17:10:20 -0400255# Federate AndroidX references against local API file.
256framework_docs_LOCAL_DROIDDOC_OPTIONS += \
257 -federate AndroidX https://developer.android.com \
258 -federationapi AndroidX prebuilts/sdk/current/androidx-api.txt
259
Nan Zhangbd9eda52018-06-05 19:01:32 -0700260framework_metalava_docs_LOCAL_DROIDDOC_OPTIONS := \
261 --manifest ./frameworks/base/core/res/AndroidManifest.xml \
262 --hide-package com.android.okhttp \
263 --hide-package com.android.org.conscrypt --hide-package com.android.server \
264 --hide RequiresPermission \
265 --hide MissingPermission --hide BroadcastBehavior \
266 --hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol \
Colin Cross36697112018-07-02 14:04:10 -0700267 --hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo \
268 --include-annotation-classes tools/metalava/stub-annotations \
Nan Zhangbd9eda52018-06-05 19:01:32 -0700269
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700270# ==== Public API diff ===========================
Alan Viverette6b7354c2017-07-13 17:10:14 -0400271include $(CLEAR_VARS)
272
273LOCAL_SRC_FILES := $(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800274LOCAL_GENERATED_SOURCES := $(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800275LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Alan Viverette6b7354c2017-07-13 17:10:14 -0400276LOCAL_JAVA_LIBRARIES := $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
277LOCAL_MODULE_CLASS := $(framework_docs_LOCAL_MODULE_CLASS)
278LOCAL_ADDITIONAL_JAVA_DIR := $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
279LOCAL_ADDITIONAL_DEPENDENCIES := \
280 $(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) \
281 $(INTERNAL_PLATFORM_API_FILE)
282
283LOCAL_MODULE := offline-sdk-referenceonly
284
285last_released_sdk_version := $(lastword $(call numerically_sort, \
286 $(filter-out current, \
287 $(patsubst $(SRC_API_DIR)/%.txt,%, $(wildcard $(SRC_API_DIR)/*.txt)) \
288 )\
289 ))
290
291LOCAL_APIDIFF_OLDAPI := $(LOCAL_PATH)/../../$(SRC_API_DIR)/$(last_released_sdk_version)
292LOCAL_APIDIFF_NEWAPI := $(LOCAL_PATH)/../../$(basename $(INTERNAL_PLATFORM_API_FILE))
293
294include $(BUILD_APIDIFF)
295
Jeff Sharkeyc8dc2542017-12-08 14:52:37 -0700296# Hack to get diffs included in docs output
297out_zip := $(OUT_DOCS)/$(LOCAL_MODULE)-docs.zip
298$(out_zip): $(full_target)
299
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700300# ==== System API diff ===========================
301include $(CLEAR_VARS)
302
303LOCAL_SRC_FILES := $(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800304LOCAL_GENERATED_SOURCES := $(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800305LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700306LOCAL_JAVA_LIBRARIES := $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
307LOCAL_MODULE_CLASS := $(framework_docs_LOCAL_MODULE_CLASS)
308LOCAL_ADDITIONAL_JAVA_DIR := $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
309LOCAL_ADDITIONAL_DEPENDENCIES := \
310 $(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) \
311 $(INTERNAL_PLATFORM_SYSTEM_API_FILE)
312
313LOCAL_MODULE := offline-system-sdk-referenceonly
314
315last_released_sdk_version := $(lastword $(call numerically_sort, \
316 $(filter-out current, \
317 $(patsubst $(SRC_SYSTEM_API_DIR)/%.txt,%, $(wildcard $(SRC_SYSTEM_API_DIR)/*.txt)) \
318 )\
319 ))
320
321LOCAL_APIDIFF_OLDAPI := $(LOCAL_PATH)/../../$(SRC_SYSTEM_API_DIR)/$(last_released_sdk_version)
322LOCAL_APIDIFF_NEWAPI := $(LOCAL_PATH)/../../$(basename $(INTERNAL_PLATFORM_SYSTEM_API_FILE))
323
324include $(BUILD_APIDIFF)
325
Jeff Sharkeyc8dc2542017-12-08 14:52:37 -0700326# Hack to get diffs included in docs output
327out_zip := $(OUT_DOCS)/$(LOCAL_MODULE)-docs.zip
328$(out_zip): $(full_target)
329
Bart Searsa8cc0582015-05-07 03:23:20 +0000330# ==== the api stubs and current.xml ===========================
331include $(CLEAR_VARS)
332
333LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800334LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800335LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000336LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
337LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
338LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
339LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
340LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
341LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
342
343LOCAL_MODULE := api-stubs
344
Ying Wang0f92a2e2015-07-16 14:20:22 -0700345LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_stubs_current_intermediates/src
346
Bart Searsa8cc0582015-05-07 03:23:20 +0000347LOCAL_DROIDDOC_OPTIONS:=\
348 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700349 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000350 -api $(INTERNAL_PLATFORM_API_FILE) \
351 -removedApi $(INTERNAL_PLATFORM_REMOVED_API_FILE) \
352 -nodocs
353
Scott Main15b85172017-02-21 14:30:58 -0800354LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000355
356LOCAL_UNINSTALLABLE_MODULE := true
357
358include $(BUILD_DROIDDOC)
359
David Brazdila793f3f2018-01-16 15:03:20 +0000360$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_API_FILE) \
David Brazdil68e1c1d2018-03-08 14:32:27 +0000361 $(INTERNAL_PLATFORM_REMOVED_API_FILE)
Bart Searsa8cc0582015-05-07 03:23:20 +0000362$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE))
363
Nan Zhangbd9eda52018-06-05 19:01:32 -0700364# ==== the metalava api stubs and current.xml ===========================
365include $(CLEAR_VARS)
366
367LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
368LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
369LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
370LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
371LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
372LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
373LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
374LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
375
376LOCAL_MODULE := metalava-api-stubs
377LOCAL_DROIDDOC_USE_METALAVA := true
Nan Zhangb3871a62018-06-06 19:11:33 -0700378LOCAL_DROIDDOC_METALAVA_PREVIOUS_API := prebuilts/sdk/api/27.txt
379LOCAL_DROIDDOC_METALAVA_ANNOTATIONS_ENABLED := true
380LOCAL_DROIDDOC_METALAVA_MERGE_ANNOTATIONS_DIR := tools/metalava/manual
Nan Zhangbd9eda52018-06-05 19:01:32 -0700381
382LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/metalava_android_stubs_current_intermediates/src
383
384INTERNAL_PLATFORM_METALAVA_PUBLIC_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/metalava_public_api.txt
385INTERNAL_PLATFORM_METALAVA_PUBLIC_REMOVED_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/metalava_removed.txt
386
387LOCAL_DROIDDOC_OPTIONS:=\
388 $(framework_metalava_docs_LOCAL_DROIDDOC_OPTIONS) \
389 --api $(INTERNAL_PLATFORM_METALAVA_PUBLIC_API_FILE) \
390 --removed-api $(INTERNAL_PLATFORM_METALAVA_PUBLIC_REMOVED_API_FILE) \
391 -nodocs
392
393LOCAL_UNINSTALLABLE_MODULE := true
394
395include $(BUILD_DROIDDOC)
396
397$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_METALAVA_PUBLIC_API_FILE) \
398 $(INTERNAL_PLATFORM_METALAVA_PUBLIC_REMOVED_API_FILE)
399$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_METALAVA_PUBLIC_API_FILE))
400
Bart Searsa8cc0582015-05-07 03:23:20 +0000401# ==== the system api stubs ===================================
402include $(CLEAR_VARS)
403
404LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800405LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800406LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000407LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
408LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
409LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
410LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
411LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
412LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
413
414LOCAL_MODULE := system-api-stubs
415
Ying Wang0f92a2e2015-07-16 14:20:22 -0700416LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_system_stubs_current_intermediates/src
417
Bart Searsa8cc0582015-05-07 03:23:20 +0000418LOCAL_DROIDDOC_OPTIONS:=\
419 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700420 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000421 -showAnnotation android.annotation.SystemApi \
422 -api $(INTERNAL_PLATFORM_SYSTEM_API_FILE) \
423 -removedApi $(INTERNAL_PLATFORM_SYSTEM_REMOVED_API_FILE) \
Jeff Sharkey05461c02017-05-09 19:01:09 -0600424 -exactApi $(INTERNAL_PLATFORM_SYSTEM_EXACT_API_FILE) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000425 -nodocs
426
Scott Main15b85172017-02-21 14:30:58 -0800427LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000428
429LOCAL_UNINSTALLABLE_MODULE := true
430
431include $(BUILD_DROIDDOC)
432
David Brazdila793f3f2018-01-16 15:03:20 +0000433$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_SYSTEM_API_FILE) \
David Brazdil68e1c1d2018-03-08 14:32:27 +0000434 $(INTERNAL_PLATFORM_SYSTEM_REMOVED_API_FILE) \
435 $(INTERNAL_PLATFORM_SYSTEM_EXACT_API_FILE)
Bart Searsa8cc0582015-05-07 03:23:20 +0000436$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE))
437
Nan Zhangbd9eda52018-06-05 19:01:32 -0700438# ==== the metalava system api stubs ===================================
439include $(CLEAR_VARS)
440
441LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
442LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
443LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
444LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
445LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
446LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
447LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
448LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
449
450LOCAL_MODULE := metalava-system-api-stubs
451LOCAL_DROIDDOC_USE_METALAVA := true
Nan Zhangb3871a62018-06-06 19:11:33 -0700452LOCAL_DROIDDOC_METALAVA_PREVIOUS_API := prebuilts/sdk/api/27.txt
453LOCAL_DROIDDOC_METALAVA_ANNOTATIONS_ENABLED := true
454LOCAL_DROIDDOC_METALAVA_MERGE_ANNOTATIONS_DIR := tools/metalava/manual
Nan Zhangbd9eda52018-06-05 19:01:32 -0700455
456LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/metalava_android_system_stubs_current_intermediates/src
457
458INTERNAL_PLATFORM_METALAVA_SYSTEM_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/metalava-system-api.txt
459INTERNAL_PLATFORM_METALAVA_SYSTEM_REMOVED_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/metalava-system-removed.txt
460
461LOCAL_DROIDDOC_OPTIONS:=\
462 $(framework_metalava_docs_LOCAL_DROIDDOC_OPTIONS) \
463 --show-annotation android.annotation.SystemApi \
464 --api $(INTERNAL_PLATFORM_METALAVA_SYSTEM_API_FILE) \
465 --removed-api $(INTERNAL_PLATFORM_METALAVA_SYSTEM_REMOVED_API_FILE) \
466 -nodocs
467
468LOCAL_UNINSTALLABLE_MODULE := true
469
470include $(BUILD_DROIDDOC)
471
472$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_METALAVA_SYSTEM_API_FILE) \
473 $(INTERNAL_PLATFORM_METALAVA_SYSTEM_REMOVED_API_FILE) \
474$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_METALAVA_SYSTEM_API_FILE))
475
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000476# ==== the test api stubs ===================================
477include $(CLEAR_VARS)
478
479LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800480LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800481LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000482LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
483LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
484LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
485LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
486LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
487LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
488
489LOCAL_MODULE := test-api-stubs
490
491LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_test_stubs_current_intermediates/src
492
493LOCAL_DROIDDOC_OPTIONS:=\
494 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700495 -referenceonly \
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000496 -stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_test_stubs_current_intermediates/src \
497 -showAnnotation android.annotation.TestApi \
498 -api $(INTERNAL_PLATFORM_TEST_API_FILE) \
499 -removedApi $(INTERNAL_PLATFORM_TEST_REMOVED_API_FILE) \
Jeff Sharkey05461c02017-05-09 19:01:09 -0600500 -exactApi $(INTERNAL_PLATFORM_TEST_EXACT_API_FILE) \
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000501 -nodocs
502
Scott Main15b85172017-02-21 14:30:58 -0800503LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000504
505LOCAL_UNINSTALLABLE_MODULE := true
506
507include $(BUILD_DROIDDOC)
508
David Brazdil68e1c1d2018-03-08 14:32:27 +0000509$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_TEST_API_FILE) \
510 $(INTERNAL_PLATFORM_TEST_REMOVED_API_FILE) \
511 $(INTERNAL_PLATFORM_TEST_EXACT_API_FILE)
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000512$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE))
513
Nan Zhangbd9eda52018-06-05 19:01:32 -0700514# ==== the metalava test api stubs ===================================
515include $(CLEAR_VARS)
516
517LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
518LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
519LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
520LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
521LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
522LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
523LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
524LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
525
526LOCAL_MODULE := metalava-test-api-stubs
527LOCAL_DROIDDOC_USE_METALAVA := true
Nan Zhangb3871a62018-06-06 19:11:33 -0700528LOCAL_DROIDDOC_METALAVA_PREVIOUS_API := prebuilts/sdk/api/27.txt
529LOCAL_DROIDDOC_METALAVA_ANNOTATIONS_ENABLED := true
530LOCAL_DROIDDOC_METALAVA_MERGE_ANNOTATIONS_DIR := tools/metalava/manual
Nan Zhangbd9eda52018-06-05 19:01:32 -0700531
532LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/metalava_android_test_stubs_current_intermediates/src
533
534INTERNAL_PLATFORM_METALAVA_TEST_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/metalava-test-api.txt
535INTERNAL_PLATFORM_METALAVA_TEST_REMOVED_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/metalava-test-removed.txt
536
537LOCAL_DROIDDOC_OPTIONS:=\
538 $(framework_metalava_docs_LOCAL_DROIDDOC_OPTIONS) \
539 --show-annotation android.annotation.TestApi \
540 --api $(INTERNAL_PLATFORM_METALAVA_TEST_API_FILE) \
541 --removed-api $(INTERNAL_PLATFORM_METALAVA_TEST_REMOVED_API_FILE) \
542 -nodocs
543
544LOCAL_UNINSTALLABLE_MODULE := true
545
546include $(BUILD_DROIDDOC)
547
548$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_METALAVA_TEST_API_FILE) \
549 $(INTERNAL_PLATFORM_METALAVA_TEST_REMOVED_API_FILE) \
550$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_METALAVA_TEST_API_FILE))
551
David Brazdil68e1c1d2018-03-08 14:32:27 +0000552# ==== the complete hidden api list ===================================
553include $(CLEAR_VARS)
554
555LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
556LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
557LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
558LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
559LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
560LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
561LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
562LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
563LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
564
565LOCAL_MODULE := hidden-api-list
566
567LOCAL_DROIDDOC_OPTIONS:=\
568 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
569 -referenceonly \
570 -showUnannotated \
571 -showAnnotation android.annotation.SystemApi \
572 -showAnnotation android.annotation.TestApi \
David Brazdil94c2ab62018-05-30 13:59:11 +0100573 -dexApi $(INTERNAL_PLATFORM_DEX_API_FILE) \
David Brazdil68e1c1d2018-03-08 14:32:27 +0000574 -privateDexApi $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
David Brazdil0f0abb22018-04-26 16:10:35 +0100575 -removedDexApi $(INTERNAL_PLATFORM_REMOVED_DEX_API_FILE) \
David Brazdil68e1c1d2018-03-08 14:32:27 +0000576 -nodocs
577
578LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
579
580LOCAL_UNINSTALLABLE_MODULE := true
581
582include $(BUILD_DROIDDOC)
583
David Brazdil94c2ab62018-05-30 13:59:11 +0100584$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_DEX_API_FILE) \
585 $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
David Brazdil0f0abb22018-04-26 16:10:35 +0100586 $(INTERNAL_PLATFORM_REMOVED_DEX_API_FILE)
David Brazdil68e1c1d2018-03-08 14:32:27 +0000587
Bart Searsa8cc0582015-05-07 03:23:20 +0000588# ==== check javadoc comments but don't generate docs ========
589include $(CLEAR_VARS)
590
591LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800592LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800593LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000594LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
595LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
596LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
597LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
598LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
599LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
600
601LOCAL_MODULE := doc-comment-check
602
603LOCAL_DROIDDOC_OPTIONS:=\
604 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700605 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000606 -parsecomments
607
Scott Main15b85172017-02-21 14:30:58 -0800608LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000609
610LOCAL_UNINSTALLABLE_MODULE := true
611
612include $(BUILD_DROIDDOC)
613
Bart Searsa8cc0582015-05-07 03:23:20 +0000614# Run this for checkbuild
615checkbuild: doc-comment-check-docs
616# Check comment when you are updating the API
617update-api: doc-comment-check-docs
618
619# ==== static html in the sdk ==================================
620include $(CLEAR_VARS)
621
622LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800623LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800624LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000625LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
626LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
627LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
628LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
629LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
630LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
631
632LOCAL_MODULE := offline-sdk
633
634LOCAL_DROIDDOC_OPTIONS:=\
635 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
636 -offlinemode \
637 -title "Android SDK" \
638 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
smain@google.com00de8c52016-03-07 18:38:08 -0800639 -sdkvalues $(OUT_DOCS) \
smain@google.com8562ab52016-06-14 17:11:57 -0700640 -hdf android.whichdoc offline
641
Scott Main15b85172017-02-21 14:30:58 -0800642LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
smain@google.com8562ab52016-06-14 17:11:57 -0700643
644include $(BUILD_DROIDDOC)
645
646static_doc_index_redirect := $(out_dir)/index.html
647$(static_doc_index_redirect): \
648 $(LOCAL_PATH)/docs/docs-preview-index.html | $(ACP)
649 $(hide) mkdir -p $(dir $@)
650 $(hide) $(ACP) $< $@
651
652$(full_target): $(static_doc_index_redirect)
smain@google.com8562ab52016-06-14 17:11:57 -0700653
654
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700655# ==== Public API static reference docs ==================================
smain@google.com8562ab52016-06-14 17:11:57 -0700656include $(CLEAR_VARS)
657
658LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800659LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800660LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
smain@google.com8562ab52016-06-14 17:11:57 -0700661LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
662LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
663LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
664LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
665LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
666LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
667
668LOCAL_MODULE := offline-sdk-referenceonly
669
670LOCAL_DROIDDOC_OPTIONS:=\
671 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
672 -offlinemode \
673 -title "Android SDK" \
674 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
675 -sdkvalues $(OUT_DOCS) \
smain@google.com00de8c52016-03-07 18:38:08 -0800676 -hdf android.whichdoc offline \
Scott Mainf8cdfc82017-03-21 13:43:31 -0700677 -referenceonly
smain@google.com00de8c52016-03-07 18:38:08 -0800678
Scott Main15b85172017-02-21 14:30:58 -0800679LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
smain@google.com00de8c52016-03-07 18:38:08 -0800680
681include $(BUILD_DROIDDOC)
682
683static_doc_index_redirect := $(out_dir)/index.html
smain@google.com151833a2016-08-31 08:42:09 -0700684$(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html
Dan Willemsen98ff0b72016-03-23 00:42:44 -0700685 $(copy-file-to-target)
smain@google.com00de8c52016-03-07 18:38:08 -0800686
smain@google.com2f2365d2016-09-21 14:05:50 -0700687static_doc_properties := $(out_dir)/source.properties
688$(static_doc_properties): \
689 $(LOCAL_PATH)/docs/source.properties | $(ACP)
690 $(hide) mkdir -p $(dir $@)
691 $(hide) $(ACP) $< $@
692
smain@google.com00de8c52016-03-07 18:38:08 -0800693$(full_target): $(static_doc_index_redirect)
smain@google.com2f2365d2016-09-21 14:05:50 -0700694$(full_target): $(static_doc_properties)
smain@google.com00de8c52016-03-07 18:38:08 -0800695
smain@google.com7aca8be2016-03-10 14:13:30 -0800696
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700697# ==== System API static reference docs ==================================
698include $(CLEAR_VARS)
699
700LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800701LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800702LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Jeff Sharkeyd2bf31c2017-11-29 13:14:27 -0700703LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
704LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
705LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
706LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
707LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
708LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
709
710LOCAL_MODULE := offline-system-sdk-referenceonly
711
712LOCAL_DROIDDOC_OPTIONS:=\
713 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
714 -hide 101 -hide 104 -hide 108 \
715 -showAnnotation android.annotation.SystemApi \
716 -offlinemode \
717 -title "Android System SDK" \
718 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
719 -sdkvalues $(OUT_DOCS) \
720 -hdf android.whichdoc offline \
721 -referenceonly
722
723LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
724
725include $(BUILD_DROIDDOC)
726
727static_doc_index_redirect := $(out_dir)/index.html
728$(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html
729 $(copy-file-to-target)
730
731static_doc_properties := $(out_dir)/source.properties
732$(static_doc_properties): \
733 $(LOCAL_PATH)/docs/source.properties | $(ACP)
734 $(hide) mkdir -p $(dir $@)
735 $(hide) $(ACP) $< $@
736
737$(full_target): $(static_doc_index_redirect)
738$(full_target): $(static_doc_properties)
739$(full_target): $(framework_built)
740
741
Bart Searsa8cc0582015-05-07 03:23:20 +0000742# ==== docs for the web (on the androiddevdocs app engine server) =======================
743include $(CLEAR_VARS)
744
745LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800746LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800747LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000748LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
749LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
750LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
751LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
752LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
753LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
754LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
755LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
756
757LOCAL_MODULE := online-sdk
758
759LOCAL_DROIDDOC_OPTIONS:= \
760 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
761 -toroot / \
762 -hdf android.whichdoc online \
763 $(sample_groups) \
764 -hdf android.hasSamples true \
765 -samplesdir $(samples_dir)
766
Scott Main15b85172017-02-21 14:30:58 -0800767LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000768
769include $(BUILD_DROIDDOC)
770
771# ==== docs for the web (on the androiddevdocs app engine server) =======================
Bart Searsa8cc0582015-05-07 03:23:20 +0000772include $(CLEAR_VARS)
773
774LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800775LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800776LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000777LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
778LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
779LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
780LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
781LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
782LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
783LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
784LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
785
786LOCAL_MODULE := online-system-api-sdk
787
788LOCAL_DROIDDOC_OPTIONS:= \
789 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700790 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000791 -showAnnotation android.annotation.SystemApi \
792 -title "Android SDK - Including system APIs." \
793 -toroot / \
Gina Dimino98ad8882016-05-31 17:25:48 -0700794 -hide 101 \
795 -hide 104 \
796 -hide 108 \
Bart Searsa8cc0582015-05-07 03:23:20 +0000797 -hdf android.whichdoc online \
798 $(sample_groups) \
799 -hdf android.hasSamples true \
800 -samplesdir $(samples_dir)
801
Scott Main15b85172017-02-21 14:30:58 -0800802LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Jeff Sharkey05461c02017-05-09 19:01:09 -0600803
Bart Searsa8cc0582015-05-07 03:23:20 +0000804LOCAL_UNINSTALLABLE_MODULE := true
805
806include $(BUILD_DROIDDOC)
Bart Searsa8cc0582015-05-07 03:23:20 +0000807
808# ==== docs for the web (on the devsite app engine server) =======================
809include $(CLEAR_VARS)
810LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800811LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800812LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000813LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
814LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
815LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
816LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
817LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
818LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
819LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
820# specify a second html input dir and an output path relative to OUT_DIR)
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700821LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
Bart Searsa8cc0582015-05-07 03:23:20 +0000822
823LOCAL_MODULE := ds
824
825LOCAL_DROIDDOC_OPTIONS:= \
826 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000827 -toroot / \
828 -hdf android.whichdoc online \
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700829 -devsite \
Scott Main4f9b48c2017-12-19 13:43:45 -0800830 -yamlV2 \
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700831 $(sample_groups) \
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700832 -hdf android.hasSamples true \
833 -samplesdir $(samples_dir)
Bart Searsa8cc0582015-05-07 03:23:20 +0000834
Scott Main15b85172017-02-21 14:30:58 -0800835LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000836
837include $(BUILD_DROIDDOC)
838
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700839# ==== docs for the web (on the devsite app engine server) =======================
840include $(CLEAR_VARS)
841LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800842LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800843LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700844LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
845LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
846LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
847LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
848LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
849LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
850LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
851# specify a second html input dir and an output path relative to OUT_DIR)
852LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
853
854LOCAL_MODULE := ds-static
855
856LOCAL_DROIDDOC_OPTIONS:= \
857 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
858 -hdf android.whichdoc online \
859 -staticonly \
860 -toroot / \
861 -devsite \
862 -ignoreJdLinks
863
Scott Main15b85172017-02-21 14:30:58 -0800864LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700865
866include $(BUILD_DROIDDOC)
867
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700868# ==== generates full navtree for resolving @links in ds postprocessing ====
869include $(CLEAR_VARS)
870
871LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800872LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800873LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700874LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
875LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
876LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
877LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
878LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
879LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
880
881LOCAL_MODULE := ds-ref-navtree
882
883LOCAL_DROIDDOC_OPTIONS:= \
884 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
885 -hdf android.whichdoc online \
886 -toroot / \
887 -atLinksNavtree \
888 -navtreeonly
889
Scott Main15b85172017-02-21 14:30:58 -0800890LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700891
892include $(BUILD_DROIDDOC)
893
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800894# ==== site updates for docs (on the androiddevdocs app engine server) =======================
Bart Searsa8cc0582015-05-07 03:23:20 +0000895include $(CLEAR_VARS)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800896
Bart Searsa8cc0582015-05-07 03:23:20 +0000897LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800898LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800899LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000900LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
901LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
902LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
903LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800904LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
Bart Searsa8cc0582015-05-07 03:23:20 +0000905LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
906LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800907LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
Bart Searsa8cc0582015-05-07 03:23:20 +0000908
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800909LOCAL_MODULE := online-sdk-dev
Bart Searsa8cc0582015-05-07 03:23:20 +0000910
911LOCAL_DROIDDOC_OPTIONS:= \
912 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
913 -toroot / \
914 -hdf android.whichdoc online \
915 $(sample_groups) \
916 -hdf android.hasSamples true \
917 -samplesdir $(samples_dir)
918
Scott Main15b85172017-02-21 14:30:58 -0800919LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000920
921include $(BUILD_DROIDDOC)
922
Bart Searsa8cc0582015-05-07 03:23:20 +0000923# ==== docs that have all of the stuff that's @hidden =======================
924include $(CLEAR_VARS)
925
926LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Crossbd200ce2017-12-04 13:45:19 -0800927LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Crosscf3a0b52017-11-16 00:15:28 -0800928LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000929LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
930LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
931LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
932LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
933LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
934LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
935
936LOCAL_MODULE := hidden
937LOCAL_DROIDDOC_OPTIONS:=\
938 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700939 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000940 -title "Android SDK - Including hidden APIs."
941# -hidden
942
Scott Main15b85172017-02-21 14:30:58 -0800943LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000944
945include $(BUILD_DROIDDOC)
946
Joe Onorato1754d742016-11-21 17:51:35 -0800947# ==== java proto host library ==============================
948include $(CLEAR_VARS)
949LOCAL_MODULE := platformprotos
950LOCAL_PROTOC_OPTIMIZE_TYPE := full
951LOCAL_PROTOC_FLAGS := \
952 -Iexternal/protobuf/src
953LOCAL_SOURCE_FILES_ALL_GENERATED := true
954LOCAL_SRC_FILES := \
Mike Mada3a2952017-11-13 12:06:45 -0800955 cmds/am/proto/instrumentation_data.proto \
Primiano Tuccie4d44912018-01-10 12:14:50 +0000956 cmds/statsd/src/perfetto/perfetto_config.proto \
Joe Onorato1754d742016-11-21 17:51:35 -0800957 $(call all-proto-files-under, core/proto) \
Chenjie Yu15176cd2017-11-22 12:36:41 -0800958 $(call all-proto-files-under, libs/incident/proto) \
959 $(call all-proto-files-under, cmds/statsd/src)
Andreas Gampe3e429f32018-02-15 15:12:38 -0800960# b/72714520
961LOCAL_ERROR_PRONE_FLAGS := -Xep:MissingOverride:OFF
Joe Onorato1754d742016-11-21 17:51:35 -0800962include $(BUILD_HOST_JAVA_LIBRARY)
963
Steven Timotius7ece0422017-08-03 13:37:26 -0700964# ==== java proto device library (for test only) ==============================
965include $(CLEAR_VARS)
966LOCAL_MODULE := platformprotosnano
Joe Onorato62c220b2017-11-18 20:32:56 -0800967LOCAL_MODULE_TAGS := tests
Steven Timotius7ece0422017-08-03 13:37:26 -0700968LOCAL_PROTOC_OPTIMIZE_TYPE := nano
969LOCAL_PROTOC_FLAGS := \
970 -Iexternal/protobuf/src
971LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \
972 store_unknown_fields = true
Jiyong Parkf0048392018-02-12 21:57:59 +0900973LOCAL_SDK_VERSION := current
Steven Timotius7ece0422017-08-03 13:37:26 -0700974LOCAL_SRC_FILES := \
Yi Jin437aa6e2018-01-10 11:34:26 -0800975 $(call all-proto-files-under, core/proto) \
976 $(call all-proto-files-under, libs/incident/proto/android/os)
Steven Timotius7ece0422017-08-03 13:37:26 -0700977include $(BUILD_STATIC_JAVA_LIBRARY)
978
Bart Searsa8cc0582015-05-07 03:23:20 +0000979
Joe Onorato62c220b2017-11-18 20:32:56 -0800980# ==== java proto device library (for test only) ==============================
981include $(CLEAR_VARS)
982LOCAL_MODULE := platformprotoslite
983LOCAL_MODULE_TAGS := tests
984LOCAL_PROTOC_OPTIMIZE_TYPE := lite
985LOCAL_PROTOC_FLAGS := \
986 -Iexternal/protobuf/src
987LOCAL_SRC_FILES := \
Yi Jin437aa6e2018-01-10 11:34:26 -0800988 $(call all-proto-files-under, core/proto) \
989 $(call all-proto-files-under, libs/incident/proto/android/os)
Andreas Gampe93b64c92018-01-30 18:50:34 -0800990# Protos have lots of MissingOverride and similar.
991LOCAL_ERROR_PRONE_FLAGS := -XepDisableAllChecks
Joe Onorato62c220b2017-11-18 20:32:56 -0800992include $(BUILD_STATIC_JAVA_LIBRARY)
993
David Brazdil0649c8d2018-01-22 22:23:13 +0000994# ==== hiddenapi lists =======================================
David Brazdil721bc8e2018-05-08 15:04:20 +0100995include $(CLEAR_VARS)
David Brazdil0649c8d2018-01-22 22:23:13 +0000996
David Brazdil721bc8e2018-05-08 15:04:20 +0100997# File names of final API lists
998LOCAL_LIGHT_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST)
999LOCAL_DARK_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST)
1000LOCAL_BLACKLIST := $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST)
1001
1002# File names of source files we will use to generate the final API lists.
1003LOCAL_SRC_GREYLIST := frameworks/base/config/hiddenapi-light-greylist.txt
1004LOCAL_SRC_VENDOR_LIST := frameworks/base/config/hiddenapi-vendor-list.txt
David Brazdil4b34f792018-05-08 16:49:02 +01001005LOCAL_SRC_FORCE_BLACKLIST := frameworks/base/config/hiddenapi-force-blacklist.txt
David Brazdil59998302018-06-15 14:05:42 +01001006LOCAL_SRC_PUBLIC_API := frameworks/base/config/hiddenapi-public-dex.txt
1007LOCAL_SRC_PRIVATE_API := frameworks/base/config/hiddenapi-private-dex.txt
1008LOCAL_SRC_REMOVED_API := frameworks/base/config/hiddenapi-removed-dex.txt
David Brazdil721bc8e2018-05-08 15:04:20 +01001009
1010LOCAL_SRC_ALL := \
1011 $(LOCAL_SRC_GREYLIST) \
1012 $(LOCAL_SRC_VENDOR_LIST) \
David Brazdil4b34f792018-05-08 16:49:02 +01001013 $(LOCAL_SRC_FORCE_BLACKLIST) \
David Brazdil94c2ab62018-05-30 13:59:11 +01001014 $(LOCAL_SRC_PUBLIC_API) \
David Brazdil721bc8e2018-05-08 15:04:20 +01001015 $(LOCAL_SRC_PRIVATE_API) \
1016 $(LOCAL_SRC_REMOVED_API)
1017
1018define assert-has-no-overlap
1019if [ ! -z "`comm -12 <(sort $(1)) <(sort $(2))`" ]; then \
1020 echo "$(1) and $(2) should not overlap" 1>&2; \
1021 comm -12 <(sort $(1)) <(sort $(2)) 1>&2; \
1022 exit 1; \
1023fi
1024endef
1025
1026define assert-is-subset
1027if [ ! -z "`comm -23 <(sort $(1)) <(sort $(2))`" ]; then \
1028 echo "$(1) must be a subset of $(2)" 1>&2; \
1029 comm -23 <(sort $(1)) <(sort $(2)) 1>&2; \
1030 exit 1; \
1031fi
1032endef
1033
1034define assert-has-no-duplicates
1035if [ ! -z "`sort $(1) | uniq -D`" ]; then \
1036 echo "$(1) has duplicate entries" 1>&2; \
1037 sort $(1) | uniq -D 1>&2; \
1038 exit 1; \
1039fi
1040endef
1041
1042# The following rules build API lists in the build folder.
1043# By not using files from the source tree, ART buildbots can mock these lists
1044# or have alternative rules for building them. Other rules in the build system
1045# should depend on the files in the build folder.
David Brazdilf16ac002018-01-26 11:13:35 +00001046
David Brazdil05855332018-04-25 11:15:07 +01001047# Merge light greylist from multiple files:
David Brazdil721bc8e2018-05-08 15:04:20 +01001048# (1) manual greylist LOCAL_SRC_GREYLIST
1049# (2) list of usages from vendor apps LOCAL_SRC_VENDOR_LIST
1050# (3) list of removed APIs in LOCAL_SRC_REMOVED_API
David Brazdil05855332018-04-25 11:15:07 +01001051# @removed does not imply private in Doclava. We must take the subset also
David Brazdil721bc8e2018-05-08 15:04:20 +01001052# in LOCAL_SRC_PRIVATE_API.
David Brazdil05855332018-04-25 11:15:07 +01001053# (4) list of serialization APIs
1054# Automatically adds all methods which match the signatures in
1055# REGEX_SERIALIZATION. These are greylisted in order to allow applications
1056# to write their own serializers.
David Brazdil721bc8e2018-05-08 15:04:20 +01001057$(LOCAL_LIGHT_GREYLIST): REGEX_SERIALIZATION := \
David Brazdil357170b12018-03-26 16:02:23 +01001058 "readObject\(Ljava/io/ObjectInputStream;\)V" \
1059 "readObjectNoData\(\)V" \
1060 "readResolve\(\)Ljava/lang/Object;" \
1061 "serialVersionUID:J" \
1062 "serialPersistentFields:\[Ljava/io/ObjectStreamField;" \
1063 "writeObject\(Ljava/io/ObjectOutputStream;\)V" \
1064 "writeReplace\(\)Ljava/lang/Object;"
David Brazdil721bc8e2018-05-08 15:04:20 +01001065$(LOCAL_LIGHT_GREYLIST): $(LOCAL_SRC_ALL)
1066 sort $(LOCAL_SRC_GREYLIST) $(LOCAL_SRC_VENDOR_LIST) \
1067 <(grep -E "\->("$(subst $(space),"|",$(REGEX_SERIALIZATION))")$$" \
1068 $(LOCAL_SRC_PRIVATE_API)) \
1069 <(comm -12 <(sort $(LOCAL_SRC_REMOVED_API)) <(sort $(LOCAL_SRC_PRIVATE_API))) \
1070 > $@
1071 $(call assert-has-no-duplicates,$@)
1072 $(call assert-is-subset,$@,$(LOCAL_SRC_PRIVATE_API))
David Brazdil4b34f792018-05-08 16:49:02 +01001073 $(call assert-has-no-overlap,$@,$(LOCAL_SRC_FORCE_BLACKLIST))
David Brazdilf16ac002018-01-26 11:13:35 +00001074
David Brazdil4c3c0312018-05-10 15:50:02 +01001075# Generate dark greylist as remaining classes and class members in the same
1076# package as classes listed in the light greylist.
David Brazdil185f00e2018-05-08 15:28:31 +01001077# The algorithm is as follows:
1078# (1) extract the class descriptor from each entry in LOCAL_LIGHT_GREYLIST
David Brazdil4c3c0312018-05-10 15:50:02 +01001079# (2) strip everything after the last forward-slash,
1080# e.g. 'Lpackage/subpackage/class$inner;' turns into 'Lpackage/subpackage/'
1081# (3) insert all entries from LOCAL_SRC_PRIVATE_API which begin with the package
1082# name but do not contain another forward-slash in the class name, e.g.
1083# matching '^Lpackage/subpackage/[^/;]*;'
David Brazdil185f00e2018-05-08 15:28:31 +01001084# (4) subtract entries shared with LOCAL_LIGHT_GREYLIST
David Brazdil721bc8e2018-05-08 15:04:20 +01001085$(LOCAL_DARK_GREYLIST): $(LOCAL_SRC_ALL) $(LOCAL_LIGHT_GREYLIST)
David Brazdil4b34f792018-05-08 16:49:02 +01001086 comm -13 <(sort $(LOCAL_LIGHT_GREYLIST) $(LOCAL_SRC_FORCE_BLACKLIST)) \
David Brazdil94c2ab62018-05-30 13:59:11 +01001087 <(cat $(LOCAL_SRC_PUBLIC_API) $(LOCAL_LIGHT_GREYLIST) | \
1088 sed 's/\->.*//' | sed 's/\(.*\/\).*/\1/' | sort | uniq | \
David Brazdil4c3c0312018-05-10 15:50:02 +01001089 while read PKG_NAME; do \
1090 grep -E "^$${PKG_NAME}[^/;]*;" $(LOCAL_SRC_PRIVATE_API); \
David Brazdil185f00e2018-05-08 15:28:31 +01001091 done | sort | uniq) \
1092 > $@
David Brazdil721bc8e2018-05-08 15:04:20 +01001093 $(call assert-is-subset,$@,$(LOCAL_SRC_PRIVATE_API))
1094 $(call assert-has-no-duplicates,$@)
1095 $(call assert-has-no-overlap,$@,$(LOCAL_LIGHT_GREYLIST))
David Brazdil4b34f792018-05-08 16:49:02 +01001096 $(call assert-has-no-overlap,$@,$(LOCAL_SRC_FORCE_BLACKLIST))
David Brazdil36bbf122018-03-28 11:28:39 +01001097
David Brazdil721bc8e2018-05-08 15:04:20 +01001098# Generate blacklist as private API minus (light greylist plus dark greylist).
1099$(LOCAL_BLACKLIST): $(LOCAL_SRC_ALL) $(LOCAL_LIGHT_GREYLIST) $(LOCAL_DARK_GREYLIST)
1100 comm -13 <(sort $(LOCAL_LIGHT_GREYLIST) $(LOCAL_DARK_GREYLIST)) \
1101 <(sort $(LOCAL_SRC_PRIVATE_API)) \
1102 > $@
1103 $(call assert-is-subset,$@,$(LOCAL_SRC_PRIVATE_API))
1104 $(call assert-has-no-duplicates,$@)
1105 $(call assert-has-no-overlap,$@,$(LOCAL_LIGHT_GREYLIST))
1106 $(call assert-has-no-overlap,$@,$(LOCAL_DARK_GREYLIST))
David Brazdil4b34f792018-05-08 16:49:02 +01001107 $(call assert-is-subset,$(LOCAL_SRC_FORCE_BLACKLIST),$@)
David Brazdil0649c8d2018-01-22 22:23:13 +00001108
Bart Searsa8cc0582015-05-07 03:23:20 +00001109# Include subdirectory makefiles
1110# ============================================================
1111
1112# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
1113# team really wants is to build the stuff defined by this makefile.
1114ifeq (,$(ONE_SHOT_MAKEFILE))
1115include $(call first-makefiles-under,$(LOCAL_PATH))
1116endif
1117
Holly Jiuyu Sunbbc85802017-12-21 18:44:59 -08001118endif # ANDROID_BUILD_EMBEDDED