Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 1 | # |
| 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 | # |
| 16 | LOCAL_PATH := $(call my-dir) |
| 17 | |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 18 | # Load framework-specific path mappings used later in the build. |
| 19 | include $(LOCAL_PATH)/pathmap.mk |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 20 | |
| 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 |
| 28 | ifneq ($(ANDROID_BUILD_EMBEDDED),true) |
| 29 | |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 30 | # Copy AIDL files to be preprocessed and included in the SDK, |
| 31 | # specified relative to the root of the build tree. |
| 32 | # ============================================================ |
| 33 | include $(CLEAR_VARS) |
| 34 | |
Colin Cross | 77ebd08 | 2017-12-15 17:30:33 -0800 | [diff] [blame] | 35 | aidl_parcelables := |
| 36 | define stubs-to-aidl-parcelables |
| 37 | gen := $(TARGET_OUT_COMMON_INTERMEDIATES)/$1.aidl |
| 38 | aidl_parcelables += $$(gen) |
Colin Cross | fdbe7d1 | 2018-02-09 11:24:14 -0800 | [diff] [blame] | 39 | $$(gen): $(call java-lib-header-files,$1) $(HOST_OUT_EXECUTABLES)/sdkparcelables |
Colin Cross | 77ebd08 | 2017-12-15 17:30:33 -0800 | [diff] [blame] | 40 | @echo Extract SDK parcelables: $$@ |
| 41 | rm -f $$@ |
| 42 | $(HOST_OUT_EXECUTABLES)/sdkparcelables $$< $$@ |
| 43 | endef |
| 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 Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 48 | gen := $(TARGET_OUT_COMMON_INTERMEDIATES)/framework.aidl |
Colin Cross | 77ebd08 | 2017-12-15 17:30:33 -0800 | [diff] [blame] | 49 | .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 Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 55 | |
| 56 | # the documentation |
| 57 | # ============================================================ |
| 58 | |
| 59 | # TODO: deal with com/google/android/googleapps |
| 60 | packages_to_document := \ |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 61 | android \ |
| 62 | javax/microedition/khronos \ |
| 63 | org/apache/http/conn \ |
| 64 | org/apache/http/params \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 65 | |
| 66 | # include definition of libcore_to_document |
| 67 | include libcore/Docs.mk |
| 68 | |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 69 | non_base_dirs := \ |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 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 \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 74 | |
Paul Duffin | c08090f | 2017-06-29 14:58:43 +0100 | [diff] [blame] | 75 | framework_base_android_test_mock_src_files := \ |
Paul Duffin | 69516f4 | 2017-11-15 11:39:14 +0000 | [diff] [blame] | 76 | $(call all-java-files-under, test-mock/src/android/test/mock) |
Paul Duffin | c08090f | 2017-06-29 14:58:43 +0100 | [diff] [blame] | 77 | |
| 78 | framework_base_android_test_runner_excluding_mock_src_files := \ |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 79 | $(filter-out $(framework_base_android_test_mock_src_files), $(call all-java-files-under, test-runner/src)) |
Paul Duffin | c08090f | 2017-06-29 14:58:43 +0100 | [diff] [blame] | 80 | |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 81 | # Find all files in specific directories (relative to frameworks/base) |
| 82 | # to document and check apis |
| 83 | files_to_check_apis := \ |
| 84 | $(call find-other-java-files, \ |
Paul Duffin | 2141827 | 2017-11-16 15:47:05 +0000 | [diff] [blame] | 85 | test-base/src \ |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 86 | $(non_base_dirs) \ |
| 87 | ) |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 88 | |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 89 | # Find all files in specific packages that were used to compile |
| 90 | # framework.jar to document and check apis |
| 91 | files_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 Cross | 0c76095 | 2017-12-04 13:45:19 -0800 | [diff] [blame] | 100 | files_to_check_apis_generated := \ |
| 101 | $(filter $(OUT_DIR)/%,\ |
| 102 | $(SOONG_FRAMEWORK_SRCS)) |
George Mount | f6be993 | 2015-12-03 07:39:55 -0800 | [diff] [blame] | 103 | |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 104 | # These are relative to frameworks/base |
| 105 | # FRAMEWORKS_BASE_SUBDIRS comes from build/core/pathmap.mk |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 106 | files_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 Mount | f6be993 | 2015-12-03 07:39:55 -0800 | [diff] [blame] | 111 | |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 112 | # These are relative to frameworks/base |
| 113 | html_dirs := \ |
| 114 | $(FRAMEWORKS_BASE_SUBDIRS) \ |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 115 | $(non_base_dirs) \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 116 | |
| 117 | # Common sources for doc check and api check |
| 118 | common_src_files := \ |
| 119 | $(call find-other-html-files, $(html_dirs)) \ |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 120 | $(addprefix ../../, $(libcore_to_document)) \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 121 | |
| 122 | # These are relative to frameworks/base |
| 123 | framework_docs_LOCAL_SRC_FILES := \ |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 124 | $(files_to_document) \ |
| 125 | $(common_src_files) \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 126 | |
| 127 | # These are relative to frameworks/base |
| 128 | framework_docs_LOCAL_API_CHECK_SRC_FILES := \ |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 129 | $(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 Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 133 | |
| 134 | # This is used by ide.mk as the list of source files that are |
| 135 | # always included. |
| 136 | INTERNAL_SDK_SOURCE_DIRS := $(addprefix $(LOCAL_PATH)/,$(dirs_to_document)) |
| 137 | |
| 138 | framework_docs_LOCAL_DROIDDOC_SOURCE_PATH := \ |
| 139 | $(FRAMEWORKS_BASE_JAVA_SRC_DIRS) |
| 140 | |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 141 | framework_docs_LOCAL_SRCJARS := $(SOONG_FRAMEWORK_SRCJARS) |
| 142 | |
Colin Cross | 0c76095 | 2017-12-04 13:45:19 -0800 | [diff] [blame] | 143 | framework_docs_LOCAL_GENERATED_SOURCES := \ |
| 144 | $(libcore_to_document_generated) \ |
| 145 | $(files_to_check_apis_generated) \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 146 | |
| 147 | framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES := \ |
Piotr Jastrzebski | cfa292e | 2015-02-17 16:58:52 +0000 | [diff] [blame] | 148 | core-oj \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 149 | core-libart \ |
| 150 | conscrypt \ |
| 151 | bouncycastle \ |
| 152 | okhttp \ |
| 153 | ext \ |
| 154 | framework \ |
Paul Duffin | c08090f | 2017-06-29 14:58:43 +0100 | [diff] [blame] | 155 | voip-common \ |
| 156 | android.test.mock \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 157 | |
Alan Viverette | 2d362a5 | 2017-04-05 10:21:58 -0400 | [diff] [blame] | 158 | # 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 Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 160 | framework_docs_LOCAL_JAVA_LIBRARIES := \ |
| 161 | $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES) \ |
| 162 | $(FRAMEWORKS_SUPPORT_JAVA_LIBRARIES) |
| 163 | |
| 164 | framework_docs_LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
| 165 | framework_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. |
| 171 | framework_docs_LOCAL_DROIDDOC_OPTIONS := \ |
Jeff Sharkey | 0f3f60b | 2017-04-24 18:06:20 -0600 | [diff] [blame] | 172 | -android \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 173 | -knowntags ./frameworks/base/docs/knowntags.txt \ |
Narayan Kamath | 2c4f284 | 2015-07-27 14:02:11 +0100 | [diff] [blame] | 174 | -knowntags ./libcore/known_oj_tags.txt \ |
Jeff Sharkey | bfc4fcd | 2017-06-05 17:38:17 -0600 | [diff] [blame] | 175 | -manifest ./frameworks/base/core/res/AndroidManifest.xml \ |
Tobias Thierer | 97bb6cf | 2018-03-05 22:55:32 +0000 | [diff] [blame] | 176 | -hidePackage com.android.internal \ |
| 177 | -hidePackage com.android.internal.util \ |
Jeff Sharkey | bc4f48b | 2017-12-06 21:02:11 -0700 | [diff] [blame] | 178 | -hidePackage com.android.okhttp \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 179 | -hidePackage com.android.org.conscrypt \ |
Anton Hansson | e5bf206 | 2018-04-19 16:23:53 +0100 | [diff] [blame] | 180 | -hidePackage com.android.server |
| 181 | |
| 182 | # Convert an sdk level to a "since" argument. |
| 183 | since-arg = -since $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/$(1)/public/api/android.*) $(1) |
| 184 | |
| 185 | finalized_sdks := $(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/public/api/android.xml,%,\ |
| 186 | $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/public/api/android.xml)) |
| 187 | finalized_sdks += $(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/public/api/android.txt,%,\ |
| 188 | $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/public/api/android.txt)) |
| 189 | finalized_sdks := $(call numerically_sort,$(finalized_sdks)) |
| 190 | |
| 191 | framework_docs_LOCAL_DROIDDOC_OPTIONS += $(foreach sdk,$(finalized_sdks),$(call since-arg,$(sdk))) |
| 192 | ifneq ($(PLATFORM_VERSION_CODENAME),REL) |
| 193 | framework_docs_LOCAL_DROIDDOC_OPTIONS += \ |
| 194 | -since ./frameworks/base/api/current.txt $(PLATFORM_VERSION_CODENAME) |
| 195 | endif |
| 196 | framework_docs_LOCAL_DROIDDOC_OPTIONS += \ |
Jeff Sharkey | 2337aec | 2017-12-06 21:12:23 -0700 | [diff] [blame] | 197 | -werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 \ |
Anton Hansson | e5bf206 | 2018-04-19 16:23:53 +0100 | [diff] [blame] | 198 | -overview $(LOCAL_PATH)/core/java/overview.html |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 199 | |
| 200 | framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR:= \ |
| 201 | $(call intermediates-dir-for,JAVA_LIBRARIES,framework,,COMMON) |
| 202 | |
| 203 | framework_docs_LOCAL_ADDITIONAL_JAVA_DIR:= \ |
Alan Viverette | 2d362a5 | 2017-04-05 10:21:58 -0400 | [diff] [blame] | 204 | $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR) |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 205 | |
| 206 | framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES := \ |
Narayan Kamath | c21739a | 2015-07-14 13:39:23 +0100 | [diff] [blame] | 207 | frameworks/base/docs/knowntags.txt \ |
Colin Cross | 72d359f | 2017-10-27 10:46:53 -0700 | [diff] [blame] | 208 | $(libcore_to_document_generated) |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 209 | |
| 210 | samples_dir := development/samples/browseable |
| 211 | |
| 212 | # Whitelist of valid groups, used for default TOC grouping. Each sample must |
| 213 | # belong to one (and only one) group. Assign samples to groups by setting |
| 214 | # a sample.group var to one of these groups in the sample's _index.jd. |
| 215 | sample_groups := -samplegroup Admin \ |
| 216 | -samplegroup Background \ |
| 217 | -samplegroup Connectivity \ |
| 218 | -samplegroup Content \ |
| 219 | -samplegroup Input \ |
| 220 | -samplegroup Media \ |
| 221 | -samplegroup Notification \ |
| 222 | -samplegroup RenderScript \ |
| 223 | -samplegroup Security \ |
| 224 | -samplegroup Sensors \ |
Trevor Johns | 4cbe359 | 2015-05-27 14:50:51 -0700 | [diff] [blame] | 225 | -samplegroup System \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 226 | -samplegroup Testing \ |
| 227 | -samplegroup UI \ |
| 228 | -samplegroup Views \ |
| 229 | -samplegroup Wearable |
| 230 | |
| 231 | ## SDK version identifiers used in the published docs |
| 232 | # major[.minor] version for current SDK. (full releases only) |
smain@google.com | dde8deb | 2016-08-29 18:36:50 -0700 | [diff] [blame] | 233 | framework_docs_SDK_VERSION:=7.0 |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 234 | # release version (ie "Release x") (full releases only) |
| 235 | framework_docs_SDK_REL_ID:=1 |
| 236 | |
| 237 | framework_docs_LOCAL_DROIDDOC_OPTIONS += \ |
Billy Lamberta | 75dbc8f | 2017-03-03 13:09:15 -0800 | [diff] [blame] | 238 | -hdf dac true \ |
Scott Main | f8cdfc8 | 2017-03-21 13:43:31 -0700 | [diff] [blame] | 239 | -hdf sdk.codename O \ |
| 240 | -hdf sdk.preview.version 1 \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 241 | -hdf sdk.version $(framework_docs_SDK_VERSION) \ |
| 242 | -hdf sdk.rel.id $(framework_docs_SDK_REL_ID) \ |
Scott Main | f8cdfc8 | 2017-03-21 13:43:31 -0700 | [diff] [blame] | 243 | -hdf sdk.preview 0 \ |
| 244 | -resourcesdir $(LOCAL_PATH)/docs/html/reference/images/ \ |
| 245 | -resourcesoutdir reference/android/images/ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 246 | |
Alan Viverette | 2d362a5 | 2017-04-05 10:21:58 -0400 | [diff] [blame] | 247 | # Federate Support Library references against local API file. |
| 248 | framework_docs_LOCAL_DROIDDOC_OPTIONS += \ |
| 249 | -federate SupportLib https://developer.android.com \ |
| 250 | -federationapi SupportLib prebuilts/sdk/current/support-api.txt |
| 251 | |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 252 | |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 253 | $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE)) |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 254 | $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE)) |
Michael Wright | b2b2c0e | 2015-11-06 15:21:13 +0000 | [diff] [blame] | 255 | $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE)) |
| 256 | |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 257 | # ==== check javadoc comments but don't generate docs ======== |
| 258 | include $(CLEAR_VARS) |
| 259 | |
| 260 | LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) |
Colin Cross | 0c76095 | 2017-12-04 13:45:19 -0800 | [diff] [blame] | 261 | LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 262 | LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 263 | LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES) |
| 264 | LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS) |
| 265 | LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH) |
| 266 | LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR) |
| 267 | LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR) |
| 268 | LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) |
| 269 | |
| 270 | LOCAL_MODULE := doc-comment-check |
| 271 | |
| 272 | LOCAL_DROIDDOC_OPTIONS:=\ |
| 273 | $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ |
smain@google.com | 534bfe1 | 2016-09-01 19:52:17 -0700 | [diff] [blame] | 274 | -referenceonly \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 275 | -parsecomments |
| 276 | |
Scott Main | 15b8517 | 2017-02-21 14:30:58 -0800 | [diff] [blame] | 277 | LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 278 | |
| 279 | LOCAL_UNINSTALLABLE_MODULE := true |
| 280 | |
| 281 | include $(BUILD_DROIDDOC) |
| 282 | |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 283 | # Run this for checkbuild |
| 284 | checkbuild: doc-comment-check-docs |
| 285 | # Check comment when you are updating the API |
| 286 | update-api: doc-comment-check-docs |
| 287 | |
| 288 | # ==== static html in the sdk ================================== |
| 289 | include $(CLEAR_VARS) |
| 290 | |
| 291 | LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) |
Colin Cross | 0c76095 | 2017-12-04 13:45:19 -0800 | [diff] [blame] | 292 | LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 293 | LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 294 | LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES) |
| 295 | LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS) |
| 296 | LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH) |
| 297 | LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR) |
| 298 | LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR) |
| 299 | LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) |
| 300 | |
| 301 | LOCAL_MODULE := offline-sdk |
| 302 | |
| 303 | LOCAL_DROIDDOC_OPTIONS:=\ |
| 304 | $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ |
| 305 | -offlinemode \ |
| 306 | -title "Android SDK" \ |
| 307 | -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \ |
smain@google.com | 00de8c5 | 2016-03-07 18:38:08 -0800 | [diff] [blame] | 308 | -sdkvalues $(OUT_DOCS) \ |
smain@google.com | 8562ab5 | 2016-06-14 17:11:57 -0700 | [diff] [blame] | 309 | -hdf android.whichdoc offline |
| 310 | |
Scott Main | 15b8517 | 2017-02-21 14:30:58 -0800 | [diff] [blame] | 311 | LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk |
smain@google.com | 8562ab5 | 2016-06-14 17:11:57 -0700 | [diff] [blame] | 312 | |
| 313 | include $(BUILD_DROIDDOC) |
| 314 | |
| 315 | static_doc_index_redirect := $(out_dir)/index.html |
| 316 | $(static_doc_index_redirect): \ |
| 317 | $(LOCAL_PATH)/docs/docs-preview-index.html | $(ACP) |
| 318 | $(hide) mkdir -p $(dir $@) |
| 319 | $(hide) $(ACP) $< $@ |
| 320 | |
| 321 | $(full_target): $(static_doc_index_redirect) |
smain@google.com | 8562ab5 | 2016-06-14 17:11:57 -0700 | [diff] [blame] | 322 | |
| 323 | |
| 324 | # ==== static html in the sdk ================================== |
| 325 | include $(CLEAR_VARS) |
| 326 | |
| 327 | LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) |
Colin Cross | 0c76095 | 2017-12-04 13:45:19 -0800 | [diff] [blame] | 328 | LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 329 | LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) |
smain@google.com | 8562ab5 | 2016-06-14 17:11:57 -0700 | [diff] [blame] | 330 | LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES) |
| 331 | LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS) |
| 332 | LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH) |
| 333 | LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR) |
| 334 | LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR) |
| 335 | LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) |
| 336 | |
| 337 | LOCAL_MODULE := offline-sdk-referenceonly |
| 338 | |
| 339 | LOCAL_DROIDDOC_OPTIONS:=\ |
| 340 | $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ |
| 341 | -offlinemode \ |
| 342 | -title "Android SDK" \ |
| 343 | -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \ |
| 344 | -sdkvalues $(OUT_DOCS) \ |
smain@google.com | 00de8c5 | 2016-03-07 18:38:08 -0800 | [diff] [blame] | 345 | -hdf android.whichdoc offline \ |
Scott Main | f8cdfc8 | 2017-03-21 13:43:31 -0700 | [diff] [blame] | 346 | -referenceonly |
smain@google.com | 00de8c5 | 2016-03-07 18:38:08 -0800 | [diff] [blame] | 347 | |
Scott Main | 15b8517 | 2017-02-21 14:30:58 -0800 | [diff] [blame] | 348 | LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk |
smain@google.com | 00de8c5 | 2016-03-07 18:38:08 -0800 | [diff] [blame] | 349 | |
| 350 | include $(BUILD_DROIDDOC) |
| 351 | |
| 352 | static_doc_index_redirect := $(out_dir)/index.html |
smain@google.com | 151833a | 2016-08-31 08:42:09 -0700 | [diff] [blame] | 353 | $(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html |
Dan Willemsen | 98ff0b7 | 2016-03-23 00:42:44 -0700 | [diff] [blame] | 354 | $(copy-file-to-target) |
smain@google.com | 00de8c5 | 2016-03-07 18:38:08 -0800 | [diff] [blame] | 355 | |
smain@google.com | 2f2365d | 2016-09-21 14:05:50 -0700 | [diff] [blame] | 356 | static_doc_properties := $(out_dir)/source.properties |
| 357 | $(static_doc_properties): \ |
| 358 | $(LOCAL_PATH)/docs/source.properties | $(ACP) |
| 359 | $(hide) mkdir -p $(dir $@) |
| 360 | $(hide) $(ACP) $< $@ |
| 361 | |
smain@google.com | 00de8c5 | 2016-03-07 18:38:08 -0800 | [diff] [blame] | 362 | $(full_target): $(static_doc_index_redirect) |
smain@google.com | 2f2365d | 2016-09-21 14:05:50 -0700 | [diff] [blame] | 363 | $(full_target): $(static_doc_properties) |
smain@google.com | 00de8c5 | 2016-03-07 18:38:08 -0800 | [diff] [blame] | 364 | |
smain@google.com | 7aca8be | 2016-03-10 14:13:30 -0800 | [diff] [blame] | 365 | |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 366 | # ==== docs for the web (on the androiddevdocs app engine server) ======================= |
| 367 | include $(CLEAR_VARS) |
| 368 | |
| 369 | LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) |
Colin Cross | 0c76095 | 2017-12-04 13:45:19 -0800 | [diff] [blame] | 370 | LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 371 | LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 372 | LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) |
| 373 | LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES) |
| 374 | LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS) |
| 375 | LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH) |
| 376 | LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR) |
| 377 | LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR) |
| 378 | LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) |
| 379 | LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl / |
| 380 | |
| 381 | LOCAL_MODULE := online-sdk |
| 382 | |
| 383 | LOCAL_DROIDDOC_OPTIONS:= \ |
| 384 | $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ |
| 385 | -toroot / \ |
| 386 | -hdf android.whichdoc online \ |
| 387 | $(sample_groups) \ |
| 388 | -hdf android.hasSamples true \ |
| 389 | -samplesdir $(samples_dir) |
| 390 | |
Scott Main | 15b8517 | 2017-02-21 14:30:58 -0800 | [diff] [blame] | 391 | LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 392 | |
| 393 | include $(BUILD_DROIDDOC) |
| 394 | |
| 395 | # ==== docs for the web (on the androiddevdocs app engine server) ======================= |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 396 | include $(CLEAR_VARS) |
| 397 | |
| 398 | LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) |
Colin Cross | 0c76095 | 2017-12-04 13:45:19 -0800 | [diff] [blame] | 399 | LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 400 | LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 401 | LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) |
| 402 | LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES) |
| 403 | LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS) |
| 404 | LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH) |
| 405 | LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR) |
| 406 | LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR) |
| 407 | LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) |
| 408 | LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl / |
| 409 | |
| 410 | LOCAL_MODULE := online-system-api-sdk |
| 411 | |
| 412 | LOCAL_DROIDDOC_OPTIONS:= \ |
| 413 | $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ |
smain@google.com | 534bfe1 | 2016-09-01 19:52:17 -0700 | [diff] [blame] | 414 | -referenceonly \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 415 | -showAnnotation android.annotation.SystemApi \ |
| 416 | -title "Android SDK - Including system APIs." \ |
| 417 | -toroot / \ |
Gina Dimino | 98ad888 | 2016-05-31 17:25:48 -0700 | [diff] [blame] | 418 | -hide 101 \ |
| 419 | -hide 104 \ |
| 420 | -hide 108 \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 421 | -hdf android.whichdoc online \ |
| 422 | $(sample_groups) \ |
| 423 | -hdf android.hasSamples true \ |
| 424 | -samplesdir $(samples_dir) |
| 425 | |
Scott Main | 15b8517 | 2017-02-21 14:30:58 -0800 | [diff] [blame] | 426 | LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk |
Jeff Sharkey | 05461c0 | 2017-05-09 19:01:09 -0600 | [diff] [blame] | 427 | |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 428 | LOCAL_UNINSTALLABLE_MODULE := true |
| 429 | |
| 430 | include $(BUILD_DROIDDOC) |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 431 | |
| 432 | # ==== docs for the web (on the devsite app engine server) ======================= |
| 433 | include $(CLEAR_VARS) |
| 434 | LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) |
Colin Cross | 0c76095 | 2017-12-04 13:45:19 -0800 | [diff] [blame] | 435 | LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 436 | LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 437 | LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) |
| 438 | LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES) |
| 439 | LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS) |
| 440 | LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH) |
| 441 | LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR) |
| 442 | LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR) |
| 443 | LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) |
| 444 | # specify a second html input dir and an output path relative to OUT_DIR) |
Dirk Dougherty | 3852c1f | 2016-04-10 02:05:09 -0700 | [diff] [blame] | 445 | LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl / |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 446 | |
| 447 | LOCAL_MODULE := ds |
| 448 | |
| 449 | LOCAL_DROIDDOC_OPTIONS:= \ |
| 450 | $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 451 | -toroot / \ |
| 452 | -hdf android.whichdoc online \ |
Dirk Dougherty | b042ab1 | 2016-06-14 16:26:28 -0700 | [diff] [blame] | 453 | -devsite \ |
Dirk Dougherty | 3852c1f | 2016-04-10 02:05:09 -0700 | [diff] [blame] | 454 | $(sample_groups) \ |
Dirk Dougherty | 3852c1f | 2016-04-10 02:05:09 -0700 | [diff] [blame] | 455 | -hdf android.hasSamples true \ |
| 456 | -samplesdir $(samples_dir) |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 457 | |
Scott Main | 15b8517 | 2017-02-21 14:30:58 -0800 | [diff] [blame] | 458 | LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 459 | |
| 460 | include $(BUILD_DROIDDOC) |
| 461 | |
Dirk Dougherty | b042ab1 | 2016-06-14 16:26:28 -0700 | [diff] [blame] | 462 | # ==== docs for the web (on the devsite app engine server) ======================= |
| 463 | include $(CLEAR_VARS) |
| 464 | LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) |
Colin Cross | 0c76095 | 2017-12-04 13:45:19 -0800 | [diff] [blame] | 465 | LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 466 | LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) |
Dirk Dougherty | b042ab1 | 2016-06-14 16:26:28 -0700 | [diff] [blame] | 467 | LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) |
| 468 | LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES) |
| 469 | LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS) |
| 470 | LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH) |
| 471 | LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR) |
| 472 | LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR) |
| 473 | LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) |
| 474 | # specify a second html input dir and an output path relative to OUT_DIR) |
| 475 | LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl / |
| 476 | |
| 477 | LOCAL_MODULE := ds-static |
| 478 | |
| 479 | LOCAL_DROIDDOC_OPTIONS:= \ |
| 480 | $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ |
| 481 | -hdf android.whichdoc online \ |
| 482 | -staticonly \ |
| 483 | -toroot / \ |
| 484 | -devsite \ |
| 485 | -ignoreJdLinks |
| 486 | |
Scott Main | 15b8517 | 2017-02-21 14:30:58 -0800 | [diff] [blame] | 487 | LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk |
Dirk Dougherty | b042ab1 | 2016-06-14 16:26:28 -0700 | [diff] [blame] | 488 | |
| 489 | include $(BUILD_DROIDDOC) |
| 490 | |
Dirk Dougherty | 7d47b55 | 2016-09-13 16:44:25 -0700 | [diff] [blame] | 491 | # ==== generates full navtree for resolving @links in ds postprocessing ==== |
| 492 | include $(CLEAR_VARS) |
| 493 | |
| 494 | LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) |
Colin Cross | 0c76095 | 2017-12-04 13:45:19 -0800 | [diff] [blame] | 495 | LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 496 | LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) |
Dirk Dougherty | 7d47b55 | 2016-09-13 16:44:25 -0700 | [diff] [blame] | 497 | LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) |
| 498 | LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES) |
| 499 | LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS) |
| 500 | LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH) |
| 501 | LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR) |
| 502 | LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) |
| 503 | |
| 504 | LOCAL_MODULE := ds-ref-navtree |
| 505 | |
| 506 | LOCAL_DROIDDOC_OPTIONS:= \ |
| 507 | $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ |
| 508 | -hdf android.whichdoc online \ |
| 509 | -toroot / \ |
| 510 | -atLinksNavtree \ |
| 511 | -navtreeonly |
| 512 | |
Scott Main | 15b8517 | 2017-02-21 14:30:58 -0800 | [diff] [blame] | 513 | LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk |
Dirk Dougherty | 7d47b55 | 2016-09-13 16:44:25 -0700 | [diff] [blame] | 514 | |
| 515 | include $(BUILD_DROIDDOC) |
| 516 | |
Dirk Dougherty | 31ae1c51 | 2015-11-07 13:18:02 -0800 | [diff] [blame] | 517 | # ==== site updates for docs (on the androiddevdocs app engine server) ======================= |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 518 | include $(CLEAR_VARS) |
Dirk Dougherty | 31ae1c51 | 2015-11-07 13:18:02 -0800 | [diff] [blame] | 519 | |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 520 | LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) |
Colin Cross | 0c76095 | 2017-12-04 13:45:19 -0800 | [diff] [blame] | 521 | LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 522 | LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 523 | LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) |
| 524 | LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES) |
| 525 | LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS) |
| 526 | LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH) |
Dirk Dougherty | 31ae1c51 | 2015-11-07 13:18:02 -0800 | [diff] [blame] | 527 | LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR) |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 528 | LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR) |
| 529 | LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) |
Dirk Dougherty | 31ae1c51 | 2015-11-07 13:18:02 -0800 | [diff] [blame] | 530 | LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl / |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 531 | |
Dirk Dougherty | 31ae1c51 | 2015-11-07 13:18:02 -0800 | [diff] [blame] | 532 | LOCAL_MODULE := online-sdk-dev |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 533 | |
| 534 | LOCAL_DROIDDOC_OPTIONS:= \ |
| 535 | $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ |
| 536 | -toroot / \ |
| 537 | -hdf android.whichdoc online \ |
| 538 | $(sample_groups) \ |
| 539 | -hdf android.hasSamples true \ |
| 540 | -samplesdir $(samples_dir) |
| 541 | |
Scott Main | 15b8517 | 2017-02-21 14:30:58 -0800 | [diff] [blame] | 542 | LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 543 | |
| 544 | include $(BUILD_DROIDDOC) |
| 545 | |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 546 | # ==== docs that have all of the stuff that's @hidden ======================= |
| 547 | include $(CLEAR_VARS) |
| 548 | |
| 549 | LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) |
Colin Cross | 0c76095 | 2017-12-04 13:45:19 -0800 | [diff] [blame] | 550 | LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) |
Colin Cross | 5f4dcf6 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 551 | LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 552 | LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES) |
| 553 | LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS) |
| 554 | LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH) |
| 555 | LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR) |
| 556 | LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR) |
| 557 | LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) |
| 558 | |
| 559 | LOCAL_MODULE := hidden |
| 560 | LOCAL_DROIDDOC_OPTIONS:=\ |
| 561 | $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ |
smain@google.com | 534bfe1 | 2016-09-01 19:52:17 -0700 | [diff] [blame] | 562 | -referenceonly \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 563 | -title "Android SDK - Including hidden APIs." |
| 564 | # -hidden |
| 565 | |
Scott Main | 15b8517 | 2017-02-21 14:30:58 -0800 | [diff] [blame] | 566 | LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 567 | |
| 568 | include $(BUILD_DROIDDOC) |
| 569 | |
Joe Onorato | 1754d74 | 2016-11-21 17:51:35 -0800 | [diff] [blame] | 570 | # ==== java proto host library ============================== |
| 571 | include $(CLEAR_VARS) |
| 572 | LOCAL_MODULE := platformprotos |
| 573 | LOCAL_PROTOC_OPTIMIZE_TYPE := full |
| 574 | LOCAL_PROTOC_FLAGS := \ |
| 575 | -Iexternal/protobuf/src |
| 576 | LOCAL_SOURCE_FILES_ALL_GENERATED := true |
| 577 | LOCAL_SRC_FILES := \ |
| 578 | $(call all-proto-files-under, core/proto) \ |
| 579 | $(call all-proto-files-under, libs/incident/proto) |
Andreas Gampe | 7b9b5d7 | 2018-02-15 15:12:38 -0800 | [diff] [blame] | 580 | # b/72714520 |
| 581 | LOCAL_ERROR_PRONE_FLAGS := -Xep:MissingOverride:OFF |
Joe Onorato | 1754d74 | 2016-11-21 17:51:35 -0800 | [diff] [blame] | 582 | include $(BUILD_HOST_JAVA_LIBRARY) |
| 583 | |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 584 | |
David Brazdil | 0649c8d | 2018-01-22 22:23:13 +0000 | [diff] [blame] | 585 | # ==== hiddenapi lists ======================================= |
David Brazdil | 74502c7 | 2018-05-08 15:04:20 +0100 | [diff] [blame] | 586 | include $(CLEAR_VARS) |
David Brazdil | 0649c8d | 2018-01-22 22:23:13 +0000 | [diff] [blame] | 587 | |
David Brazdil | 74502c7 | 2018-05-08 15:04:20 +0100 | [diff] [blame] | 588 | # File names of final API lists |
| 589 | LOCAL_LIGHT_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST) |
| 590 | LOCAL_DARK_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST) |
| 591 | LOCAL_BLACKLIST := $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST) |
| 592 | |
| 593 | # File names of source files we will use to generate the final API lists. |
| 594 | LOCAL_SRC_GREYLIST := frameworks/base/config/hiddenapi-light-greylist.txt |
| 595 | LOCAL_SRC_VENDOR_LIST := frameworks/base/config/hiddenapi-vendor-list.txt |
David Brazdil | 259e162 | 2018-05-08 16:49:02 +0100 | [diff] [blame] | 596 | LOCAL_SRC_FORCE_BLACKLIST := frameworks/base/config/hiddenapi-force-blacklist.txt |
David Brazdil | 6f6a126 | 2018-05-31 13:58:41 +0100 | [diff] [blame] | 597 | LOCAL_SRC_PUBLIC_API := $(INTERNAL_PLATFORM_DEX_API_FILE) |
David Brazdil | 74502c7 | 2018-05-08 15:04:20 +0100 | [diff] [blame] | 598 | LOCAL_SRC_PRIVATE_API := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) |
| 599 | LOCAL_SRC_REMOVED_API := $(INTERNAL_PLATFORM_REMOVED_DEX_API_FILE) |
| 600 | |
| 601 | LOCAL_SRC_ALL := \ |
| 602 | $(LOCAL_SRC_GREYLIST) \ |
| 603 | $(LOCAL_SRC_VENDOR_LIST) \ |
David Brazdil | 259e162 | 2018-05-08 16:49:02 +0100 | [diff] [blame] | 604 | $(LOCAL_SRC_FORCE_BLACKLIST) \ |
David Brazdil | 6f6a126 | 2018-05-31 13:58:41 +0100 | [diff] [blame] | 605 | $(LOCAL_SRC_PUBLIC_API) \ |
David Brazdil | 74502c7 | 2018-05-08 15:04:20 +0100 | [diff] [blame] | 606 | $(LOCAL_SRC_PRIVATE_API) \ |
| 607 | $(LOCAL_SRC_REMOVED_API) |
| 608 | |
| 609 | define assert-has-no-overlap |
| 610 | if [ ! -z "`comm -12 <(sort $(1)) <(sort $(2))`" ]; then \ |
| 611 | echo "$(1) and $(2) should not overlap" 1>&2; \ |
| 612 | comm -12 <(sort $(1)) <(sort $(2)) 1>&2; \ |
| 613 | exit 1; \ |
| 614 | fi |
| 615 | endef |
| 616 | |
| 617 | define assert-is-subset |
| 618 | if [ ! -z "`comm -23 <(sort $(1)) <(sort $(2))`" ]; then \ |
| 619 | echo "$(1) must be a subset of $(2)" 1>&2; \ |
| 620 | comm -23 <(sort $(1)) <(sort $(2)) 1>&2; \ |
| 621 | exit 1; \ |
| 622 | fi |
| 623 | endef |
| 624 | |
| 625 | define assert-has-no-duplicates |
| 626 | if [ ! -z "`sort $(1) | uniq -D`" ]; then \ |
| 627 | echo "$(1) has duplicate entries" 1>&2; \ |
| 628 | sort $(1) | uniq -D 1>&2; \ |
| 629 | exit 1; \ |
| 630 | fi |
| 631 | endef |
| 632 | |
| 633 | # The following rules build API lists in the build folder. |
| 634 | # By not using files from the source tree, ART buildbots can mock these lists |
| 635 | # or have alternative rules for building them. Other rules in the build system |
| 636 | # should depend on the files in the build folder. |
David Brazdil | f16ac00 | 2018-01-26 11:13:35 +0000 | [diff] [blame] | 637 | |
David Brazdil | d39b9be | 2018-05-05 11:43:29 +0100 | [diff] [blame] | 638 | # Merge light greylist from multiple files: |
David Brazdil | 74502c7 | 2018-05-08 15:04:20 +0100 | [diff] [blame] | 639 | # (1) manual greylist LOCAL_SRC_GREYLIST |
| 640 | # (2) list of usages from vendor apps LOCAL_SRC_VENDOR_LIST |
| 641 | # (3) list of removed APIs in LOCAL_SRC_REMOVED_API |
David Brazdil | d39b9be | 2018-05-05 11:43:29 +0100 | [diff] [blame] | 642 | # @removed does not imply private in Doclava. We must take the subset also |
David Brazdil | 74502c7 | 2018-05-08 15:04:20 +0100 | [diff] [blame] | 643 | # in LOCAL_SRC_PRIVATE_API. |
David Brazdil | d39b9be | 2018-05-05 11:43:29 +0100 | [diff] [blame] | 644 | # (4) list of serialization APIs |
| 645 | # Automatically adds all methods which match the signatures in |
| 646 | # REGEX_SERIALIZATION. These are greylisted in order to allow applications |
| 647 | # to write their own serializers. |
David Brazdil | 74502c7 | 2018-05-08 15:04:20 +0100 | [diff] [blame] | 648 | $(LOCAL_LIGHT_GREYLIST): REGEX_SERIALIZATION := \ |
David Brazdil | d39b9be | 2018-05-05 11:43:29 +0100 | [diff] [blame] | 649 | "readObject\(Ljava/io/ObjectInputStream;\)V" \ |
| 650 | "readObjectNoData\(\)V" \ |
| 651 | "readResolve\(\)Ljava/lang/Object;" \ |
| 652 | "serialVersionUID:J" \ |
| 653 | "serialPersistentFields:\[Ljava/io/ObjectStreamField;" \ |
| 654 | "writeObject\(Ljava/io/ObjectOutputStream;\)V" \ |
| 655 | "writeReplace\(\)Ljava/lang/Object;" |
David Brazdil | 74502c7 | 2018-05-08 15:04:20 +0100 | [diff] [blame] | 656 | $(LOCAL_LIGHT_GREYLIST): $(LOCAL_SRC_ALL) |
| 657 | sort $(LOCAL_SRC_GREYLIST) $(LOCAL_SRC_VENDOR_LIST) \ |
| 658 | <(grep -E "\->("$(subst $(space),"|",$(REGEX_SERIALIZATION))")$$" \ |
| 659 | $(LOCAL_SRC_PRIVATE_API)) \ |
| 660 | <(comm -12 <(sort $(LOCAL_SRC_REMOVED_API)) <(sort $(LOCAL_SRC_PRIVATE_API))) \ |
| 661 | > $@ |
| 662 | $(call assert-has-no-duplicates,$@) |
| 663 | $(call assert-is-subset,$@,$(LOCAL_SRC_PRIVATE_API)) |
David Brazdil | 259e162 | 2018-05-08 16:49:02 +0100 | [diff] [blame] | 664 | $(call assert-has-no-overlap,$@,$(LOCAL_SRC_FORCE_BLACKLIST)) |
David Brazdil | d39b9be | 2018-05-05 11:43:29 +0100 | [diff] [blame] | 665 | |
David Brazdil | f24f0a9 | 2018-05-10 15:50:02 +0100 | [diff] [blame] | 666 | # Generate dark greylist as remaining classes and class members in the same |
| 667 | # package as classes listed in the light greylist. |
David Brazdil | 6afca53 | 2018-05-08 15:28:31 +0100 | [diff] [blame] | 668 | # The algorithm is as follows: |
| 669 | # (1) extract the class descriptor from each entry in LOCAL_LIGHT_GREYLIST |
David Brazdil | f24f0a9 | 2018-05-10 15:50:02 +0100 | [diff] [blame] | 670 | # (2) strip everything after the last forward-slash, |
| 671 | # e.g. 'Lpackage/subpackage/class$inner;' turns into 'Lpackage/subpackage/' |
| 672 | # (3) insert all entries from LOCAL_SRC_PRIVATE_API which begin with the package |
| 673 | # name but do not contain another forward-slash in the class name, e.g. |
| 674 | # matching '^Lpackage/subpackage/[^/;]*;' |
David Brazdil | 6afca53 | 2018-05-08 15:28:31 +0100 | [diff] [blame] | 675 | # (4) subtract entries shared with LOCAL_LIGHT_GREYLIST |
David Brazdil | 74502c7 | 2018-05-08 15:04:20 +0100 | [diff] [blame] | 676 | $(LOCAL_DARK_GREYLIST): $(LOCAL_SRC_ALL) $(LOCAL_LIGHT_GREYLIST) |
David Brazdil | 259e162 | 2018-05-08 16:49:02 +0100 | [diff] [blame] | 677 | comm -13 <(sort $(LOCAL_LIGHT_GREYLIST) $(LOCAL_SRC_FORCE_BLACKLIST)) \ |
David Brazdil | 6f6a126 | 2018-05-31 13:58:41 +0100 | [diff] [blame] | 678 | <(cat $(LOCAL_SRC_PUBLIC_API) $(LOCAL_LIGHT_GREYLIST) | \ |
| 679 | sed 's/\->.*//' | sed 's/\(.*\/\).*/\1/' | sort | uniq | \ |
David Brazdil | f24f0a9 | 2018-05-10 15:50:02 +0100 | [diff] [blame] | 680 | while read PKG_NAME; do \ |
| 681 | grep -E "^$${PKG_NAME}[^/;]*;" $(LOCAL_SRC_PRIVATE_API); \ |
David Brazdil | 6afca53 | 2018-05-08 15:28:31 +0100 | [diff] [blame] | 682 | done | sort | uniq) \ |
| 683 | > $@ |
David Brazdil | 74502c7 | 2018-05-08 15:04:20 +0100 | [diff] [blame] | 684 | $(call assert-is-subset,$@,$(LOCAL_SRC_PRIVATE_API)) |
| 685 | $(call assert-has-no-duplicates,$@) |
| 686 | $(call assert-has-no-overlap,$@,$(LOCAL_LIGHT_GREYLIST)) |
David Brazdil | 259e162 | 2018-05-08 16:49:02 +0100 | [diff] [blame] | 687 | $(call assert-has-no-overlap,$@,$(LOCAL_SRC_FORCE_BLACKLIST)) |
David Brazdil | f16ac00 | 2018-01-26 11:13:35 +0000 | [diff] [blame] | 688 | |
David Brazdil | 74502c7 | 2018-05-08 15:04:20 +0100 | [diff] [blame] | 689 | # Generate blacklist as private API minus (light greylist plus dark greylist). |
| 690 | $(LOCAL_BLACKLIST): $(LOCAL_SRC_ALL) $(LOCAL_LIGHT_GREYLIST) $(LOCAL_DARK_GREYLIST) |
| 691 | comm -13 <(sort $(LOCAL_LIGHT_GREYLIST) $(LOCAL_DARK_GREYLIST)) \ |
| 692 | <(sort $(LOCAL_SRC_PRIVATE_API)) \ |
| 693 | > $@ |
| 694 | $(call assert-is-subset,$@,$(LOCAL_SRC_PRIVATE_API)) |
| 695 | $(call assert-has-no-duplicates,$@) |
| 696 | $(call assert-has-no-overlap,$@,$(LOCAL_LIGHT_GREYLIST)) |
| 697 | $(call assert-has-no-overlap,$@,$(LOCAL_DARK_GREYLIST)) |
David Brazdil | 259e162 | 2018-05-08 16:49:02 +0100 | [diff] [blame] | 698 | $(call assert-is-subset,$(LOCAL_SRC_FORCE_BLACKLIST),$@) |
David Brazdil | 0649c8d | 2018-01-22 22:23:13 +0000 | [diff] [blame] | 699 | |
David Brazdil | cc88bdc | 2018-05-02 15:47:32 +0100 | [diff] [blame] | 700 | # Build AOSP blacklist |
| 701 | # ============================================================ |
| 702 | include $(CLEAR_VARS) |
| 703 | |
| 704 | LOCAL_LIGHT_GREYLIST_FILE := frameworks/base/config/hiddenapi-p-light-greylist.txt |
| 705 | LOCAL_BLACKLIST_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/hiddenapi-aosp-blacklist.txt |
| 706 | |
| 707 | .PHONY: hiddenapi-aosp-blacklist |
| 708 | hiddenapi-aosp-blacklist: $(LOCAL_BLACKLIST_FILE) |
| 709 | |
| 710 | $(LOCAL_BLACKLIST_FILE): $(LOCAL_LIGHT_GREYLIST_FILE) $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) |
| 711 | LC_COLLATE=C comm -13 <(sort $(LOCAL_LIGHT_GREYLIST_FILE)) \ |
| 712 | <(sort $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)) > $@ |
| 713 | |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 714 | # Include subdirectory makefiles |
| 715 | # ============================================================ |
| 716 | |
| 717 | # If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework |
| 718 | # team really wants is to build the stuff defined by this makefile. |
| 719 | ifeq (,$(ONE_SHOT_MAKEFILE)) |
| 720 | include $(call first-makefiles-under,$(LOCAL_PATH)) |
| 721 | endif |
| 722 | |
Holly Jiuyu Sun | bbc8580 | 2017-12-21 18:44:59 -0800 | [diff] [blame] | 723 | endif # ANDROID_BUILD_EMBEDDED |