2 # Copyright (C) 2008 The Android Open Source Project
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
16 LOCAL_PATH := $(call my-dir)
18 # Load framework-specific path mappings used later in the build.
19 include $(LOCAL_PATH)/pathmap.mk
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 # ============================================================
27 # embedded builds use nothing in frameworks/base
28 ifneq ($(ANDROID_BUILD_EMBEDDED),true)
30 # Copy AIDL files to be preprocessed and included in the SDK,
31 # specified relative to the root of the build tree.
32 # ============================================================
36 define stubs-to-aidl-parcelables
37 gen := $(TARGET_OUT_COMMON_INTERMEDIATES)/$1.aidl
38 aidl_parcelables += $$(gen)
39 $$(gen): $(call java-lib-header-files,$1) $(HOST_OUT_EXECUTABLES)/sdkparcelables
40 @echo Extract SDK parcelables: $$@
42 $(HOST_OUT_EXECUTABLES)/sdkparcelables $$< $$@
45 $(foreach stubs,android_stubs_current android_test_stubs_current android_system_stubs_current,\
46 $(eval $(call stubs-to-aidl-parcelables,$(stubs))))
48 gen := $(TARGET_OUT_COMMON_INTERMEDIATES)/framework.aidl
50 $(gen): $(aidl_parcelables)
51 @echo Combining SDK parcelables: $@
53 cat $^ | sort -u > $@.tmp
54 $(call commit-change-for-toc,$@)
57 # ============================================================
59 # TODO: deal with com/google/android/googleapps
60 packages_to_document := \
62 javax/microedition/khronos \
63 org/apache/http/conn \
64 org/apache/http/params \
66 # include definition of libcore_to_document
67 include libcore/Docs.mk
70 ../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 \
75 # Find all files in specific directories (relative to frameworks/base)
76 # to document and check apis
77 files_to_check_apis := \
78 $(call find-other-java-files, \
82 # Find all files in specific packages that were used to compile
83 # framework.jar to document and check apis
84 files_to_check_apis += \
87 $(foreach dir,$(FRAMEWORKS_BASE_JAVA_SRC_DIRS),\
88 $(foreach package,$(packages_to_document),\
89 $(dir)/$(package)/%.java)),\
90 $(SOONG_FRAMEWORK_SRCS)))
92 # Find all generated files that were used to compile framework.jar
93 files_to_check_apis_generated := \
94 $(filter $(OUT_DIR)/%,\
95 $(SOONG_FRAMEWORK_SRCS))
97 # These are relative to frameworks/base
98 # FRAMEWORKS_BASE_SUBDIRS comes from build/core/pathmap.mk
99 files_to_document := \
100 $(files_to_check_apis) \
101 $(call find-other-java-files,\
106 # These are relative to frameworks/base
108 $(FRAMEWORKS_BASE_SUBDIRS) \
111 # Common sources for doc check and api check
112 common_src_files := \
113 $(call find-other-html-files, $(html_dirs)) \
114 $(addprefix ../../, $(libcore_to_document)) \
116 # These are relative to frameworks/base
117 framework_docs_LOCAL_SRC_FILES := \
118 $(files_to_document) \
119 $(common_src_files) \
121 # These are relative to frameworks/base
122 framework_docs_LOCAL_API_CHECK_SRC_FILES := \
123 $(files_to_check_apis) \
124 $(common_src_files) \
126 # This is used by ide.mk as the list of source files that are
128 INTERNAL_SDK_SOURCE_DIRS := $(addprefix $(LOCAL_PATH)/,$(dirs_to_document))
130 framework_docs_LOCAL_DROIDDOC_SOURCE_PATH := \
131 $(FRAMEWORKS_BASE_JAVA_SRC_DIRS)
133 framework_docs_LOCAL_SRCJARS := $(SOONG_FRAMEWORK_SRCJARS)
135 framework_docs_LOCAL_GENERATED_SOURCES := \
136 $(libcore_to_document_generated) \
137 $(files_to_check_apis_generated) \
139 framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES := \
149 # 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.
151 framework_docs_LOCAL_JAVA_LIBRARIES := \
152 $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES) \
153 $(FRAMEWORKS_SUPPORT_JAVA_LIBRARIES)
155 framework_docs_LOCAL_MODULE_CLASS := JAVA_LIBRARIES
156 framework_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.
160 # Conscrypt (com.android.org.conscrypt) is an implementation detail and should
161 # not be referenced in the documentation.
162 framework_docs_LOCAL_DROIDDOC_OPTIONS := \
164 -knowntags ./frameworks/base/docs/knowntags.txt \
165 -knowntags ./libcore/known_oj_tags.txt \
166 -manifest ./frameworks/base/core/res/AndroidManifest.xml \
167 -hidePackage com.android.internal \
168 -hidePackage com.android.internal.util \
169 -hidePackage com.android.okhttp \
170 -hidePackage com.android.org.conscrypt \
171 -hidePackage com.android.server
173 # Convert an sdk level to a "since" argument.
174 since-arg = -since $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/$(1)/public/api/android.*) $(1)
176 finalized_sdks := $(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/public/api/android.xml,%,\
177 $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/public/api/android.xml))
178 finalized_sdks += $(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/public/api/android.txt,%,\
179 $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/public/api/android.txt))
180 finalized_sdks := $(call numerically_sort,$(finalized_sdks))
182 framework_docs_LOCAL_DROIDDOC_OPTIONS += $(foreach sdk,$(finalized_sdks),$(call since-arg,$(sdk)))
183 ifneq ($(PLATFORM_VERSION_CODENAME),REL)
184 framework_docs_LOCAL_DROIDDOC_OPTIONS += \
185 -since ./frameworks/base/api/current.txt $(PLATFORM_VERSION_CODENAME)
187 framework_docs_LOCAL_DROIDDOC_OPTIONS += \
188 -werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 \
189 -overview $(LOCAL_PATH)/core/java/overview.html
191 framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR:= \
192 $(call intermediates-dir-for,JAVA_LIBRARIES,framework,,COMMON)
194 framework_docs_LOCAL_ADDITIONAL_JAVA_DIR:= \
195 $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
197 framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES := \
198 frameworks/base/docs/knowntags.txt \
199 $(libcore_to_document_generated)
201 samples_dir := development/samples/browseable
203 # Whitelist of valid groups, used for default TOC grouping. Each sample must
204 # belong to one (and only one) group. Assign samples to groups by setting
205 # a sample.group var to one of these groups in the sample's _index.jd.
206 sample_groups := -samplegroup Admin \
207 -samplegroup Background \
208 -samplegroup Connectivity \
209 -samplegroup Content \
212 -samplegroup Notification \
213 -samplegroup RenderScript \
214 -samplegroup Security \
215 -samplegroup Sensors \
216 -samplegroup System \
217 -samplegroup Testing \
220 -samplegroup Wearable
222 ## SDK version identifiers used in the published docs
223 # major[.minor] version for current SDK. (full releases only)
224 framework_docs_SDK_VERSION:=7.0
225 # release version (ie "Release x") (full releases only)
226 framework_docs_SDK_REL_ID:=1
228 framework_docs_LOCAL_DROIDDOC_OPTIONS += \
230 -hdf sdk.codename O \
231 -hdf sdk.preview.version 1 \
232 -hdf sdk.version $(framework_docs_SDK_VERSION) \
233 -hdf sdk.rel.id $(framework_docs_SDK_REL_ID) \
235 -resourcesdir $(LOCAL_PATH)/docs/html/reference/images/ \
236 -resourcesoutdir reference/android/images/
238 # Federate Support Library references against local API file.
239 framework_docs_LOCAL_DROIDDOC_OPTIONS += \
240 -federate SupportLib https://developer.android.com \
241 -federationapi SupportLib prebuilts/sdk/current/support-api.txt
243 # Federate AndroidX references against local API file.
244 framework_docs_LOCAL_DROIDDOC_OPTIONS += \
245 -federate AndroidX https://developer.android.com \
246 -federationapi AndroidX prebuilts/sdk/current/androidx-api.txt
248 # ==== Public API diff ===========================
249 include $(CLEAR_VARS)
251 LOCAL_SRC_FILES := $(framework_docs_LOCAL_API_CHECK_SRC_FILES)
252 LOCAL_GENERATED_SOURCES := $(framework_docs_LOCAL_GENERATED_SOURCES)
253 LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
254 LOCAL_JAVA_LIBRARIES := $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
255 LOCAL_MODULE_CLASS := $(framework_docs_LOCAL_MODULE_CLASS)
256 LOCAL_ADDITIONAL_JAVA_DIR := $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
257 LOCAL_ADDITIONAL_DEPENDENCIES := \
258 $(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) \
259 $(INTERNAL_PLATFORM_API_FILE)
261 LOCAL_MODULE := offline-sdk-referenceonly
263 last_released_sdk_version := $(lastword $(call numerically_sort, \
264 $(filter-out current, \
265 $(patsubst $(SRC_API_DIR)/%.txt,%, $(wildcard $(SRC_API_DIR)/*.txt)) \
269 LOCAL_APIDIFF_OLDAPI := $(LOCAL_PATH)/../../$(SRC_API_DIR)/$(last_released_sdk_version)
270 LOCAL_APIDIFF_NEWAPI := $(LOCAL_PATH)/../../$(basename $(INTERNAL_PLATFORM_API_FILE))
272 include $(BUILD_APIDIFF)
274 # Hack to get diffs included in docs output
275 out_zip := $(OUT_DOCS)/$(LOCAL_MODULE)-docs.zip
276 $(out_zip): $(full_target)
278 # ==== System API diff ===========================
279 include $(CLEAR_VARS)
281 LOCAL_SRC_FILES := $(framework_docs_LOCAL_API_CHECK_SRC_FILES)
282 LOCAL_GENERATED_SOURCES := $(framework_docs_LOCAL_GENERATED_SOURCES)
283 LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
284 LOCAL_JAVA_LIBRARIES := $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
285 LOCAL_MODULE_CLASS := $(framework_docs_LOCAL_MODULE_CLASS)
286 LOCAL_ADDITIONAL_JAVA_DIR := $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
287 LOCAL_ADDITIONAL_DEPENDENCIES := \
288 $(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) \
289 $(INTERNAL_PLATFORM_SYSTEM_API_FILE)
291 LOCAL_MODULE := offline-system-sdk-referenceonly
293 last_released_sdk_version := $(lastword $(call numerically_sort, \
294 $(filter-out current, \
295 $(patsubst $(SRC_SYSTEM_API_DIR)/%.txt,%, $(wildcard $(SRC_SYSTEM_API_DIR)/*.txt)) \
299 LOCAL_APIDIFF_OLDAPI := $(LOCAL_PATH)/../../$(SRC_SYSTEM_API_DIR)/$(last_released_sdk_version)
300 LOCAL_APIDIFF_NEWAPI := $(LOCAL_PATH)/../../$(basename $(INTERNAL_PLATFORM_SYSTEM_API_FILE))
302 include $(BUILD_APIDIFF)
304 # Hack to get diffs included in docs output
305 out_zip := $(OUT_DOCS)/$(LOCAL_MODULE)-docs.zip
306 $(out_zip): $(full_target)
308 $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE))
309 $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE))
310 $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE))
312 # ==== the complete hidden api list ===================================
313 include $(CLEAR_VARS)
315 LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
316 LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
317 LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
318 LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
319 LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
320 LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
321 LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
322 LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
323 LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
325 LOCAL_MODULE := hidden-api-list
327 LOCAL_DROIDDOC_OPTIONS:=\
328 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
331 -showAnnotation android.annotation.SystemApi \
332 -showAnnotation android.annotation.TestApi \
333 -privateDexApi $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
336 LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
338 LOCAL_UNINSTALLABLE_MODULE := true
340 include $(BUILD_DROIDDOC)
342 $(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
344 # ==== check javadoc comments but don't generate docs ========
345 include $(CLEAR_VARS)
347 LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
348 LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
349 LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
350 LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
351 LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
352 LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
353 LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
354 LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
355 LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
357 LOCAL_MODULE := doc-comment-check
359 LOCAL_DROIDDOC_OPTIONS:=\
360 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
364 LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
366 LOCAL_UNINSTALLABLE_MODULE := true
368 include $(BUILD_DROIDDOC)
370 # Run this for checkbuild
371 checkbuild: doc-comment-check-docs
372 # Check comment when you are updating the API
373 update-api: doc-comment-check-docs
375 # ==== static html in the sdk ==================================
376 include $(CLEAR_VARS)
378 LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
379 LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
380 LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
381 LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
382 LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
383 LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
384 LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
385 LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
386 LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
388 LOCAL_MODULE := offline-sdk
390 LOCAL_DROIDDOC_OPTIONS:=\
391 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
393 -title "Android SDK" \
394 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
395 -sdkvalues $(OUT_DOCS) \
396 -hdf android.whichdoc offline
398 LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
400 include $(BUILD_DROIDDOC)
402 static_doc_index_redirect := $(out_dir)/index.html
403 $(static_doc_index_redirect): \
404 $(LOCAL_PATH)/docs/docs-preview-index.html | $(ACP)
405 $(hide) mkdir -p $(dir $@)
408 $(full_target): $(static_doc_index_redirect)
411 # ==== Public API static reference docs ==================================
412 include $(CLEAR_VARS)
414 LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
415 LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
416 LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
417 LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
418 LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
419 LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
420 LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
421 LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
422 LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
424 LOCAL_MODULE := offline-sdk-referenceonly
426 LOCAL_DROIDDOC_OPTIONS:=\
427 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
429 -title "Android SDK" \
430 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
431 -sdkvalues $(OUT_DOCS) \
432 -hdf android.whichdoc offline \
435 LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
437 include $(BUILD_DROIDDOC)
439 static_doc_index_redirect := $(out_dir)/index.html
440 $(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html
441 $(copy-file-to-target)
443 static_doc_properties := $(out_dir)/source.properties
444 $(static_doc_properties): \
445 $(LOCAL_PATH)/docs/source.properties | $(ACP)
446 $(hide) mkdir -p $(dir $@)
449 $(full_target): $(static_doc_index_redirect)
450 $(full_target): $(static_doc_properties)
453 # ==== System API static reference docs ==================================
454 include $(CLEAR_VARS)
456 LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
457 LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
458 LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
459 LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
460 LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
461 LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
462 LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
463 LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
464 LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
466 LOCAL_MODULE := offline-system-sdk-referenceonly
468 LOCAL_DROIDDOC_OPTIONS:=\
469 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
470 -hide 101 -hide 104 -hide 108 \
471 -showAnnotation android.annotation.SystemApi \
473 -title "Android System SDK" \
474 -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
475 -sdkvalues $(OUT_DOCS) \
476 -hdf android.whichdoc offline \
479 LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
481 include $(BUILD_DROIDDOC)
483 static_doc_index_redirect := $(out_dir)/index.html
484 $(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html
485 $(copy-file-to-target)
487 static_doc_properties := $(out_dir)/source.properties
488 $(static_doc_properties): \
489 $(LOCAL_PATH)/docs/source.properties | $(ACP)
490 $(hide) mkdir -p $(dir $@)
493 $(full_target): $(static_doc_index_redirect)
494 $(full_target): $(static_doc_properties)
495 $(full_target): $(framework_built)
498 # ==== docs for the web (on the androiddevdocs app engine server) =======================
499 include $(CLEAR_VARS)
501 LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
502 LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
503 LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
504 LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
505 LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
506 LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
507 LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
508 LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
509 LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
510 LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
511 LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
513 LOCAL_MODULE := online-sdk
515 LOCAL_DROIDDOC_OPTIONS:= \
516 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
518 -hdf android.whichdoc online \
520 -hdf android.hasSamples true \
521 -samplesdir $(samples_dir)
523 LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
525 include $(BUILD_DROIDDOC)
527 # ==== docs for the web (on the androiddevdocs app engine server) =======================
528 include $(CLEAR_VARS)
530 LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
531 LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
532 LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
533 LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
534 LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
535 LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
536 LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
537 LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
538 LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
539 LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
540 LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
542 LOCAL_MODULE := online-system-api-sdk
544 LOCAL_DROIDDOC_OPTIONS:= \
545 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
547 -showAnnotation android.annotation.SystemApi \
548 -title "Android SDK - Including system APIs." \
553 -hdf android.whichdoc online \
555 -hdf android.hasSamples true \
556 -samplesdir $(samples_dir)
558 LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
560 LOCAL_UNINSTALLABLE_MODULE := true
562 include $(BUILD_DROIDDOC)
564 # ==== docs for the web (on the devsite app engine server) =======================
565 include $(CLEAR_VARS)
566 LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
567 LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
568 LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
569 LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
570 LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
571 LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
572 LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
573 LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
574 LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
575 LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
576 # specify a second html input dir and an output path relative to OUT_DIR)
577 LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
581 LOCAL_DROIDDOC_OPTIONS:= \
582 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
584 -hdf android.whichdoc online \
588 -hdf android.hasSamples true \
589 -samplesdir $(samples_dir)
591 LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
593 include $(BUILD_DROIDDOC)
595 # ==== docs for the web (on the devsite app engine server) =======================
596 include $(CLEAR_VARS)
597 LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
598 LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
599 LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
600 LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
601 LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
602 LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
603 LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
604 LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
605 LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
606 LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
607 # specify a second html input dir and an output path relative to OUT_DIR)
608 LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
610 LOCAL_MODULE := ds-static
612 LOCAL_DROIDDOC_OPTIONS:= \
613 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
614 -hdf android.whichdoc online \
620 LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
622 include $(BUILD_DROIDDOC)
624 # ==== generates full navtree for resolving @links in ds postprocessing ====
625 include $(CLEAR_VARS)
627 LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
628 LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
629 LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
630 LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
631 LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
632 LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
633 LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
634 LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
635 LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
637 LOCAL_MODULE := ds-ref-navtree
639 LOCAL_DROIDDOC_OPTIONS:= \
640 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
641 -hdf android.whichdoc online \
646 LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
648 include $(BUILD_DROIDDOC)
650 # ==== site updates for docs (on the androiddevdocs app engine server) =======================
651 include $(CLEAR_VARS)
653 LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
654 LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
655 LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
656 LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
657 LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
658 LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
659 LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
660 LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
661 LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
662 LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
663 LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
665 LOCAL_MODULE := online-sdk-dev
667 LOCAL_DROIDDOC_OPTIONS:= \
668 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
670 -hdf android.whichdoc online \
672 -hdf android.hasSamples true \
673 -samplesdir $(samples_dir)
675 LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
677 include $(BUILD_DROIDDOC)
679 # ==== docs that have all of the stuff that's @hidden =======================
680 include $(CLEAR_VARS)
682 LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
683 LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
684 LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
685 LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
686 LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
687 LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
688 LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
689 LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
690 LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
692 LOCAL_MODULE := hidden
693 LOCAL_DROIDDOC_OPTIONS:=\
694 $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
696 -title "Android SDK - Including hidden APIs."
699 LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
701 include $(BUILD_DROIDDOC)
703 # ==== java proto host library ==============================
704 include $(CLEAR_VARS)
705 LOCAL_MODULE := platformprotos
706 LOCAL_PROTOC_OPTIMIZE_TYPE := full
707 LOCAL_PROTOC_FLAGS := \
708 -Iexternal/protobuf/src
709 LOCAL_SOURCE_FILES_ALL_GENERATED := true
711 cmds/am/proto/instrumentation_data.proto \
712 cmds/statsd/src/perfetto/perfetto_config.proto \
713 $(call all-proto-files-under, core/proto) \
714 $(call all-proto-files-under, libs/incident/proto) \
715 $(call all-proto-files-under, cmds/statsd/src)
717 LOCAL_ERROR_PRONE_FLAGS := -Xep:MissingOverride:OFF
718 include $(BUILD_HOST_JAVA_LIBRARY)
720 # ==== java proto device library (for test only) ==============================
721 include $(CLEAR_VARS)
722 LOCAL_MODULE := platformprotosnano
723 LOCAL_MODULE_TAGS := tests
724 LOCAL_PROTOC_OPTIMIZE_TYPE := nano
725 LOCAL_PROTOC_FLAGS := \
726 -Iexternal/protobuf/src
727 LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \
728 store_unknown_fields = true
729 LOCAL_SDK_VERSION := current
731 $(call all-proto-files-under, core/proto) \
732 $(call all-proto-files-under, libs/incident/proto/android/os)
733 include $(BUILD_STATIC_JAVA_LIBRARY)
736 # ==== java proto device library (for test only) ==============================
737 include $(CLEAR_VARS)
738 LOCAL_MODULE := platformprotoslite
739 LOCAL_MODULE_TAGS := tests
740 LOCAL_PROTOC_OPTIMIZE_TYPE := lite
741 LOCAL_PROTOC_FLAGS := \
742 -Iexternal/protobuf/src
744 $(call all-proto-files-under, core/proto) \
745 $(call all-proto-files-under, libs/incident/proto/android/os)
746 # Protos have lots of MissingOverride and similar.
747 LOCAL_ERROR_PRONE_FLAGS := -XepDisableAllChecks
748 include $(BUILD_STATIC_JAVA_LIBRARY)
750 # ==== hiddenapi lists =======================================
752 # Copy light and dark greylist over into the build folder.
753 # This is for ART buildbots which need to mock these lists and have alternative
754 # rules for building them. Other rules in the build system should depend on the
755 # files in the build folder.
757 # Automatically add all methods which match the following signatures.
758 # These need to be greylisted in order to allow applications to write their
760 $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): REGEX_SERIALIZATION := \
761 "readObject\(Ljava/io/ObjectInputStream;\)V" \
762 "readObjectNoData\(\)V" \
763 "readResolve\(\)Ljava/lang/Object;" \
764 "serialVersionUID:J" \
765 "serialPersistentFields:\[Ljava/io/ObjectStreamField;" \
766 "writeObject\(Ljava/io/ObjectOutputStream;\)V" \
767 "writeReplace\(\)Ljava/lang/Object;"
768 $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): PRIVATE_API := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
769 # Temporarily merge light greylist from two files. Vendor list will become dark
770 # grey once we remove the UI toast.
771 $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): frameworks/base/config/hiddenapi-light-greylist.txt \
772 frameworks/base/config/hiddenapi-vendor-list.txt \
773 $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
774 sort frameworks/base/config/hiddenapi-light-greylist.txt \
775 frameworks/base/config/hiddenapi-vendor-list.txt \
776 <(grep -E "\->("$(subst $(space),"|",$(REGEX_SERIALIZATION))")$$" $(PRIVATE_API)) \
779 $(eval $(call copy-one-file,frameworks/base/config/hiddenapi-dark-greylist.txt,\
780 $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST)))
782 # Generate dark greylist as private API minus (blacklist plus light greylist).
784 $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST): PRIVATE_API := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
785 $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST): LIGHT_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST)
786 $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST): DARK_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST)
787 $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST): $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
788 $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST) \
789 $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST)
790 if [ ! -z "`comm -12 <(sort $(LIGHT_GREYLIST)) <(sort $(DARK_GREYLIST))`" ]; then \
791 echo "There should be no overlap between $(LIGHT_GREYLIST) and $(DARK_GREYLIST)" 1>&2; \
792 comm -12 <(sort $(LIGHT_GREYLIST)) <(sort $(DARK_GREYLIST)) 1>&2; \
794 elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(LIGHT_GREYLIST))`" ]; then \
795 echo "$(LIGHT_GREYLIST) must be a subset of $(PRIVATE_API)" 1>&2; \
796 comm -13 <(sort $(PRIVATE_API)) <(sort $(LIGHT_GREYLIST)) 1>&2; \
798 elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(DARK_GREYLIST))`" ]; then \
799 echo "$(DARK_GREYLIST) must be a subset of $(PRIVATE_API)" 1>&2; \
800 comm -13 <(sort $(PRIVATE_API)) <(sort $(DARK_GREYLIST)) 1>&2; \
803 comm -23 <(sort $(PRIVATE_API)) <(sort $(LIGHT_GREYLIST) $(DARK_GREYLIST)) > $@
805 # Include subdirectory makefiles
806 # ============================================================
808 # If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
809 # team really wants is to build the stuff defined by this makefile.
810 ifeq (,$(ONE_SHOT_MAKEFILE))
811 include $(call first-makefiles-under,$(LOCAL_PATH))
814 endif # ANDROID_BUILD_EMBEDDED