Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 1 | // Copyright (C) 2019 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | // How stubs are generated: |
| 16 | // |
| 17 | // raw source files --(metalava)--> stub source files --(javac)--> stub jar files |
| 18 | // |
| 19 | // The metalava conversion is done by droidstub modules *-api-stubs-docs. |
| 20 | // The javac compilation is done by java_library modules android_*_stubs_current. |
| 21 | // The metalava conversion is also responsible for creating API signature files |
| 22 | // and comparing them against the last API signature in api/*-current.txt files |
| 23 | // and also against the latest frozen API signature in prebuilts/sdk/*/*/api/android.txt |
| 24 | // files. |
| 25 | |
| 26 | ///////////////////////////////////////////////////////////////////// |
| 27 | // Common metalava configs |
| 28 | ///////////////////////////////////////////////////////////////////// |
| 29 | |
| 30 | packages_to_document = [ |
| 31 | "android", |
| 32 | "dalvik", |
| 33 | "java", |
| 34 | "javax", |
| 35 | "junit", |
| 36 | "org.apache.http", |
| 37 | "org.json", |
| 38 | "org.w3c.dom", |
| 39 | "org.xml.sax", |
| 40 | "org.xmlpull", |
| 41 | ] |
| 42 | |
| 43 | stubs_defaults { |
Anton Hansson | 537564e | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 44 | name: "metalava-base-api-stubs-default", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 45 | srcs: [ |
| 46 | ":framework-non-updatable-sources", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 47 | "core/java/**/*.logtags", |
| 48 | ":opt-telephony-srcs", |
| 49 | ":opt-net-voip-srcs", |
Paul Duffin | 404b26a | 2020-09-16 14:26:47 +0100 | [diff] [blame] | 50 | ":art.module.public.api{.public.stubs.source}", |
Paul Duffin | 5c89e70 | 2020-03-26 15:33:48 +0000 | [diff] [blame] | 51 | ":android_icu4j_public_api_files", |
Ramy Medhat | aaa8386 | 2020-05-04 05:54:30 -0400 | [diff] [blame] | 52 | "**/package.html", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 53 | ], |
Chen Xu | 546ce5e | 2020-01-10 08:38:31 -0800 | [diff] [blame] | 54 | // TODO(b/147699819): remove below aidl includes. |
| 55 | aidl: { |
| 56 | local_include_dirs: ["telephony/java"], |
| 57 | }, |
Jiyong Park | c0f8a28 | 2020-09-29 13:43:00 +0900 | [diff] [blame] | 58 | // These are libs from framework-internal-utils that are required (i.e. being referenced) |
| 59 | // from framework-non-updatable-sources. Add more here when there's a need. |
| 60 | // DO NOT add the entire framework-internal-utils. It might cause unnecessary circular |
| 61 | // dependencies gets bigger. |
| 62 | libs: [ |
| 63 | "android.hardware.cas-V1.2-java", |
| 64 | "android.hardware.health-V1.0-java-constants", |
| 65 | "android.hardware.radio-V1.5-java", |
| 66 | "android.hardware.thermal-V1.0-java-constants", |
| 67 | "android.hardware.thermal-V2.0-java", |
| 68 | "android.hardware.tv.input-V1.0-java-constants", |
| 69 | "android.hardware.tv.tuner-V1.0-java-constants", |
| 70 | "android.hardware.usb-V1.0-java-constants", |
| 71 | "android.hardware.usb-V1.1-java-constants", |
| 72 | "android.hardware.usb.gadget-V1.0-java", |
| 73 | "android.hardware.vibrator-V1.3-java", |
| 74 | "framework-protos", |
| 75 | ], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 76 | installable: false, |
| 77 | annotations_enabled: true, |
Anton Hansson | f68ddea | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 78 | previous_api: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 79 | merge_annotations_dirs: [ |
| 80 | "metalava-manual", |
| 81 | ], |
Aurimas Liutikas | 94bac9c | 2020-03-12 17:06:12 -0700 | [diff] [blame] | 82 | api_levels_annotations_enabled: false, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 83 | filter_packages: packages_to_document, |
| 84 | } |
| 85 | |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 86 | stubs_defaults { |
Anton Hansson | 537564e | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 87 | name: "metalava-full-api-stubs-default", |
| 88 | defaults: ["metalava-base-api-stubs-default"], |
Anton Hansson | e01390c | 2020-05-07 12:06:00 +0100 | [diff] [blame] | 89 | srcs: [ |
Paul Duffin | e55d4e3 | 2020-05-14 17:55:46 +0100 | [diff] [blame] | 90 | ":conscrypt.module.public.api{.public.stubs.source}", |
Anton Hansson | e01390c | 2020-05-07 12:06:00 +0100 | [diff] [blame] | 91 | ":framework-updatable-sources", |
| 92 | ], |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 93 | sdk_version: "core_platform", |
| 94 | } |
| 95 | |
Anton Hansson | 537564e | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 96 | stubs_defaults { |
| 97 | name: "metalava-non-updatable-api-stubs-default", |
| 98 | defaults: ["metalava-base-api-stubs-default"], |
Anton Hansson | e53bec0 | 2020-03-20 09:12:52 +0000 | [diff] [blame] | 99 | sdk_version: "core_platform", |
Anton Hansson | ebb26a3 | 2020-04-14 16:35:36 +0100 | [diff] [blame] | 100 | // There are a few classes from modules used as type arguments that |
| 101 | // need to be resolved by metalava. For now, we can use a previously |
| 102 | // finalized stub library to resolve them. If a new class gets added, |
| 103 | // this may be need to be revisited to use a manually maintained stub |
| 104 | // library with empty classes in order to resolve those references. |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 105 | libs: ["sdk_system_30_android"], |
Anton Hansson | ebb26a3 | 2020-04-14 16:35:36 +0100 | [diff] [blame] | 106 | aidl: { |
Anton Hansson | 394febc | 2020-04-14 16:35:36 +0100 | [diff] [blame] | 107 | local_include_dirs: ["apex/media/aidl/stable"], |
Anton Hansson | ebb26a3 | 2020-04-14 16:35:36 +0100 | [diff] [blame] | 108 | }, |
Anton Hansson | 537564e | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 109 | } |
| 110 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 111 | ///////////////////////////////////////////////////////////////////// |
| 112 | // *-api-stubs-docs modules providing source files for the stub libraries |
| 113 | ///////////////////////////////////////////////////////////////////// |
| 114 | |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 115 | // api-stubs-docs, system-api-stubs-docs, and test-api-stubs-docs have APIs |
| 116 | // from the non-updatable part of the platform as well as from the updatable |
| 117 | // modules |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 118 | droidstubs { |
| 119 | name: "api-stubs-docs", |
Anton Hansson | 537564e | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 120 | defaults: ["metalava-full-api-stubs-default"], |
Artur Satayev | 0a97d5e | 2020-03-25 16:45:56 +0000 | [diff] [blame] | 121 | removed_dex_api_filename: "removed-dex.txt", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 122 | arg_files: [ |
| 123 | "core/res/AndroidManifest.xml", |
| 124 | ], |
| 125 | args: metalava_framework_docs_args, |
| 126 | check_api: { |
| 127 | current: { |
| 128 | api_file: "api/current.txt", |
| 129 | removed_api_file: "api/removed.txt", |
| 130 | }, |
| 131 | last_released: { |
Anton Hansson | f68ddea | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 132 | api_file: ":android.api.public.latest", |
Anton Hansson | 960c675 | 2020-05-02 18:00:30 +0100 | [diff] [blame] | 133 | removed_api_file: ":removed.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 134 | baseline_file: ":public-api-incompatibilities-with-last-released", |
| 135 | }, |
| 136 | api_lint: { |
| 137 | enabled: true, |
Anton Hansson | f68ddea | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 138 | new_since: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 139 | baseline_file: "api/lint-baseline.txt", |
| 140 | }, |
| 141 | }, |
Anton Hansson | ba367d3 | 2020-03-23 18:08:55 +0000 | [diff] [blame] | 142 | dist: { |
| 143 | targets: ["sdk", "win_sdk"], |
| 144 | dir: "apistubs/android/public/api", |
| 145 | dest: "android.txt", |
| 146 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 147 | jdiff_enabled: true, |
| 148 | } |
| 149 | |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 150 | droidstubs { |
| 151 | name: "api-stubs-docs-non-updatable", |
| 152 | defaults: ["metalava-non-updatable-api-stubs-default"], |
| 153 | arg_files: ["core/res/AndroidManifest.xml"], |
| 154 | args: metalava_framework_docs_args, |
| 155 | check_api: { |
| 156 | current: { |
| 157 | api_file: "non-updatable-api/current.txt", |
| 158 | removed_api_file: "non-updatable-api/removed.txt", |
| 159 | }, |
Anton Hansson | 3258a47 | 2020-10-05 16:23:27 +0100 | [diff] [blame] | 160 | last_released: { |
| 161 | api_file: ":android-non-updatable.api.public.latest", |
| 162 | removed_api_file: ":android-non-updatable-removed.api.public.latest", |
| 163 | baseline_file: ":public-api-incompatibilities-with-last-released", |
| 164 | }, |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 165 | api_lint: { |
| 166 | enabled: true, |
| 167 | new_since: ":android-non-updatable.api.public.latest", |
| 168 | }, |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 169 | }, |
| 170 | } |
| 171 | |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 172 | priv_apps = " " + |
| 173 | "--show-annotation android.annotation.SystemApi\\(" + |
| 174 | "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + |
| 175 | "\\) " |
| 176 | |
| 177 | module_libs = " " + |
| 178 | " --show-annotation android.annotation.SystemApi\\(" + |
| 179 | "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" + |
Makoto Onuki | a13287f | 2020-07-10 12:05:21 -0700 | [diff] [blame] | 180 | "\\)" + |
| 181 | " --show-for-stub-purposes-annotation android.annotation.SystemApi\\(" + |
| 182 | "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 183 | "\\) " |
| 184 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 185 | droidstubs { |
| 186 | name: "system-api-stubs-docs", |
Anton Hansson | 537564e | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 187 | defaults: ["metalava-full-api-stubs-default"], |
Artur Satayev | 0a97d5e | 2020-03-25 16:45:56 +0000 | [diff] [blame] | 188 | removed_dex_api_filename: "system-removed-dex.txt", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 189 | arg_files: [ |
| 190 | "core/res/AndroidManifest.xml", |
| 191 | ], |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 192 | args: metalava_framework_docs_args + priv_apps, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 193 | check_api: { |
| 194 | current: { |
| 195 | api_file: "api/system-current.txt", |
| 196 | removed_api_file: "api/system-removed.txt", |
| 197 | }, |
| 198 | last_released: { |
Anton Hansson | f68ddea | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 199 | api_file: ":android.api.system.latest", |
Anton Hansson | 960c675 | 2020-05-02 18:00:30 +0100 | [diff] [blame] | 200 | removed_api_file: ":removed.api.system.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 201 | baseline_file: ":system-api-incompatibilities-with-last-released" |
| 202 | }, |
| 203 | api_lint: { |
| 204 | enabled: true, |
Anton Hansson | f68ddea | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 205 | new_since: ":android.api.system.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 206 | baseline_file: "api/system-lint-baseline.txt", |
| 207 | }, |
| 208 | }, |
Anton Hansson | ba367d3 | 2020-03-23 18:08:55 +0000 | [diff] [blame] | 209 | dist: { |
| 210 | targets: ["sdk", "win_sdk"], |
| 211 | dir: "apistubs/android/system/api", |
| 212 | dest: "android.txt", |
| 213 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 214 | jdiff_enabled: true, |
| 215 | } |
| 216 | |
| 217 | droidstubs { |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 218 | name: "system-api-stubs-docs-non-updatable", |
| 219 | defaults: ["metalava-non-updatable-api-stubs-default"], |
| 220 | arg_files: ["core/res/AndroidManifest.xml"], |
| 221 | args: metalava_framework_docs_args + priv_apps, |
| 222 | check_api: { |
| 223 | current: { |
| 224 | api_file: "non-updatable-api/system-current.txt", |
| 225 | removed_api_file: "non-updatable-api/system-removed.txt", |
| 226 | }, |
Anton Hansson | 3258a47 | 2020-10-05 16:23:27 +0100 | [diff] [blame] | 227 | last_released: { |
| 228 | api_file: ":android-non-updatable.api.system.latest", |
| 229 | removed_api_file: ":android-non-updatable-removed.api.system.latest", |
| 230 | baseline_file: ":system-api-incompatibilities-with-last-released" |
| 231 | }, |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 232 | api_lint: { |
| 233 | enabled: true, |
| 234 | new_since: ":android-non-updatable.api.system.latest", |
| 235 | baseline_file: "non-updatable-api/system-lint-baseline.txt", |
| 236 | }, |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 237 | }, |
| 238 | } |
| 239 | |
| 240 | droidstubs { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 241 | name: "test-api-stubs-docs", |
Anton Hansson | 537564e | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 242 | defaults: ["metalava-full-api-stubs-default"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 243 | arg_files: [ |
| 244 | "core/res/AndroidManifest.xml", |
| 245 | ], |
| 246 | args: metalava_framework_docs_args + " --show-annotation android.annotation.TestApi", |
| 247 | check_api: { |
| 248 | current: { |
| 249 | api_file: "api/test-current.txt", |
| 250 | removed_api_file: "api/test-removed.txt", |
| 251 | }, |
| 252 | api_lint: { |
| 253 | enabled: true, |
| 254 | baseline_file: "api/test-lint-baseline.txt", |
| 255 | }, |
| 256 | }, |
Anton Hansson | ba367d3 | 2020-03-23 18:08:55 +0000 | [diff] [blame] | 257 | dist: { |
| 258 | targets: ["sdk", "win_sdk"], |
| 259 | dir: "apistubs/android/test/api", |
| 260 | dest: "android.txt", |
| 261 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 262 | } |
| 263 | |
| 264 | ///////////////////////////////////////////////////////////////////// |
Makoto Onuki | a13287f | 2020-07-10 12:05:21 -0700 | [diff] [blame] | 265 | // Following droidstubs modules are for extra APIs for modules, |
| 266 | // namely @SystemApi(client=MODULE_LIBRARIES) APIs. |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 267 | ///////////////////////////////////////////////////////////////////// |
| 268 | |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 269 | droidstubs { |
| 270 | name: "module-lib-api", |
Anton Hansson | 537564e | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 271 | defaults: ["metalava-full-api-stubs-default"], |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 272 | arg_files: ["core/res/AndroidManifest.xml"], |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 273 | args: metalava_framework_docs_args + module_libs, |
Paul Duffin | 4c5dc18 | 2020-04-08 18:28:15 +0100 | [diff] [blame] | 274 | |
| 275 | // Do not generate stubs as they are not needed |
| 276 | generate_stubs: false, |
| 277 | |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 278 | check_api: { |
| 279 | current: { |
| 280 | api_file: "api/module-lib-current.txt", |
| 281 | removed_api_file: "api/module-lib-removed.txt", |
| 282 | }, |
Anton Hansson | 626afea | 2020-02-11 14:36:40 +0000 | [diff] [blame] | 283 | last_released: { |
Anton Hansson | f68ddea | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 284 | api_file: ":android.api.module-lib.latest", |
Anton Hansson | 960c675 | 2020-05-02 18:00:30 +0100 | [diff] [blame] | 285 | removed_api_file: ":removed.api.module-lib.latest", |
Anton Hansson | 626afea | 2020-02-11 14:36:40 +0000 | [diff] [blame] | 286 | baseline_file: ":module-lib-api-incompatibilities-with-last-released" |
| 287 | }, |
| 288 | api_lint: { |
| 289 | enabled: true, |
Anton Hansson | f68ddea | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 290 | new_since: ":android.api.module-lib.latest", |
Anton Hansson | 626afea | 2020-02-11 14:36:40 +0000 | [diff] [blame] | 291 | baseline_file: "api/module-lib-lint-baseline.txt", |
| 292 | }, |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 293 | }, |
Anton Hansson | ba367d3 | 2020-03-23 18:08:55 +0000 | [diff] [blame] | 294 | dist: { |
| 295 | targets: ["sdk", "win_sdk"], |
| 296 | dir: "apistubs/android/module-lib/api", |
| 297 | dest: "android.txt", |
| 298 | }, |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 299 | } |
| 300 | |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 301 | droidstubs { |
| 302 | name: "module-lib-api-stubs-docs-non-updatable", |
| 303 | defaults: ["metalava-non-updatable-api-stubs-default"], |
| 304 | arg_files: ["core/res/AndroidManifest.xml"], |
Makoto Onuki | 8c61de6 | 2020-07-15 10:38:04 -0700 | [diff] [blame] | 305 | args: metalava_framework_docs_args + priv_apps + module_libs, |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 306 | check_api: { |
| 307 | current: { |
| 308 | api_file: "non-updatable-api/module-lib-current.txt", |
| 309 | removed_api_file: "non-updatable-api/module-lib-removed.txt", |
| 310 | }, |
Anton Hansson | c3ef1f56 | 2020-10-07 14:55:36 +0100 | [diff] [blame] | 311 | last_released: { |
| 312 | api_file: ":android-non-updatable.api.module-lib.latest", |
| 313 | removed_api_file: ":android-non-updatable-removed.api.module-lib.latest", |
| 314 | }, |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 315 | api_lint: { |
| 316 | enabled: true, |
| 317 | new_since: ":android-non-updatable.api.module-lib.latest", |
| 318 | }, |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 319 | }, |
| 320 | } |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 321 | |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 322 | ///////////////////////////////////////////////////////////////////// |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 323 | // android_*_stubs_current modules are the stubs libraries compiled |
| 324 | // from *-api-stubs-docs |
| 325 | ///////////////////////////////////////////////////////////////////// |
| 326 | |
| 327 | java_defaults { |
Anton Hansson | fbd32f3 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 328 | name: "android_defaults_stubs_current", |
Anton Hansson | 42afd61 | 2020-02-08 20:43:19 +0000 | [diff] [blame] | 329 | libs: [ "stub-annotations" ], |
Paul Duffin | a281e92 | 2020-03-25 10:13:33 +0000 | [diff] [blame] | 330 | static_libs: [ |
Paul Duffin | a281e92 | 2020-03-25 10:13:33 +0000 | [diff] [blame] | 331 | // License notices from art module |
| 332 | "art-notices-for-framework-stubs-jar", |
Anton Hansson | cf42e98 | 2020-08-13 19:40:13 +0100 | [diff] [blame] | 333 | "framework-res-package-jar", // Export package of framework-res |
Paul Duffin | a281e92 | 2020-03-25 10:13:33 +0000 | [diff] [blame] | 334 | ], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 335 | errorprone: { |
| 336 | javacflags: [ |
| 337 | "-XepDisableAllChecks", |
| 338 | ], |
| 339 | }, |
Anton Hansson | fbd32f3 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 340 | sdk_version: "none", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 341 | system_modules: "none", |
| 342 | java_version: "1.8", |
| 343 | compile_dex: true, |
| 344 | } |
| 345 | |
Anton Hansson | a920550 | 2020-07-15 13:36:34 +0100 | [diff] [blame] | 346 | java_defaults { |
| 347 | name: "android_stubs_dists_default", |
| 348 | dist: { |
| 349 | targets: ["sdk", "win_sdk"], |
| 350 | tag: ".jar", |
| 351 | dest: "android.jar", |
| 352 | }, |
| 353 | } |
| 354 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 355 | java_library_static { |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 356 | name: "android_monolith_stubs_current", |
Anton Hansson | 42afd61 | 2020-02-08 20:43:19 +0000 | [diff] [blame] | 357 | srcs: [ ":api-stubs-docs" ], |
Anton Hansson | f330f3a | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 358 | static_libs: [ "private-stub-annotations-jar" ], |
Anton Hansson | fbd32f3 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 359 | defaults: ["android_defaults_stubs_current"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 360 | } |
| 361 | |
| 362 | java_library_static { |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 363 | name: "android_merged_stubs_current", |
| 364 | srcs: [ ":api-stubs-docs-non-updatable" ], |
| 365 | static_libs: [ |
| 366 | "conscrypt.module.public.api.stubs", |
Paul Duffin | abebc6a | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 367 | "framework-media.stubs", |
| 368 | "framework-mediaprovider.stubs", |
| 369 | "framework-permission.stubs", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 370 | "framework-sdkextensions.stubs", |
Paul Duffin | abebc6a | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 371 | "framework-statsd.stubs", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 372 | "framework-tethering.stubs", |
Paul Duffin | abebc6a | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 373 | "framework-wifi.stubs", |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 374 | "private-stub-annotations-jar", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 375 | ], |
| 376 | defaults: ["android_defaults_stubs_current"], |
| 377 | } |
| 378 | |
| 379 | java_library_static { |
| 380 | name: "android_stubs_current", |
| 381 | static_libs: ["android_merged_stubs_current"], |
| 382 | defaults: ["android_defaults_stubs_current"], |
| 383 | } |
| 384 | |
| 385 | java_library_static { |
| 386 | name: "android_system_monolith_stubs_current", |
Anton Hansson | 42afd61 | 2020-02-08 20:43:19 +0000 | [diff] [blame] | 387 | srcs: [ ":system-api-stubs-docs" ], |
Anton Hansson | f330f3a | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 388 | static_libs: [ "private-stub-annotations-jar" ], |
Anton Hansson | a920550 | 2020-07-15 13:36:34 +0100 | [diff] [blame] | 389 | defaults: [ |
| 390 | "android_defaults_stubs_current", |
| 391 | "android_stubs_dists_default", |
| 392 | ], |
| 393 | dist: { |
| 394 | dir: "apistubs/android/system", |
| 395 | }, |
| 396 | dists: [ |
| 397 | { |
| 398 | // Legacy dist path |
| 399 | targets: ["sdk", "win_sdk"], |
| 400 | tag: ".jar", |
| 401 | dest: "android_system.jar", |
| 402 | }, |
| 403 | ], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 404 | } |
| 405 | |
| 406 | java_library_static { |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 407 | name: "android_system_merged_stubs_current", |
| 408 | srcs: [ ":system-api-stubs-docs-non-updatable" ], |
| 409 | static_libs: [ |
| 410 | "conscrypt.module.public.api.stubs", |
Paul Duffin | abebc6a | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 411 | "framework-media.stubs.system", |
| 412 | "framework-mediaprovider.stubs.system", |
| 413 | "framework-permission.stubs.system", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 414 | "framework-sdkextensions.stubs.system", |
Paul Duffin | abebc6a | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 415 | "framework-statsd.stubs.system", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 416 | "framework-tethering.stubs.system", |
Paul Duffin | abebc6a | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 417 | "framework-wifi.stubs.system", |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 418 | "private-stub-annotations-jar", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 419 | ], |
| 420 | defaults: ["android_defaults_stubs_current"], |
| 421 | } |
| 422 | |
| 423 | java_library_static { |
| 424 | name: "android_system_stubs_current", |
| 425 | static_libs: ["android_system_merged_stubs_current"], |
| 426 | defaults: ["android_defaults_stubs_current"], |
| 427 | } |
| 428 | |
| 429 | java_library_static { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 430 | name: "android_test_stubs_current", |
Anton Hansson | 42afd61 | 2020-02-08 20:43:19 +0000 | [diff] [blame] | 431 | srcs: [ ":test-api-stubs-docs" ], |
Anton Hansson | f330f3a | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 432 | static_libs: [ "private-stub-annotations-jar" ], |
Anton Hansson | a920550 | 2020-07-15 13:36:34 +0100 | [diff] [blame] | 433 | defaults: [ |
| 434 | "android_defaults_stubs_current", |
| 435 | "android_stubs_dists_default", |
| 436 | ], |
| 437 | dist: { |
| 438 | dir: "apistubs/android/test", |
| 439 | }, |
| 440 | dists: [ |
| 441 | { |
| 442 | // Legacy dist path |
| 443 | targets: ["sdk", "win_sdk"], |
| 444 | tag: ".jar", |
| 445 | dest: "android_test.jar", |
| 446 | }, |
| 447 | ], |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 448 | } |
| 449 | |
| 450 | java_library_static { |
Anton Hansson | 9c4bbe9 | 2020-01-30 12:09:02 +0000 | [diff] [blame] | 451 | name: "android_module_lib_stubs_current", |
Makoto Onuki | 8c61de6 | 2020-07-15 10:38:04 -0700 | [diff] [blame] | 452 | srcs: [ ":module-lib-api-stubs-docs-non-updatable" ], |
Anton Hansson | a920550 | 2020-07-15 13:36:34 +0100 | [diff] [blame] | 453 | defaults: [ |
| 454 | "android_defaults_stubs_current", |
| 455 | "android_stubs_dists_default", |
| 456 | ], |
Anton Hansson | ebb26a3 | 2020-04-14 16:35:36 +0100 | [diff] [blame] | 457 | libs: ["sdk_system_29_android"], |
Anton Hansson | a920550 | 2020-07-15 13:36:34 +0100 | [diff] [blame] | 458 | dist: { |
| 459 | dir: "apistubs/android/module-lib", |
| 460 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 461 | } |
| 462 | |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 463 | java_library_static { |
| 464 | name: "android_non_updatable_stubs_current", |
| 465 | srcs: [":api-stubs-docs-non-updatable"], |
| 466 | defaults: ["android_defaults_stubs_current"], |
| 467 | libs: ["sdk_system_29_android"], |
| 468 | } |
| 469 | |
| 470 | java_library_static { |
| 471 | name: "android_system_non_updatable_stubs_current", |
| 472 | srcs: [":system-api-stubs-docs-non-updatable"], |
| 473 | defaults: ["android_defaults_stubs_current"], |
| 474 | libs: ["sdk_system_29_android"], |
| 475 | } |
| 476 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 477 | ///////////////////////////////////////////////////////////////////// |
| 478 | // hwbinder.stubs provides APIs required for building HIDL Java |
| 479 | // libraries. |
| 480 | ///////////////////////////////////////////////////////////////////// |
| 481 | |
| 482 | droidstubs { |
| 483 | name: "hwbinder-stubs-docs", |
| 484 | srcs: [ |
| 485 | "core/java/android/os/HidlSupport.java", |
| 486 | "core/java/android/annotation/IntDef.java", |
| 487 | "core/java/android/annotation/IntRange.java", |
| 488 | "core/java/android/annotation/NonNull.java", |
| 489 | "core/java/android/annotation/SystemApi.java", |
| 490 | "core/java/android/os/HidlMemory.java", |
| 491 | "core/java/android/os/HwBinder.java", |
| 492 | "core/java/android/os/HwBlob.java", |
| 493 | "core/java/android/os/HwParcel.java", |
| 494 | "core/java/android/os/IHwBinder.java", |
| 495 | "core/java/android/os/IHwInterface.java", |
| 496 | "core/java/android/os/DeadObjectException.java", |
| 497 | "core/java/android/os/DeadSystemException.java", |
| 498 | "core/java/android/os/NativeHandle.java", |
| 499 | "core/java/android/os/RemoteException.java", |
| 500 | "core/java/android/util/AndroidException.java", |
| 501 | ], |
| 502 | installable: false, |
| 503 | sdk_version: "core_platform", |
| 504 | annotations_enabled: true, |
Anton Hansson | f68ddea | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 505 | previous_api: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 506 | merge_annotations_dirs: [ |
| 507 | "metalava-manual", |
| 508 | ], |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 509 | args: priv_apps, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 510 | } |
| 511 | |
| 512 | java_library_static { |
| 513 | name: "hwbinder.stubs", |
| 514 | sdk_version: "core_current", |
| 515 | srcs: [ |
| 516 | ":hwbinder-stubs-docs", |
| 517 | ], |
| 518 | } |