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 | cf3a0b5 | 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 | cf3a0b5 | 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 | cf3a0b5 | 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 | |
Colin Cross | cf3a0b5 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 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, \ |
Colin Cross | cf3a0b5 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 79 | $(non_base_dirs) \ |
| 80 | ) |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 81 | |
Colin Cross | cf3a0b5 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 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 += \ |
| 85 | $(addprefix ../../,\ |
| 86 | $(filter \ |
| 87 | $(foreach dir,$(FRAMEWORKS_BASE_JAVA_SRC_DIRS),\ |
| 88 | $(foreach package,$(packages_to_document),\ |
| 89 | $(dir)/$(package)/%.java)),\ |
| 90 | $(SOONG_FRAMEWORK_SRCS))) |
| 91 | |
| 92 | # Find all generated files that were used to compile framework.jar |
Colin Cross | bd200ce | 2017-12-04 13:45:19 -0800 | [diff] [blame] | 93 | files_to_check_apis_generated := \ |
| 94 | $(filter $(OUT_DIR)/%,\ |
| 95 | $(SOONG_FRAMEWORK_SRCS)) |
George Mount | f6be993 | 2015-12-03 07:39:55 -0800 | [diff] [blame] | 96 | |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 97 | # These are relative to frameworks/base |
| 98 | # FRAMEWORKS_BASE_SUBDIRS comes from build/core/pathmap.mk |
Colin Cross | cf3a0b5 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 99 | files_to_document := \ |
| 100 | $(files_to_check_apis) \ |
| 101 | $(call find-other-java-files,\ |
Paul Duffin | 187a48d | 2017-12-13 14:34:31 +0000 | [diff] [blame] | 102 | test-base/src \ |
Paul Duffin | 9f6282d | 2017-12-15 15:49:08 +0000 | [diff] [blame] | 103 | test-mock/src \ |
Colin Cross | cf3a0b5 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 104 | test-runner/src) |
George Mount | f6be993 | 2015-12-03 07:39:55 -0800 | [diff] [blame] | 105 | |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 106 | # These are relative to frameworks/base |
| 107 | html_dirs := \ |
| 108 | $(FRAMEWORKS_BASE_SUBDIRS) \ |
Colin Cross | cf3a0b5 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 109 | $(non_base_dirs) \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 110 | |
| 111 | # Common sources for doc check and api check |
| 112 | common_src_files := \ |
| 113 | $(call find-other-html-files, $(html_dirs)) \ |
Colin Cross | cf3a0b5 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 114 | $(addprefix ../../, $(libcore_to_document)) \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 115 | |
| 116 | # These are relative to frameworks/base |
| 117 | framework_docs_LOCAL_SRC_FILES := \ |
Colin Cross | cf3a0b5 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 118 | $(files_to_document) \ |
| 119 | $(common_src_files) \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 120 | |
| 121 | # These are relative to frameworks/base |
| 122 | framework_docs_LOCAL_API_CHECK_SRC_FILES := \ |
Colin Cross | cf3a0b5 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 123 | $(files_to_check_apis) \ |
| 124 | $(common_src_files) \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 125 | |
| 126 | # This is used by ide.mk as the list of source files that are |
| 127 | # always included. |
| 128 | INTERNAL_SDK_SOURCE_DIRS := $(addprefix $(LOCAL_PATH)/,$(dirs_to_document)) |
| 129 | |
| 130 | framework_docs_LOCAL_DROIDDOC_SOURCE_PATH := \ |
| 131 | $(FRAMEWORKS_BASE_JAVA_SRC_DIRS) |
| 132 | |
Colin Cross | cf3a0b5 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 133 | framework_docs_LOCAL_SRCJARS := $(SOONG_FRAMEWORK_SRCJARS) |
| 134 | |
Colin Cross | bd200ce | 2017-12-04 13:45:19 -0800 | [diff] [blame] | 135 | framework_docs_LOCAL_GENERATED_SOURCES := \ |
| 136 | $(libcore_to_document_generated) \ |
| 137 | $(files_to_check_apis_generated) \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 138 | |
| 139 | framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES := \ |
Piotr Jastrzebski | cfa292e | 2015-02-17 16:58:52 +0000 | [diff] [blame] | 140 | core-oj \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 141 | core-libart \ |
| 142 | conscrypt \ |
| 143 | bouncycastle \ |
| 144 | okhttp \ |
| 145 | ext \ |
| 146 | framework \ |
Paul Duffin | c08090f | 2017-06-29 14:58:43 +0100 | [diff] [blame] | 147 | voip-common \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 148 | |
Alan Viverette | 9ca513e | 2017-04-05 10:21:58 -0400 | [diff] [blame] | 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. |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 151 | framework_docs_LOCAL_JAVA_LIBRARIES := \ |
| 152 | $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES) \ |
| 153 | $(FRAMEWORKS_SUPPORT_JAVA_LIBRARIES) |
| 154 | |
| 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. |
| 159 | # |
| 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 := \ |
Jeff Sharkey | 0f3f60b | 2017-04-24 18:06:20 -0600 | [diff] [blame] | 163 | -android \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 164 | -knowntags ./frameworks/base/docs/knowntags.txt \ |
Narayan Kamath | 2c4f284 | 2015-07-27 14:02:11 +0100 | [diff] [blame] | 165 | -knowntags ./libcore/known_oj_tags.txt \ |
Jeff Sharkey | bfc4fcd | 2017-06-05 17:38:17 -0600 | [diff] [blame] | 166 | -manifest ./frameworks/base/core/res/AndroidManifest.xml \ |
Tobias Thierer | dda16e8 | 2018-03-05 22:55:32 +0000 | [diff] [blame] | 167 | -hidePackage com.android.internal \ |
| 168 | -hidePackage com.android.internal.util \ |
Neil Fuller | 57157fb | 2017-11-24 15:58:38 +0000 | [diff] [blame] | 169 | -hidePackage com.android.okhttp \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 170 | -hidePackage com.android.org.conscrypt \ |
Anton Hansson | 6a9e726 | 2018-04-19 16:23:53 +0100 | [diff] [blame] | 171 | -hidePackage com.android.server |
| 172 | |
| 173 | # Convert an sdk level to a "since" argument. |
Sundong Ahn | 4ff08f6 | 2018-07-16 18:19:31 +0900 | [diff] [blame] | 174 | since-arg = -since $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/$(1)/public/api/android.$(2)) $(1) |
Anton Hansson | 6a9e726 | 2018-04-19 16:23:53 +0100 | [diff] [blame] | 175 | |
Sundong Ahn | 4ff08f6 | 2018-07-16 18:19:31 +0900 | [diff] [blame] | 176 | finalized_xml_sdks := $(call numerically_sort,\ |
| 177 | $(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/public/api/android.xml,%,\ |
| 178 | $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/public/api/android.xml))) |
| 179 | finalized_txt_sdks := $(call numerically_sort,\ |
| 180 | $(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/public/api/android.txt,%,\ |
| 181 | $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/public/api/android.txt))) |
Anton Hansson | 6a9e726 | 2018-04-19 16:23:53 +0100 | [diff] [blame] | 182 | |
Sundong Ahn | 4ff08f6 | 2018-07-16 18:19:31 +0900 | [diff] [blame] | 183 | framework_docs_LOCAL_DROIDDOC_OPTIONS += $(foreach sdk,$(finalized_xml_sdks),$(call since-arg,$(sdk),xml)) |
| 184 | framework_docs_LOCAL_DROIDDOC_OPTIONS += $(foreach sdk,$(finalized_txt_sdks),$(call since-arg,$(sdk),txt)) |
Anton Hansson | 6a9e726 | 2018-04-19 16:23:53 +0100 | [diff] [blame] | 185 | ifneq ($(PLATFORM_VERSION_CODENAME),REL) |
| 186 | framework_docs_LOCAL_DROIDDOC_OPTIONS += \ |
| 187 | -since ./frameworks/base/api/current.txt $(PLATFORM_VERSION_CODENAME) |
| 188 | endif |
| 189 | framework_docs_LOCAL_DROIDDOC_OPTIONS += \ |
Jeff Sharkey | c204c22 | 2017-11-27 15:02:10 -0700 | [diff] [blame] | 190 | -werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 \ |
Anton Hansson | 6a9e726 | 2018-04-19 16:23:53 +0100 | [diff] [blame] | 191 | -overview $(LOCAL_PATH)/core/java/overview.html |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 192 | |
| 193 | framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR:= \ |
| 194 | $(call intermediates-dir-for,JAVA_LIBRARIES,framework,,COMMON) |
| 195 | |
| 196 | framework_docs_LOCAL_ADDITIONAL_JAVA_DIR:= \ |
Alan Viverette | 9ca513e | 2017-04-05 10:21:58 -0400 | [diff] [blame] | 197 | $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR) |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 198 | |
| 199 | framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES := \ |
Narayan Kamath | c21739a | 2015-07-14 13:39:23 +0100 | [diff] [blame] | 200 | frameworks/base/docs/knowntags.txt \ |
Colin Cross | 72d359f | 2017-10-27 10:46:53 -0700 | [diff] [blame] | 201 | $(libcore_to_document_generated) |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 202 | |
| 203 | samples_dir := development/samples/browseable |
| 204 | |
| 205 | # Whitelist of valid groups, used for default TOC grouping. Each sample must |
| 206 | # belong to one (and only one) group. Assign samples to groups by setting |
| 207 | # a sample.group var to one of these groups in the sample's _index.jd. |
| 208 | sample_groups := -samplegroup Admin \ |
| 209 | -samplegroup Background \ |
| 210 | -samplegroup Connectivity \ |
| 211 | -samplegroup Content \ |
| 212 | -samplegroup Input \ |
| 213 | -samplegroup Media \ |
| 214 | -samplegroup Notification \ |
| 215 | -samplegroup RenderScript \ |
| 216 | -samplegroup Security \ |
| 217 | -samplegroup Sensors \ |
Trevor Johns | 4cbe359 | 2015-05-27 14:50:51 -0700 | [diff] [blame] | 218 | -samplegroup System \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 219 | -samplegroup Testing \ |
| 220 | -samplegroup UI \ |
| 221 | -samplegroup Views \ |
| 222 | -samplegroup Wearable |
| 223 | |
| 224 | ## SDK version identifiers used in the published docs |
| 225 | # major[.minor] version for current SDK. (full releases only) |
smain@google.com | dde8deb | 2016-08-29 18:36:50 -0700 | [diff] [blame] | 226 | framework_docs_SDK_VERSION:=7.0 |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 227 | # release version (ie "Release x") (full releases only) |
| 228 | framework_docs_SDK_REL_ID:=1 |
| 229 | |
| 230 | framework_docs_LOCAL_DROIDDOC_OPTIONS += \ |
Billy Lamberta | 75dbc8f | 2017-03-03 13:09:15 -0800 | [diff] [blame] | 231 | -hdf dac true \ |
Scott Main | f8cdfc8 | 2017-03-21 13:43:31 -0700 | [diff] [blame] | 232 | -hdf sdk.codename O \ |
| 233 | -hdf sdk.preview.version 1 \ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 234 | -hdf sdk.version $(framework_docs_SDK_VERSION) \ |
| 235 | -hdf sdk.rel.id $(framework_docs_SDK_REL_ID) \ |
Scott Main | f8cdfc8 | 2017-03-21 13:43:31 -0700 | [diff] [blame] | 236 | -hdf sdk.preview 0 \ |
| 237 | -resourcesdir $(LOCAL_PATH)/docs/html/reference/images/ \ |
| 238 | -resourcesoutdir reference/android/images/ |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 239 | |
Alan Viverette | 9ca513e | 2017-04-05 10:21:58 -0400 | [diff] [blame] | 240 | # Federate Support Library references against local API file. |
| 241 | framework_docs_LOCAL_DROIDDOC_OPTIONS += \ |
| 242 | -federate SupportLib https://developer.android.com \ |
| 243 | -federationapi SupportLib prebuilts/sdk/current/support-api.txt |
| 244 | |
Alan Viverette | 67b51d4 | 2018-03-28 17:10:20 -0400 | [diff] [blame] | 245 | # Federate AndroidX references against local API file. |
| 246 | framework_docs_LOCAL_DROIDDOC_OPTIONS += \ |
| 247 | -federate AndroidX https://developer.android.com \ |
| 248 | -federationapi AndroidX prebuilts/sdk/current/androidx-api.txt |
| 249 | |
Anton Hansson | cfa700d | 2018-04-23 17:34:18 +0100 | [diff] [blame] | 250 | # Get the highest numbered api txt for the given api level. |
| 251 | # $(1): the api level (e.g. public, system) |
| 252 | define highest_sdk_txt |
| 253 | $(HISTORICAL_SDK_VERSIONS_ROOT)/$(lastword $(call numerically_sort, \ |
| 254 | $(patsubst \ |
| 255 | $(HISTORICAL_SDK_VERSIONS_ROOT)/%,\ |
| 256 | %,\ |
| 257 | $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/$(1)/api/android.txt)\ |
| 258 | ) \ |
| 259 | )) |
| 260 | endef |
| 261 | |
Jeff Sharkey | d2bf31c | 2017-11-29 13:14:27 -0700 | [diff] [blame] | 262 | # ==== Public API diff =========================== |
Alan Viverette | 6b7354c | 2017-07-13 17:10:14 -0400 | [diff] [blame] | 263 | include $(CLEAR_VARS) |
| 264 | |
| 265 | LOCAL_SRC_FILES := $(framework_docs_LOCAL_API_CHECK_SRC_FILES) |
Colin Cross | bd200ce | 2017-12-04 13:45:19 -0800 | [diff] [blame] | 266 | LOCAL_GENERATED_SOURCES := $(framework_docs_LOCAL_GENERATED_SOURCES) |
Colin Cross | cf3a0b5 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 267 | LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) |
Alan Viverette | 6b7354c | 2017-07-13 17:10:14 -0400 | [diff] [blame] | 268 | LOCAL_JAVA_LIBRARIES := $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES) |
| 269 | LOCAL_MODULE_CLASS := $(framework_docs_LOCAL_MODULE_CLASS) |
| 270 | LOCAL_ADDITIONAL_JAVA_DIR := $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR) |
| 271 | LOCAL_ADDITIONAL_DEPENDENCIES := \ |
| 272 | $(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) \ |
| 273 | $(INTERNAL_PLATFORM_API_FILE) |
| 274 | |
| 275 | LOCAL_MODULE := offline-sdk-referenceonly |
| 276 | |
Anton Hansson | cfa700d | 2018-04-23 17:34:18 +0100 | [diff] [blame] | 277 | # Basename, because apidiff adds .txt internally. |
| 278 | LOCAL_APIDIFF_OLDAPI := $(basename $(call highest_sdk_txt,public)) |
Alan Viverette | 6b7354c | 2017-07-13 17:10:14 -0400 | [diff] [blame] | 279 | LOCAL_APIDIFF_NEWAPI := $(LOCAL_PATH)/../../$(basename $(INTERNAL_PLATFORM_API_FILE)) |
| 280 | |
| 281 | include $(BUILD_APIDIFF) |
| 282 | |
Jeff Sharkey | c8dc254 | 2017-12-08 14:52:37 -0700 | [diff] [blame] | 283 | # Hack to get diffs included in docs output |
| 284 | out_zip := $(OUT_DOCS)/$(LOCAL_MODULE)-docs.zip |
| 285 | $(out_zip): $(full_target) |
| 286 | |
Jeff Sharkey | d2bf31c | 2017-11-29 13:14:27 -0700 | [diff] [blame] | 287 | # ==== System API diff =========================== |
| 288 | include $(CLEAR_VARS) |
| 289 | |
| 290 | LOCAL_SRC_FILES := $(framework_docs_LOCAL_API_CHECK_SRC_FILES) |
Colin Cross | bd200ce | 2017-12-04 13:45:19 -0800 | [diff] [blame] | 291 | LOCAL_GENERATED_SOURCES := $(framework_docs_LOCAL_GENERATED_SOURCES) |
Colin Cross | cf3a0b5 | 2017-11-16 00:15:28 -0800 | [diff] [blame] | 292 | LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) |
Jeff Sharkey | d2bf31c | 2017-11-29 13:14:27 -0700 | [diff] [blame] | 293 | LOCAL_JAVA_LIBRARIES := $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES) |
| 294 | LOCAL_MODULE_CLASS := $(framework_docs_LOCAL_MODULE_CLASS) |
| 295 | LOCAL_ADDITIONAL_JAVA_DIR := $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR) |
| 296 | LOCAL_ADDITIONAL_DEPENDENCIES := \ |
| 297 | $(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) \ |
| 298 | $(INTERNAL_PLATFORM_SYSTEM_API_FILE) |
| 299 | |
| 300 | LOCAL_MODULE := offline-system-sdk-referenceonly |
| 301 | |
Anton Hansson | cfa700d | 2018-04-23 17:34:18 +0100 | [diff] [blame] | 302 | # Basename, because apidiff adds .txt internally. |
| 303 | LOCAL_APIDIFF_OLDAPI := $(basename $(call highest_sdk_txt,system)) |
Jeff Sharkey | d2bf31c | 2017-11-29 13:14:27 -0700 | [diff] [blame] | 304 | LOCAL_APIDIFF_NEWAPI := $(LOCAL_PATH)/../../$(basename $(INTERNAL_PLATFORM_SYSTEM_API_FILE)) |
| 305 | |
| 306 | include $(BUILD_APIDIFF) |
| 307 | |
Jeff Sharkey | c8dc254 | 2017-12-08 14:52:37 -0700 | [diff] [blame] | 308 | # Hack to get diffs included in docs output |
| 309 | out_zip := $(OUT_DOCS)/$(LOCAL_MODULE)-docs.zip |
| 310 | $(out_zip): $(full_target) |
| 311 | |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 312 | $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE)) |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 313 | $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE)) |
Michael Wright | b2b2c0e | 2015-11-06 15:21:13 +0000 | [diff] [blame] | 314 | $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE)) |
| 315 | |
Nan Zhang | e9a76f7 | 2018-07-11 15:19:22 -0700 | [diff] [blame] | 316 | # sdk.atree needs to copy the whole dir: $(OUT_DOCS)/offline-sdk to the final zip. |
| 317 | # So keep offline-sdk-timestamp target here, and unzip offline-sdk-docs.zip to |
| 318 | # $(OUT_DOCS)/offline-sdk. |
| 319 | $(OUT_DOCS)/offline-sdk-timestamp: $(OUT_DOCS)/offline-sdk-docs-docs.zip |
| 320 | $(hide) rm -rf $(OUT_DOCS)/offline-sdk |
| 321 | $(hide) mkdir -p $(OUT_DOCS)/offline-sdk |
| 322 | ( unzip -qo $< -d $(OUT_DOCS)/offline-sdk && touch -f $@ ) || exit 1 |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 323 | |
David Brazdil | 0649c8d | 2018-01-22 22:23:13 +0000 | [diff] [blame] | 324 | # ==== hiddenapi lists ======================================= |
David Brazdil | 081a589 | 2018-09-06 12:15:11 +0100 | [diff] [blame] | 325 | .KATI_RESTAT: \ |
| 326 | $(INTERNAL_PLATFORM_HIDDENAPI_WHITELIST) \ |
| 327 | $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST) \ |
| 328 | $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST) \ |
| 329 | $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST) |
David Brazdil | 8503b90 | 2018-08-30 13:35:03 +0100 | [diff] [blame] | 330 | $(INTERNAL_PLATFORM_HIDDENAPI_WHITELIST): \ |
| 331 | .KATI_IMPLICIT_OUTPUTS := \ |
| 332 | $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST) \ |
| 333 | $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST) \ |
| 334 | $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST) |
| 335 | $(INTERNAL_PLATFORM_HIDDENAPI_WHITELIST): \ |
| 336 | frameworks/base/tools/hiddenapi/generate_hiddenapi_lists.py \ |
| 337 | frameworks/base/config/hiddenapi-light-greylist.txt \ |
| 338 | frameworks/base/config/hiddenapi-vendor-list.txt \ |
| 339 | frameworks/base/config/hiddenapi-force-blacklist.txt \ |
| 340 | $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST) \ |
| 341 | $(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST) \ |
| 342 | $(INTERNAL_PLATFORM_REMOVED_DEX_API_FILE) |
| 343 | frameworks/base/tools/hiddenapi/generate_hiddenapi_lists.py \ |
| 344 | --input-public $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST) \ |
| 345 | --input-private $(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST) \ |
| 346 | --input-whitelists $(PRIVATE_WHITELIST_INPUTS) \ |
David Brazdil | 4a55eeb | 2018-09-11 11:09:01 +0100 | [diff] [blame] | 347 | --input-greylists \ |
David Brazdil | 8503b90 | 2018-08-30 13:35:03 +0100 | [diff] [blame] | 348 | frameworks/base/config/hiddenapi-light-greylist.txt \ |
| 349 | frameworks/base/config/hiddenapi-vendor-list.txt \ |
| 350 | <(comm -12 <(sort $(INTERNAL_PLATFORM_REMOVED_DEX_API_FILE)) \ |
| 351 | $(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST)) \ |
| 352 | $(PRIVATE_GREYLIST_INPUTS) \ |
| 353 | --input-blacklists frameworks/base/config/hiddenapi-force-blacklist.txt \ |
David Brazdil | 081a589 | 2018-09-06 12:15:11 +0100 | [diff] [blame] | 354 | --output-whitelist $(INTERNAL_PLATFORM_HIDDENAPI_WHITELIST).tmp \ |
| 355 | --output-light-greylist $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST).tmp \ |
| 356 | --output-dark-greylist $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST).tmp \ |
| 357 | --output-blacklist $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST).tmp |
| 358 | $(call commit-change-for-toc,$(INTERNAL_PLATFORM_HIDDENAPI_WHITELIST)) |
| 359 | $(call commit-change-for-toc,$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST)) |
| 360 | $(call commit-change-for-toc,$(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST)) |
| 361 | $(call commit-change-for-toc,$(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST)) |
David Brazdil | 0649c8d | 2018-01-22 22:23:13 +0000 | [diff] [blame] | 362 | |
Bart Sears | a8cc058 | 2015-05-07 03:23:20 +0000 | [diff] [blame] | 363 | # Include subdirectory makefiles |
| 364 | # ============================================================ |
| 365 | |
| 366 | # If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework |
| 367 | # team really wants is to build the stuff defined by this makefile. |
| 368 | ifeq (,$(ONE_SHOT_MAKEFILE)) |
| 369 | include $(call first-makefiles-under,$(LOCAL_PATH)) |
| 370 | endif |
| 371 | |
Holly Jiuyu Sun | bbc8580 | 2017-12-21 18:44:59 -0800 | [diff] [blame] | 372 | endif # ANDROID_BUILD_EMBEDDED |