blob: 147d2cf9ded820c45d005f8e6ee67efe174f5ab2 [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 Cross5f4dcf62017-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 Cross5f4dcf62017-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 Cross5f4dcf62017-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
Paul Duffinc08090f2017-06-29 14:58:43 +010075framework_base_android_test_mock_src_files := \
Paul Duffin69516f42017-11-15 11:39:14 +000076 $(call all-java-files-under, test-mock/src/android/test/mock)
Paul Duffinc08090f2017-06-29 14:58:43 +010077
78framework_base_android_test_runner_excluding_mock_src_files := \
Colin Cross5f4dcf62017-11-16 00:15:28 -080079 $(filter-out $(framework_base_android_test_mock_src_files), $(call all-java-files-under, test-runner/src))
Paul Duffinc08090f2017-06-29 14:58:43 +010080
Colin Cross5f4dcf62017-11-16 00:15:28 -080081# Find all files in specific directories (relative to frameworks/base)
82# to document and check apis
83files_to_check_apis := \
84 $(call find-other-java-files, \
Paul Duffin21418272017-11-16 15:47:05 +000085 test-base/src \
Colin Cross5f4dcf62017-11-16 00:15:28 -080086 $(non_base_dirs) \
87 )
Bart Searsa8cc0582015-05-07 03:23:20 +000088
Colin Cross5f4dcf62017-11-16 00:15:28 -080089# Find all files in specific packages that were used to compile
90# framework.jar to document and check apis
91files_to_check_apis += \
92 $(addprefix ../../,\
93 $(filter \
94 $(foreach dir,$(FRAMEWORKS_BASE_JAVA_SRC_DIRS),\
95 $(foreach package,$(packages_to_document),\
96 $(dir)/$(package)/%.java)),\
97 $(SOONG_FRAMEWORK_SRCS)))
98
99# Find all generated files that were used to compile framework.jar
Colin Cross0c760952017-12-04 13:45:19 -0800100files_to_check_apis_generated := \
101 $(filter $(OUT_DIR)/%,\
102 $(SOONG_FRAMEWORK_SRCS))
George Mountf6be9932015-12-03 07:39:55 -0800103
Bart Searsa8cc0582015-05-07 03:23:20 +0000104# These are relative to frameworks/base
105# FRAMEWORKS_BASE_SUBDIRS comes from build/core/pathmap.mk
Colin Cross5f4dcf62017-11-16 00:15:28 -0800106files_to_document := \
107 $(files_to_check_apis) \
108 $(call find-other-java-files,\
109 $(addprefix ../../, $(FRAMEWORKS_DATA_BINDING_JAVA_SRC_DIRS)) \
110 test-runner/src)
George Mountf6be9932015-12-03 07:39:55 -0800111
Bart Searsa8cc0582015-05-07 03:23:20 +0000112# These are relative to frameworks/base
113html_dirs := \
114 $(FRAMEWORKS_BASE_SUBDIRS) \
Colin Cross5f4dcf62017-11-16 00:15:28 -0800115 $(non_base_dirs) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000116
117# Common sources for doc check and api check
118common_src_files := \
119 $(call find-other-html-files, $(html_dirs)) \
Colin Cross5f4dcf62017-11-16 00:15:28 -0800120 $(addprefix ../../, $(libcore_to_document)) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000121
122# These are relative to frameworks/base
123framework_docs_LOCAL_SRC_FILES := \
Colin Cross5f4dcf62017-11-16 00:15:28 -0800124 $(files_to_document) \
125 $(common_src_files) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000126
127# These are relative to frameworks/base
128framework_docs_LOCAL_API_CHECK_SRC_FILES := \
Colin Cross5f4dcf62017-11-16 00:15:28 -0800129 $(framework_base_android_test_mock_src_files) \
130 $(framework_base_android_test_runner_excluding_mock_src_files) \
131 $(files_to_check_apis) \
132 $(common_src_files) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000133
134# This is used by ide.mk as the list of source files that are
135# always included.
136INTERNAL_SDK_SOURCE_DIRS := $(addprefix $(LOCAL_PATH)/,$(dirs_to_document))
137
138framework_docs_LOCAL_DROIDDOC_SOURCE_PATH := \
139 $(FRAMEWORKS_BASE_JAVA_SRC_DIRS)
140
Colin Cross5f4dcf62017-11-16 00:15:28 -0800141framework_docs_LOCAL_SRCJARS := $(SOONG_FRAMEWORK_SRCJARS)
142
Colin Cross0c760952017-12-04 13:45:19 -0800143framework_docs_LOCAL_GENERATED_SOURCES := \
144 $(libcore_to_document_generated) \
145 $(files_to_check_apis_generated) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000146
147framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES := \
Piotr Jastrzebskicfa292e2015-02-17 16:58:52 +0000148 core-oj \
Bart Searsa8cc0582015-05-07 03:23:20 +0000149 core-libart \
150 conscrypt \
151 bouncycastle \
152 okhttp \
153 ext \
154 framework \
Paul Duffinc08090f2017-06-29 14:58:43 +0100155 voip-common \
156 android.test.mock \
Bart Searsa8cc0582015-05-07 03:23:20 +0000157
Alan Viverette2d362a52017-04-05 10:21:58 -0400158# Platform docs can refer to Support Library APIs, but we don't actually build
159# them as part of the docs target, so we need to include them on the classpath.
Bart Searsa8cc0582015-05-07 03:23:20 +0000160framework_docs_LOCAL_JAVA_LIBRARIES := \
161 $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES) \
162 $(FRAMEWORKS_SUPPORT_JAVA_LIBRARIES)
163
164framework_docs_LOCAL_MODULE_CLASS := JAVA_LIBRARIES
165framework_docs_LOCAL_DROIDDOC_HTML_DIR := docs/html
166# The since flag (-since N.xml API_LEVEL) is used to add API Level information
167# to the reference documentation. Must be in order of oldest to newest.
168#
169# Conscrypt (com.android.org.conscrypt) is an implementation detail and should
170# not be referenced in the documentation.
171framework_docs_LOCAL_DROIDDOC_OPTIONS := \
Jeff Sharkey0f3f60b2017-04-24 18:06:20 -0600172 -android \
Bart Searsa8cc0582015-05-07 03:23:20 +0000173 -knowntags ./frameworks/base/docs/knowntags.txt \
Narayan Kamath2c4f2842015-07-27 14:02:11 +0100174 -knowntags ./libcore/known_oj_tags.txt \
Jeff Sharkeybfc4fcd2017-06-05 17:38:17 -0600175 -manifest ./frameworks/base/core/res/AndroidManifest.xml \
Tobias Thierer97bb6cf2018-03-05 22:55:32 +0000176 -hidePackage com.android.internal \
177 -hidePackage com.android.internal.util \
Jeff Sharkeybc4f48b2017-12-06 21:02:11 -0700178 -hidePackage com.android.okhttp \
Bart Searsa8cc0582015-05-07 03:23:20 +0000179 -hidePackage com.android.org.conscrypt \
Jeff Sharkeybc4f48b2017-12-06 21:02:11 -0700180 -hidePackage com.android.server \
Bart Searsa8cc0582015-05-07 03:23:20 +0000181 -since $(SRC_API_DIR)/1.xml 1 \
182 -since $(SRC_API_DIR)/2.xml 2 \
183 -since $(SRC_API_DIR)/3.xml 3 \
184 -since $(SRC_API_DIR)/4.xml 4 \
185 -since $(SRC_API_DIR)/5.xml 5 \
186 -since $(SRC_API_DIR)/6.xml 6 \
187 -since $(SRC_API_DIR)/7.xml 7 \
188 -since $(SRC_API_DIR)/8.xml 8 \
189 -since $(SRC_API_DIR)/9.xml 9 \
190 -since $(SRC_API_DIR)/10.xml 10 \
191 -since $(SRC_API_DIR)/11.xml 11 \
192 -since $(SRC_API_DIR)/12.xml 12 \
193 -since $(SRC_API_DIR)/13.xml 13 \
194 -since $(SRC_API_DIR)/14.txt 14 \
195 -since $(SRC_API_DIR)/15.txt 15 \
196 -since $(SRC_API_DIR)/16.txt 16 \
197 -since $(SRC_API_DIR)/17.txt 17 \
198 -since $(SRC_API_DIR)/18.txt 18 \
199 -since $(SRC_API_DIR)/19.txt 19 \
200 -since $(SRC_API_DIR)/20.txt 20 \
201 -since $(SRC_API_DIR)/21.txt 21 \
202 -since $(SRC_API_DIR)/22.txt 22 \
Joe Fernandez1827e322015-08-12 19:45:22 -0700203 -since $(SRC_API_DIR)/23.txt 23 \
Dirk Dougherty5f60f7c2016-06-14 16:26:28 -0700204 -since $(SRC_API_DIR)/24.txt 24 \
Dirk Dougherty3376f582016-10-14 10:27:08 -0700205 -since $(SRC_API_DIR)/25.txt 25 \
Dirk Doughertyfdad0ba2017-06-09 14:43:32 -0700206 -since $(SRC_API_DIR)/26.txt 26 \
Andrew Solovaya6019b22017-10-06 14:27:20 -0700207 -since $(SRC_API_DIR)/27.txt 27 \
Jeff Sharkey2337aec2017-12-06 21:12:23 -0700208 -werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 \
Jeff Sharkey0f3f60b2017-04-24 18:06:20 -0600209 -overview $(LOCAL_PATH)/core/java/overview.html \
Bart Searsa8cc0582015-05-07 03:23:20 +0000210
211framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR:= \
212 $(call intermediates-dir-for,JAVA_LIBRARIES,framework,,COMMON)
213
214framework_docs_LOCAL_ADDITIONAL_JAVA_DIR:= \
Alan Viverette2d362a52017-04-05 10:21:58 -0400215 $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
Bart Searsa8cc0582015-05-07 03:23:20 +0000216
217framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES := \
Narayan Kamathc21739a2015-07-14 13:39:23 +0100218 frameworks/base/docs/knowntags.txt \
Colin Cross72d359f2017-10-27 10:46:53 -0700219 $(libcore_to_document_generated)
Bart Searsa8cc0582015-05-07 03:23:20 +0000220
221samples_dir := development/samples/browseable
222
223# Whitelist of valid groups, used for default TOC grouping. Each sample must
224# belong to one (and only one) group. Assign samples to groups by setting
225# a sample.group var to one of these groups in the sample's _index.jd.
226sample_groups := -samplegroup Admin \
227 -samplegroup Background \
228 -samplegroup Connectivity \
229 -samplegroup Content \
230 -samplegroup Input \
231 -samplegroup Media \
232 -samplegroup Notification \
233 -samplegroup RenderScript \
234 -samplegroup Security \
235 -samplegroup Sensors \
Trevor Johns4cbe3592015-05-27 14:50:51 -0700236 -samplegroup System \
Bart Searsa8cc0582015-05-07 03:23:20 +0000237 -samplegroup Testing \
238 -samplegroup UI \
239 -samplegroup Views \
240 -samplegroup Wearable
241
242## SDK version identifiers used in the published docs
243 # major[.minor] version for current SDK. (full releases only)
smain@google.comdde8deb2016-08-29 18:36:50 -0700244framework_docs_SDK_VERSION:=7.0
Bart Searsa8cc0582015-05-07 03:23:20 +0000245 # release version (ie "Release x") (full releases only)
246framework_docs_SDK_REL_ID:=1
247
248framework_docs_LOCAL_DROIDDOC_OPTIONS += \
Billy Lamberta75dbc8f2017-03-03 13:09:15 -0800249 -hdf dac true \
Scott Mainf8cdfc82017-03-21 13:43:31 -0700250 -hdf sdk.codename O \
251 -hdf sdk.preview.version 1 \
Bart Searsa8cc0582015-05-07 03:23:20 +0000252 -hdf sdk.version $(framework_docs_SDK_VERSION) \
253 -hdf sdk.rel.id $(framework_docs_SDK_REL_ID) \
Scott Mainf8cdfc82017-03-21 13:43:31 -0700254 -hdf sdk.preview 0 \
255 -resourcesdir $(LOCAL_PATH)/docs/html/reference/images/ \
256 -resourcesoutdir reference/android/images/
Bart Searsa8cc0582015-05-07 03:23:20 +0000257
Alan Viverette2d362a52017-04-05 10:21:58 -0400258# Federate Support Library references against local API file.
259framework_docs_LOCAL_DROIDDOC_OPTIONS += \
260 -federate SupportLib https://developer.android.com \
261 -federationapi SupportLib prebuilts/sdk/current/support-api.txt
262
Bart Searsa8cc0582015-05-07 03:23:20 +0000263# ==== the api stubs and current.xml ===========================
264include $(CLEAR_VARS)
265
266LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Cross0c760952017-12-04 13:45:19 -0800267LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Cross5f4dcf62017-11-16 00:15:28 -0800268LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000269LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
270LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
271LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
272LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
273LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
274LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
275
276LOCAL_MODULE := api-stubs
277
Ying Wang0f92a2e2015-07-16 14:20:22 -0700278LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_stubs_current_intermediates/src
279
Bart Searsa8cc0582015-05-07 03:23:20 +0000280LOCAL_DROIDDOC_OPTIONS:=\
281 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700282 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000283 -api $(INTERNAL_PLATFORM_API_FILE) \
David Brazdila793f3f2018-01-16 15:03:20 +0000284 -privateApi $(INTERNAL_PLATFORM_PRIVATE_API_FILE) \
285 -privateDexApi $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000286 -removedApi $(INTERNAL_PLATFORM_REMOVED_API_FILE) \
287 -nodocs
288
Scott Main15b85172017-02-21 14:30:58 -0800289LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000290
291LOCAL_UNINSTALLABLE_MODULE := true
292
293include $(BUILD_DROIDDOC)
294
David Brazdila793f3f2018-01-16 15:03:20 +0000295$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_API_FILE) \
296 $(INTERNAL_PLATFORM_PRIVATE_API_FILE) \
297 $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
Bart Searsa8cc0582015-05-07 03:23:20 +0000298$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE))
299
300# ==== the system api stubs ===================================
301include $(CLEAR_VARS)
302
303LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Cross0c760952017-12-04 13:45:19 -0800304LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Cross5f4dcf62017-11-16 00:15:28 -0800305LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000306LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
307LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
308LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
309LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
310LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
311LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
312
313LOCAL_MODULE := system-api-stubs
314
Ying Wang0f92a2e2015-07-16 14:20:22 -0700315LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_system_stubs_current_intermediates/src
316
Bart Searsa8cc0582015-05-07 03:23:20 +0000317LOCAL_DROIDDOC_OPTIONS:=\
318 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700319 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000320 -showAnnotation android.annotation.SystemApi \
321 -api $(INTERNAL_PLATFORM_SYSTEM_API_FILE) \
David Brazdila793f3f2018-01-16 15:03:20 +0000322 -privateApi $(INTERNAL_PLATFORM_SYSTEM_PRIVATE_API_FILE) \
323 -privateDexApi $(INTERNAL_PLATFORM_SYSTEM_PRIVATE_DEX_API_FILE) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000324 -removedApi $(INTERNAL_PLATFORM_SYSTEM_REMOVED_API_FILE) \
Jeff Sharkey05461c02017-05-09 19:01:09 -0600325 -exactApi $(INTERNAL_PLATFORM_SYSTEM_EXACT_API_FILE) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000326 -nodocs
327
Scott Main15b85172017-02-21 14:30:58 -0800328LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000329
330LOCAL_UNINSTALLABLE_MODULE := true
331
332include $(BUILD_DROIDDOC)
333
David Brazdila793f3f2018-01-16 15:03:20 +0000334$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_SYSTEM_API_FILE) \
335 $(INTERNAL_PLATFORM_SYSTEM_PRIVATE_API_FILE) \
336 $(INTERNAL_PLATFORM_SYSTEM_PRIVATE_DEX_API_FILE)
Bart Searsa8cc0582015-05-07 03:23:20 +0000337$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE))
338
Michael Wrightb2b2c0e72015-11-06 15:21:13 +0000339# ==== the test api stubs ===================================
340include $(CLEAR_VARS)
341
342LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
Colin Cross0c760952017-12-04 13:45:19 -0800343LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Cross5f4dcf62017-11-16 00:15:28 -0800344LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Michael Wrightb2b2c0e72015-11-06 15:21:13 +0000345LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
346LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
347LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
348LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
349LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
350LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
351
352LOCAL_MODULE := test-api-stubs
353
354LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_test_stubs_current_intermediates/src
355
356LOCAL_DROIDDOC_OPTIONS:=\
357 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700358 -referenceonly \
Michael Wrightb2b2c0e72015-11-06 15:21:13 +0000359 -stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_test_stubs_current_intermediates/src \
360 -showAnnotation android.annotation.TestApi \
361 -api $(INTERNAL_PLATFORM_TEST_API_FILE) \
362 -removedApi $(INTERNAL_PLATFORM_TEST_REMOVED_API_FILE) \
Jeff Sharkey05461c02017-05-09 19:01:09 -0600363 -exactApi $(INTERNAL_PLATFORM_TEST_EXACT_API_FILE) \
Michael Wrightb2b2c0e72015-11-06 15:21:13 +0000364 -nodocs
365
Scott Main15b85172017-02-21 14:30:58 -0800366LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Michael Wrightb2b2c0e72015-11-06 15:21:13 +0000367
368LOCAL_UNINSTALLABLE_MODULE := true
369
370include $(BUILD_DROIDDOC)
371
Michael Wrightb2b2c0e72015-11-06 15:21:13 +0000372$(INTERNAL_PLATFORM_TEST_API_FILE): $(full_target)
373$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE))
374
Bart Searsa8cc0582015-05-07 03:23:20 +0000375# ==== check javadoc comments but don't generate docs ========
376include $(CLEAR_VARS)
377
378LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Cross0c760952017-12-04 13:45:19 -0800379LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Cross5f4dcf62017-11-16 00:15:28 -0800380LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000381LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
382LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
383LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
384LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
385LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
386LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
387
388LOCAL_MODULE := doc-comment-check
389
390LOCAL_DROIDDOC_OPTIONS:=\
391 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700392 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000393 -parsecomments
394
Scott Main15b85172017-02-21 14:30:58 -0800395LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000396
397LOCAL_UNINSTALLABLE_MODULE := true
398
399include $(BUILD_DROIDDOC)
400
Bart Searsa8cc0582015-05-07 03:23:20 +0000401# Run this for checkbuild
402checkbuild: doc-comment-check-docs
403# Check comment when you are updating the API
404update-api: doc-comment-check-docs
405
406# ==== static html in the sdk ==================================
407include $(CLEAR_VARS)
408
409LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Cross0c760952017-12-04 13:45:19 -0800410LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Cross5f4dcf62017-11-16 00:15:28 -0800411LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000412LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
413LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
414LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
415LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
416LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
417LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
418
419LOCAL_MODULE := offline-sdk
420
421LOCAL_DROIDDOC_OPTIONS:=\
422 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
423 -offlinemode \
424 -title "Android SDK" \
425 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
smain@google.com00de8c52016-03-07 18:38:08 -0800426 -sdkvalues $(OUT_DOCS) \
smain@google.com8562ab52016-06-14 17:11:57 -0700427 -hdf android.whichdoc offline
428
Scott Main15b85172017-02-21 14:30:58 -0800429LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
smain@google.com8562ab52016-06-14 17:11:57 -0700430
431include $(BUILD_DROIDDOC)
432
433static_doc_index_redirect := $(out_dir)/index.html
434$(static_doc_index_redirect): \
435 $(LOCAL_PATH)/docs/docs-preview-index.html | $(ACP)
436 $(hide) mkdir -p $(dir $@)
437 $(hide) $(ACP) $< $@
438
439$(full_target): $(static_doc_index_redirect)
smain@google.com8562ab52016-06-14 17:11:57 -0700440
441
442# ==== static html in the sdk ==================================
443include $(CLEAR_VARS)
444
445LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Cross0c760952017-12-04 13:45:19 -0800446LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Cross5f4dcf62017-11-16 00:15:28 -0800447LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
smain@google.com8562ab52016-06-14 17:11:57 -0700448LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
449LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
450LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
451LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
452LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
453LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
454
455LOCAL_MODULE := offline-sdk-referenceonly
456
457LOCAL_DROIDDOC_OPTIONS:=\
458 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
459 -offlinemode \
460 -title "Android SDK" \
461 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
462 -sdkvalues $(OUT_DOCS) \
smain@google.com00de8c52016-03-07 18:38:08 -0800463 -hdf android.whichdoc offline \
Scott Mainf8cdfc82017-03-21 13:43:31 -0700464 -referenceonly
smain@google.com00de8c52016-03-07 18:38:08 -0800465
Scott Main15b85172017-02-21 14:30:58 -0800466LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
smain@google.com00de8c52016-03-07 18:38:08 -0800467
468include $(BUILD_DROIDDOC)
469
470static_doc_index_redirect := $(out_dir)/index.html
smain@google.com151833a2016-08-31 08:42:09 -0700471$(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html
Dan Willemsen98ff0b72016-03-23 00:42:44 -0700472 $(copy-file-to-target)
smain@google.com00de8c52016-03-07 18:38:08 -0800473
smain@google.com2f2365d2016-09-21 14:05:50 -0700474static_doc_properties := $(out_dir)/source.properties
475$(static_doc_properties): \
476 $(LOCAL_PATH)/docs/source.properties | $(ACP)
477 $(hide) mkdir -p $(dir $@)
478 $(hide) $(ACP) $< $@
479
smain@google.com00de8c52016-03-07 18:38:08 -0800480$(full_target): $(static_doc_index_redirect)
smain@google.com2f2365d2016-09-21 14:05:50 -0700481$(full_target): $(static_doc_properties)
smain@google.com00de8c52016-03-07 18:38:08 -0800482
smain@google.com7aca8be2016-03-10 14:13:30 -0800483
Bart Searsa8cc0582015-05-07 03:23:20 +0000484# ==== docs for the web (on the androiddevdocs app engine server) =======================
485include $(CLEAR_VARS)
486
487LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Cross0c760952017-12-04 13:45:19 -0800488LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Cross5f4dcf62017-11-16 00:15:28 -0800489LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000490LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
491LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
492LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
493LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
494LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
495LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
496LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
497LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
498
499LOCAL_MODULE := online-sdk
500
501LOCAL_DROIDDOC_OPTIONS:= \
502 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
503 -toroot / \
504 -hdf android.whichdoc online \
505 $(sample_groups) \
506 -hdf android.hasSamples true \
507 -samplesdir $(samples_dir)
508
Scott Main15b85172017-02-21 14:30:58 -0800509LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000510
511include $(BUILD_DROIDDOC)
512
513# ==== docs for the web (on the androiddevdocs app engine server) =======================
Bart Searsa8cc0582015-05-07 03:23:20 +0000514include $(CLEAR_VARS)
515
516LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Cross0c760952017-12-04 13:45:19 -0800517LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Cross5f4dcf62017-11-16 00:15:28 -0800518LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000519LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
520LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
521LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
522LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
523LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
524LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
525LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
526LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
527
528LOCAL_MODULE := online-system-api-sdk
529
530LOCAL_DROIDDOC_OPTIONS:= \
531 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700532 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000533 -showAnnotation android.annotation.SystemApi \
534 -title "Android SDK - Including system APIs." \
535 -toroot / \
Gina Dimino98ad8882016-05-31 17:25:48 -0700536 -hide 101 \
537 -hide 104 \
538 -hide 108 \
Bart Searsa8cc0582015-05-07 03:23:20 +0000539 -hdf android.whichdoc online \
540 $(sample_groups) \
541 -hdf android.hasSamples true \
542 -samplesdir $(samples_dir)
543
Scott Main15b85172017-02-21 14:30:58 -0800544LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Jeff Sharkey05461c02017-05-09 19:01:09 -0600545
Bart Searsa8cc0582015-05-07 03:23:20 +0000546LOCAL_UNINSTALLABLE_MODULE := true
547
548include $(BUILD_DROIDDOC)
Bart Searsa8cc0582015-05-07 03:23:20 +0000549
550# ==== docs for the web (on the devsite app engine server) =======================
551include $(CLEAR_VARS)
552LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Cross0c760952017-12-04 13:45:19 -0800553LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Cross5f4dcf62017-11-16 00:15:28 -0800554LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000555LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
556LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
557LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
558LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
559LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
560LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
561LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
562# specify a second html input dir and an output path relative to OUT_DIR)
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700563LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
Bart Searsa8cc0582015-05-07 03:23:20 +0000564
565LOCAL_MODULE := ds
566
567LOCAL_DROIDDOC_OPTIONS:= \
568 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000569 -toroot / \
570 -hdf android.whichdoc online \
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700571 -devsite \
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700572 $(sample_groups) \
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700573 -hdf android.hasSamples true \
574 -samplesdir $(samples_dir)
Bart Searsa8cc0582015-05-07 03:23:20 +0000575
Scott Main15b85172017-02-21 14:30:58 -0800576LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000577
578include $(BUILD_DROIDDOC)
579
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700580# ==== docs for the web (on the devsite app engine server) =======================
581include $(CLEAR_VARS)
582LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Cross0c760952017-12-04 13:45:19 -0800583LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Cross5f4dcf62017-11-16 00:15:28 -0800584LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700585LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
586LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
587LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
588LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
589LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
590LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
591LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
592# specify a second html input dir and an output path relative to OUT_DIR)
593LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
594
595LOCAL_MODULE := ds-static
596
597LOCAL_DROIDDOC_OPTIONS:= \
598 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
599 -hdf android.whichdoc online \
600 -staticonly \
601 -toroot / \
602 -devsite \
603 -ignoreJdLinks
604
Scott Main15b85172017-02-21 14:30:58 -0800605LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700606
607include $(BUILD_DROIDDOC)
608
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700609# ==== generates full navtree for resolving @links in ds postprocessing ====
610include $(CLEAR_VARS)
611
612LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Cross0c760952017-12-04 13:45:19 -0800613LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Cross5f4dcf62017-11-16 00:15:28 -0800614LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700615LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
616LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
617LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
618LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
619LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
620LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
621
622LOCAL_MODULE := ds-ref-navtree
623
624LOCAL_DROIDDOC_OPTIONS:= \
625 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
626 -hdf android.whichdoc online \
627 -toroot / \
628 -atLinksNavtree \
629 -navtreeonly
630
Scott Main15b85172017-02-21 14:30:58 -0800631LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700632
633include $(BUILD_DROIDDOC)
634
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800635# ==== site updates for docs (on the androiddevdocs app engine server) =======================
Bart Searsa8cc0582015-05-07 03:23:20 +0000636include $(CLEAR_VARS)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800637
Bart Searsa8cc0582015-05-07 03:23:20 +0000638LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Cross0c760952017-12-04 13:45:19 -0800639LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Cross5f4dcf62017-11-16 00:15:28 -0800640LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000641LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
642LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
643LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
644LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800645LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
Bart Searsa8cc0582015-05-07 03:23:20 +0000646LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
647LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800648LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
Bart Searsa8cc0582015-05-07 03:23:20 +0000649
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800650LOCAL_MODULE := online-sdk-dev
Bart Searsa8cc0582015-05-07 03:23:20 +0000651
652LOCAL_DROIDDOC_OPTIONS:= \
653 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
654 -toroot / \
655 -hdf android.whichdoc online \
656 $(sample_groups) \
657 -hdf android.hasSamples true \
658 -samplesdir $(samples_dir)
659
Scott Main15b85172017-02-21 14:30:58 -0800660LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000661
662include $(BUILD_DROIDDOC)
663
Bart Searsa8cc0582015-05-07 03:23:20 +0000664# ==== docs that have all of the stuff that's @hidden =======================
665include $(CLEAR_VARS)
666
667LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Cross0c760952017-12-04 13:45:19 -0800668LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Cross5f4dcf62017-11-16 00:15:28 -0800669LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000670LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
671LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
672LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
673LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
674LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
675LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
676
677LOCAL_MODULE := hidden
678LOCAL_DROIDDOC_OPTIONS:=\
679 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700680 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000681 -title "Android SDK - Including hidden APIs."
682# -hidden
683
Scott Main15b85172017-02-21 14:30:58 -0800684LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000685
686include $(BUILD_DROIDDOC)
687
Joe Onorato1754d742016-11-21 17:51:35 -0800688# ==== java proto host library ==============================
689include $(CLEAR_VARS)
690LOCAL_MODULE := platformprotos
691LOCAL_PROTOC_OPTIMIZE_TYPE := full
692LOCAL_PROTOC_FLAGS := \
693 -Iexternal/protobuf/src
694LOCAL_SOURCE_FILES_ALL_GENERATED := true
695LOCAL_SRC_FILES := \
696 $(call all-proto-files-under, core/proto) \
697 $(call all-proto-files-under, libs/incident/proto)
Andreas Gampe7b9b5d72018-02-15 15:12:38 -0800698# b/72714520
699LOCAL_ERROR_PRONE_FLAGS := -Xep:MissingOverride:OFF
Joe Onorato1754d742016-11-21 17:51:35 -0800700include $(BUILD_HOST_JAVA_LIBRARY)
701
Bart Searsa8cc0582015-05-07 03:23:20 +0000702
David Brazdil0649c8d2018-01-22 22:23:13 +0000703# ==== hiddenapi lists =======================================
704
David Brazdilf16ac002018-01-26 11:13:35 +0000705# Copy blacklist and dark greylist over into the build folder.
706# This is for ART buildbots which need to mock these lists and have alternative
707# rules for building them. Other rules in the build system should depend on the
708# files in the build folder.
709
710$(eval $(call copy-one-file,frameworks/base/config/hiddenapi-blacklist.txt,\
711 $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST)))
712$(eval $(call copy-one-file,frameworks/base/config/hiddenapi-dark-greylist.txt,\
713 $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST)))
714
David Brazdil0649c8d2018-01-22 22:23:13 +0000715# Generate light greylist as private API minus (blacklist plus dark greylist).
716
717$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): PRIVATE_API := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
718$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): BLACKLIST := $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST)
719$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): DARK_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST)
720$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
721 $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST) \
722 $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST)
723 if [ ! -z "`comm -12 <(sort $(BLACKLIST)) <(sort $(DARK_GREYLIST))`" ]; then \
724 echo "There should be no overlap between $(BLACKLIST) and $(DARK_GREYLIST)" 1>&2; \
725 exit 1; \
726 elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(BLACKLIST))`" ]; then \
727 echo "$(BLACKLIST) must be a subset of $(PRIVATE_API)" 1>&2; \
728 exit 2; \
729 elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(DARK_GREYLIST))`" ]; then \
730 echo "$(DARK_GREYLIST) must be a subset of $(PRIVATE_API)" 1>&2; \
731 exit 3; \
732 fi
733 comm -23 <(sort $(PRIVATE_API)) <(sort $(BLACKLIST) $(DARK_GREYLIST)) > $@
734
Bart Searsa8cc0582015-05-07 03:23:20 +0000735# Include subdirectory makefiles
736# ============================================================
737
738# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
739# team really wants is to build the stuff defined by this makefile.
740ifeq (,$(ONE_SHOT_MAKEFILE))
741include $(call first-makefiles-under,$(LOCAL_PATH))
742endif
743
Holly Jiuyu Sunbbc85802017-12-21 18:44:59 -0800744endif # ANDROID_BUILD_EMBEDDED
745