blob: b5b4627eef43de27cabd581c76422b5462329a24 [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
Bart Searsa8cc0582015-05-07 03:23:20 +0000264$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE))
Bart Searsa8cc0582015-05-07 03:23:20 +0000265$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE))
Michael Wrightb2b2c0e2015-11-06 15:21:13 +0000266$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE))
267
Bart Searsa8cc0582015-05-07 03:23:20 +0000268# ==== check javadoc comments but don't generate docs ========
269include $(CLEAR_VARS)
270
271LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Cross0c760952017-12-04 13:45:19 -0800272LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Cross5f4dcf62017-11-16 00:15:28 -0800273LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000274LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
275LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
276LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
277LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
278LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
279LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
280
281LOCAL_MODULE := doc-comment-check
282
283LOCAL_DROIDDOC_OPTIONS:=\
284 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700285 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000286 -parsecomments
287
Scott Main15b85172017-02-21 14:30:58 -0800288LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000289
290LOCAL_UNINSTALLABLE_MODULE := true
291
292include $(BUILD_DROIDDOC)
293
Bart Searsa8cc0582015-05-07 03:23:20 +0000294# Run this for checkbuild
295checkbuild: doc-comment-check-docs
296# Check comment when you are updating the API
297update-api: doc-comment-check-docs
298
299# ==== static html in the sdk ==================================
300include $(CLEAR_VARS)
301
302LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Cross0c760952017-12-04 13:45:19 -0800303LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Cross5f4dcf62017-11-16 00:15:28 -0800304LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000305LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
306LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
307LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
308LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
309LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
310LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
311
312LOCAL_MODULE := offline-sdk
313
314LOCAL_DROIDDOC_OPTIONS:=\
315 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
316 -offlinemode \
317 -title "Android SDK" \
318 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
smain@google.com00de8c52016-03-07 18:38:08 -0800319 -sdkvalues $(OUT_DOCS) \
smain@google.com8562ab52016-06-14 17:11:57 -0700320 -hdf android.whichdoc offline
321
Scott Main15b85172017-02-21 14:30:58 -0800322LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
smain@google.com8562ab52016-06-14 17:11:57 -0700323
324include $(BUILD_DROIDDOC)
325
326static_doc_index_redirect := $(out_dir)/index.html
327$(static_doc_index_redirect): \
328 $(LOCAL_PATH)/docs/docs-preview-index.html | $(ACP)
329 $(hide) mkdir -p $(dir $@)
330 $(hide) $(ACP) $< $@
331
332$(full_target): $(static_doc_index_redirect)
smain@google.com8562ab52016-06-14 17:11:57 -0700333
334
335# ==== static html in the sdk ==================================
336include $(CLEAR_VARS)
337
338LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Cross0c760952017-12-04 13:45:19 -0800339LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Cross5f4dcf62017-11-16 00:15:28 -0800340LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
smain@google.com8562ab52016-06-14 17:11:57 -0700341LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
342LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
343LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
344LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
345LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
346LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
347
348LOCAL_MODULE := offline-sdk-referenceonly
349
350LOCAL_DROIDDOC_OPTIONS:=\
351 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
352 -offlinemode \
353 -title "Android SDK" \
354 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
355 -sdkvalues $(OUT_DOCS) \
smain@google.com00de8c52016-03-07 18:38:08 -0800356 -hdf android.whichdoc offline \
Scott Mainf8cdfc82017-03-21 13:43:31 -0700357 -referenceonly
smain@google.com00de8c52016-03-07 18:38:08 -0800358
Scott Main15b85172017-02-21 14:30:58 -0800359LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
smain@google.com00de8c52016-03-07 18:38:08 -0800360
361include $(BUILD_DROIDDOC)
362
363static_doc_index_redirect := $(out_dir)/index.html
smain@google.com151833a2016-08-31 08:42:09 -0700364$(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html
Dan Willemsen98ff0b72016-03-23 00:42:44 -0700365 $(copy-file-to-target)
smain@google.com00de8c52016-03-07 18:38:08 -0800366
smain@google.com2f2365d2016-09-21 14:05:50 -0700367static_doc_properties := $(out_dir)/source.properties
368$(static_doc_properties): \
369 $(LOCAL_PATH)/docs/source.properties | $(ACP)
370 $(hide) mkdir -p $(dir $@)
371 $(hide) $(ACP) $< $@
372
smain@google.com00de8c52016-03-07 18:38:08 -0800373$(full_target): $(static_doc_index_redirect)
smain@google.com2f2365d2016-09-21 14:05:50 -0700374$(full_target): $(static_doc_properties)
smain@google.com00de8c52016-03-07 18:38:08 -0800375
smain@google.com7aca8be2016-03-10 14:13:30 -0800376
Bart Searsa8cc0582015-05-07 03:23:20 +0000377# ==== docs for the web (on the androiddevdocs app engine server) =======================
378include $(CLEAR_VARS)
379
380LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Cross0c760952017-12-04 13:45:19 -0800381LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Cross5f4dcf62017-11-16 00:15:28 -0800382LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000383LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
384LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
385LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
386LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
387LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
388LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
389LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
390LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
391
392LOCAL_MODULE := online-sdk
393
394LOCAL_DROIDDOC_OPTIONS:= \
395 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
396 -toroot / \
397 -hdf android.whichdoc online \
398 $(sample_groups) \
399 -hdf android.hasSamples true \
400 -samplesdir $(samples_dir)
401
Scott Main15b85172017-02-21 14:30:58 -0800402LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000403
404include $(BUILD_DROIDDOC)
405
406# ==== docs for the web (on the androiddevdocs app engine server) =======================
Bart Searsa8cc0582015-05-07 03:23:20 +0000407include $(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_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
413LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
414LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
415LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
416LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
417LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
418LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
419LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
420
421LOCAL_MODULE := online-system-api-sdk
422
423LOCAL_DROIDDOC_OPTIONS:= \
424 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700425 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000426 -showAnnotation android.annotation.SystemApi \
427 -title "Android SDK - Including system APIs." \
428 -toroot / \
Gina Dimino98ad8882016-05-31 17:25:48 -0700429 -hide 101 \
430 -hide 104 \
431 -hide 108 \
Bart Searsa8cc0582015-05-07 03:23:20 +0000432 -hdf android.whichdoc online \
433 $(sample_groups) \
434 -hdf android.hasSamples true \
435 -samplesdir $(samples_dir)
436
Scott Main15b85172017-02-21 14:30:58 -0800437LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Jeff Sharkey05461c02017-05-09 19:01:09 -0600438
Bart Searsa8cc0582015-05-07 03:23:20 +0000439LOCAL_UNINSTALLABLE_MODULE := true
440
441include $(BUILD_DROIDDOC)
Bart Searsa8cc0582015-05-07 03:23:20 +0000442
443# ==== docs for the web (on the devsite app engine server) =======================
444include $(CLEAR_VARS)
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)
Bart Searsa8cc0582015-05-07 03:23:20 +0000448LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
449LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
450LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
451LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
452LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
453LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
454LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
455# specify a second html input dir and an output path relative to OUT_DIR)
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700456LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
Bart Searsa8cc0582015-05-07 03:23:20 +0000457
458LOCAL_MODULE := ds
459
460LOCAL_DROIDDOC_OPTIONS:= \
461 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
Bart Searsa8cc0582015-05-07 03:23:20 +0000462 -toroot / \
463 -hdf android.whichdoc online \
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700464 -devsite \
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700465 $(sample_groups) \
Dirk Dougherty3852c1f2016-04-10 02:05:09 -0700466 -hdf android.hasSamples true \
467 -samplesdir $(samples_dir)
Bart Searsa8cc0582015-05-07 03:23:20 +0000468
Scott Main15b85172017-02-21 14:30:58 -0800469LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000470
471include $(BUILD_DROIDDOC)
472
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700473# ==== docs for the web (on the devsite app engine server) =======================
474include $(CLEAR_VARS)
475LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Cross0c760952017-12-04 13:45:19 -0800476LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Cross5f4dcf62017-11-16 00:15:28 -0800477LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700478LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
479LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
480LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
481LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
482LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
483LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
484LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
485# specify a second html input dir and an output path relative to OUT_DIR)
486LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
487
488LOCAL_MODULE := ds-static
489
490LOCAL_DROIDDOC_OPTIONS:= \
491 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
492 -hdf android.whichdoc online \
493 -staticonly \
494 -toroot / \
495 -devsite \
496 -ignoreJdLinks
497
Scott Main15b85172017-02-21 14:30:58 -0800498LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Dirk Doughertyb042ab12016-06-14 16:26:28 -0700499
500include $(BUILD_DROIDDOC)
501
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700502# ==== generates full navtree for resolving @links in ds postprocessing ====
503include $(CLEAR_VARS)
504
505LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Cross0c760952017-12-04 13:45:19 -0800506LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Cross5f4dcf62017-11-16 00:15:28 -0800507LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700508LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
509LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
510LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
511LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
512LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
513LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
514
515LOCAL_MODULE := ds-ref-navtree
516
517LOCAL_DROIDDOC_OPTIONS:= \
518 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
519 -hdf android.whichdoc online \
520 -toroot / \
521 -atLinksNavtree \
522 -navtreeonly
523
Scott Main15b85172017-02-21 14:30:58 -0800524LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Dirk Dougherty7d47b552016-09-13 16:44:25 -0700525
526include $(BUILD_DROIDDOC)
527
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800528# ==== site updates for docs (on the androiddevdocs app engine server) =======================
Bart Searsa8cc0582015-05-07 03:23:20 +0000529include $(CLEAR_VARS)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800530
Bart Searsa8cc0582015-05-07 03:23:20 +0000531LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Cross0c760952017-12-04 13:45:19 -0800532LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Cross5f4dcf62017-11-16 00:15:28 -0800533LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000534LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
535LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
536LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
537LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800538LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
Bart Searsa8cc0582015-05-07 03:23:20 +0000539LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
540LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800541LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
Bart Searsa8cc0582015-05-07 03:23:20 +0000542
Dirk Dougherty31ae1c512015-11-07 13:18:02 -0800543LOCAL_MODULE := online-sdk-dev
Bart Searsa8cc0582015-05-07 03:23:20 +0000544
545LOCAL_DROIDDOC_OPTIONS:= \
546 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
547 -toroot / \
548 -hdf android.whichdoc online \
549 $(sample_groups) \
550 -hdf android.hasSamples true \
551 -samplesdir $(samples_dir)
552
Scott Main15b85172017-02-21 14:30:58 -0800553LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000554
555include $(BUILD_DROIDDOC)
556
Bart Searsa8cc0582015-05-07 03:23:20 +0000557# ==== docs that have all of the stuff that's @hidden =======================
558include $(CLEAR_VARS)
559
560LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
Colin Cross0c760952017-12-04 13:45:19 -0800561LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
Colin Cross5f4dcf62017-11-16 00:15:28 -0800562LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
Bart Searsa8cc0582015-05-07 03:23:20 +0000563LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
564LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
565LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
566LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
567LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
568LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
569
570LOCAL_MODULE := hidden
571LOCAL_DROIDDOC_OPTIONS:=\
572 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
smain@google.com534bfe12016-09-01 19:52:17 -0700573 -referenceonly \
Bart Searsa8cc0582015-05-07 03:23:20 +0000574 -title "Android SDK - Including hidden APIs."
575# -hidden
576
Scott Main15b85172017-02-21 14:30:58 -0800577LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
Bart Searsa8cc0582015-05-07 03:23:20 +0000578
579include $(BUILD_DROIDDOC)
580
Joe Onorato1754d742016-11-21 17:51:35 -0800581# ==== java proto host library ==============================
582include $(CLEAR_VARS)
583LOCAL_MODULE := platformprotos
584LOCAL_PROTOC_OPTIMIZE_TYPE := full
585LOCAL_PROTOC_FLAGS := \
586 -Iexternal/protobuf/src
587LOCAL_SOURCE_FILES_ALL_GENERATED := true
588LOCAL_SRC_FILES := \
589 $(call all-proto-files-under, core/proto) \
590 $(call all-proto-files-under, libs/incident/proto)
Andreas Gampe7b9b5d72018-02-15 15:12:38 -0800591# b/72714520
592LOCAL_ERROR_PRONE_FLAGS := -Xep:MissingOverride:OFF
Joe Onorato1754d742016-11-21 17:51:35 -0800593include $(BUILD_HOST_JAVA_LIBRARY)
594
Bart Searsa8cc0582015-05-07 03:23:20 +0000595
David Brazdil0649c8d2018-01-22 22:23:13 +0000596# ==== hiddenapi lists =======================================
597
David Brazdilf16ac002018-01-26 11:13:35 +0000598# Copy blacklist and dark greylist over into the build folder.
599# This is for ART buildbots which need to mock these lists and have alternative
600# rules for building them. Other rules in the build system should depend on the
601# files in the build folder.
602
603$(eval $(call copy-one-file,frameworks/base/config/hiddenapi-blacklist.txt,\
604 $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST)))
605$(eval $(call copy-one-file,frameworks/base/config/hiddenapi-dark-greylist.txt,\
606 $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST)))
607
David Brazdil0649c8d2018-01-22 22:23:13 +0000608# Generate light greylist as private API minus (blacklist plus dark greylist).
609
610$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): PRIVATE_API := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
611$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): BLACKLIST := $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST)
612$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): DARK_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST)
613$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
614 $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST) \
615 $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST)
616 if [ ! -z "`comm -12 <(sort $(BLACKLIST)) <(sort $(DARK_GREYLIST))`" ]; then \
617 echo "There should be no overlap between $(BLACKLIST) and $(DARK_GREYLIST)" 1>&2; \
618 exit 1; \
619 elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(BLACKLIST))`" ]; then \
620 echo "$(BLACKLIST) must be a subset of $(PRIVATE_API)" 1>&2; \
621 exit 2; \
622 elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(DARK_GREYLIST))`" ]; then \
623 echo "$(DARK_GREYLIST) must be a subset of $(PRIVATE_API)" 1>&2; \
624 exit 3; \
625 fi
626 comm -23 <(sort $(PRIVATE_API)) <(sort $(BLACKLIST) $(DARK_GREYLIST)) > $@
627
Bart Searsa8cc0582015-05-07 03:23:20 +0000628# Include subdirectory makefiles
629# ============================================================
630
631# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
632# team really wants is to build the stuff defined by this makefile.
633ifeq (,$(ONE_SHOT_MAKEFILE))
634include $(call first-makefiles-under,$(LOCAL_PATH))
635endif
636
Holly Jiuyu Sunbbc85802017-12-21 18:44:59 -0800637endif # ANDROID_BUILD_EMBEDDED
638