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 | ], |
Anton Hansson | 3514689 | 2020-10-26 10:27:57 +0000 | [diff] [blame] | 76 | high_mem: true, // Lots of sources => high memory use, see b/170701554 |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 77 | installable: false, |
| 78 | annotations_enabled: true, |
Anton Hansson | f68ddea | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 79 | previous_api: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 80 | merge_annotations_dirs: [ |
| 81 | "metalava-manual", |
| 82 | ], |
Aurimas Liutikas | 94bac9c | 2020-03-12 17:06:12 -0700 | [diff] [blame] | 83 | api_levels_annotations_enabled: false, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 84 | filter_packages: packages_to_document, |
| 85 | } |
| 86 | |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 87 | stubs_defaults { |
Anton Hansson | 537564e | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 88 | name: "metalava-full-api-stubs-default", |
| 89 | defaults: ["metalava-base-api-stubs-default"], |
Anton Hansson | e01390c | 2020-05-07 12:06:00 +0100 | [diff] [blame] | 90 | srcs: [ |
Paul Duffin | e55d4e3 | 2020-05-14 17:55:46 +0100 | [diff] [blame] | 91 | ":conscrypt.module.public.api{.public.stubs.source}", |
Anton Hansson | e01390c | 2020-05-07 12:06:00 +0100 | [diff] [blame] | 92 | ":framework-updatable-sources", |
| 93 | ], |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 94 | sdk_version: "core_platform", |
| 95 | } |
| 96 | |
Anton Hansson | 537564e | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 97 | stubs_defaults { |
| 98 | name: "metalava-non-updatable-api-stubs-default", |
| 99 | defaults: ["metalava-base-api-stubs-default"], |
Anton Hansson | e53bec0 | 2020-03-20 09:12:52 +0000 | [diff] [blame] | 100 | sdk_version: "core_platform", |
Anton Hansson | ebb26a3 | 2020-04-14 16:35:36 +0100 | [diff] [blame] | 101 | // There are a few classes from modules used as type arguments that |
| 102 | // need to be resolved by metalava. For now, we can use a previously |
| 103 | // finalized stub library to resolve them. If a new class gets added, |
| 104 | // this may be need to be revisited to use a manually maintained stub |
| 105 | // library with empty classes in order to resolve those references. |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 106 | libs: ["sdk_system_30_android"], |
Anton Hansson | ebb26a3 | 2020-04-14 16:35:36 +0100 | [diff] [blame] | 107 | aidl: { |
Anton Hansson | 394febc | 2020-04-14 16:35:36 +0100 | [diff] [blame] | 108 | local_include_dirs: ["apex/media/aidl/stable"], |
Anton Hansson | ebb26a3 | 2020-04-14 16:35:36 +0100 | [diff] [blame] | 109 | }, |
Anton Hansson | 537564e | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 110 | } |
| 111 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 112 | ///////////////////////////////////////////////////////////////////// |
| 113 | // *-api-stubs-docs modules providing source files for the stub libraries |
| 114 | ///////////////////////////////////////////////////////////////////// |
| 115 | |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 116 | // api-stubs-docs, system-api-stubs-docs, and test-api-stubs-docs have APIs |
| 117 | // from the non-updatable part of the platform as well as from the updatable |
| 118 | // modules |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 119 | droidstubs { |
| 120 | name: "api-stubs-docs", |
Anton Hansson | 537564e | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 121 | defaults: ["metalava-full-api-stubs-default"], |
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 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 142 | } |
| 143 | |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 144 | droidstubs { |
| 145 | name: "api-stubs-docs-non-updatable", |
| 146 | defaults: ["metalava-non-updatable-api-stubs-default"], |
| 147 | arg_files: ["core/res/AndroidManifest.xml"], |
| 148 | args: metalava_framework_docs_args, |
| 149 | check_api: { |
| 150 | current: { |
Anton Hansson | 7bfceb8 | 2020-10-29 18:59:10 +0000 | [diff] [blame] | 151 | api_file: "core/api/current.txt", |
| 152 | removed_api_file: "core/api/removed.txt", |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 153 | }, |
Anton Hansson | 3258a47 | 2020-10-05 16:23:27 +0100 | [diff] [blame] | 154 | last_released: { |
| 155 | api_file: ":android-non-updatable.api.public.latest", |
| 156 | removed_api_file: ":android-non-updatable-removed.api.public.latest", |
| 157 | baseline_file: ":public-api-incompatibilities-with-last-released", |
| 158 | }, |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 159 | api_lint: { |
| 160 | enabled: true, |
| 161 | new_since: ":android-non-updatable.api.public.latest", |
| 162 | }, |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 163 | }, |
| 164 | } |
| 165 | |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 166 | priv_apps = " " + |
| 167 | "--show-annotation android.annotation.SystemApi\\(" + |
| 168 | "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + |
| 169 | "\\) " |
| 170 | |
| 171 | module_libs = " " + |
| 172 | " --show-annotation android.annotation.SystemApi\\(" + |
| 173 | "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" + |
Makoto Onuki | a13287f | 2020-07-10 12:05:21 -0700 | [diff] [blame] | 174 | "\\)" + |
| 175 | " --show-for-stub-purposes-annotation android.annotation.SystemApi\\(" + |
| 176 | "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 177 | "\\) " |
| 178 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 179 | droidstubs { |
| 180 | name: "system-api-stubs-docs", |
Anton Hansson | 537564e | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 181 | defaults: ["metalava-full-api-stubs-default"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 182 | arg_files: [ |
| 183 | "core/res/AndroidManifest.xml", |
| 184 | ], |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 185 | args: metalava_framework_docs_args + priv_apps, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 186 | check_api: { |
| 187 | current: { |
| 188 | api_file: "api/system-current.txt", |
| 189 | removed_api_file: "api/system-removed.txt", |
| 190 | }, |
| 191 | last_released: { |
Anton Hansson | f68ddea | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 192 | api_file: ":android.api.system.latest", |
Anton Hansson | 960c675 | 2020-05-02 18:00:30 +0100 | [diff] [blame] | 193 | removed_api_file: ":removed.api.system.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 194 | baseline_file: ":system-api-incompatibilities-with-last-released" |
| 195 | }, |
| 196 | api_lint: { |
| 197 | enabled: true, |
Anton Hansson | f68ddea | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 198 | new_since: ":android.api.system.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 199 | baseline_file: "api/system-lint-baseline.txt", |
| 200 | }, |
| 201 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 202 | } |
| 203 | |
| 204 | droidstubs { |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 205 | name: "system-api-stubs-docs-non-updatable", |
| 206 | defaults: ["metalava-non-updatable-api-stubs-default"], |
| 207 | arg_files: ["core/res/AndroidManifest.xml"], |
| 208 | args: metalava_framework_docs_args + priv_apps, |
| 209 | check_api: { |
| 210 | current: { |
Anton Hansson | 7bfceb8 | 2020-10-29 18:59:10 +0000 | [diff] [blame] | 211 | api_file: "core/api/system-current.txt", |
| 212 | removed_api_file: "core/api/system-removed.txt", |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 213 | }, |
Anton Hansson | 3258a47 | 2020-10-05 16:23:27 +0100 | [diff] [blame] | 214 | last_released: { |
| 215 | api_file: ":android-non-updatable.api.system.latest", |
| 216 | removed_api_file: ":android-non-updatable-removed.api.system.latest", |
| 217 | baseline_file: ":system-api-incompatibilities-with-last-released" |
| 218 | }, |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 219 | api_lint: { |
| 220 | enabled: true, |
| 221 | new_since: ":android-non-updatable.api.system.latest", |
Anton Hansson | 7bfceb8 | 2020-10-29 18:59:10 +0000 | [diff] [blame] | 222 | baseline_file: "core/api/system-lint-baseline.txt", |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 223 | }, |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 224 | }, |
| 225 | } |
| 226 | |
| 227 | droidstubs { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 228 | name: "test-api-stubs-docs", |
Anton Hansson | 7110ae7 | 2020-10-15 17:23:35 +0100 | [diff] [blame] | 229 | defaults: ["metalava-non-updatable-api-stubs-default"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 230 | arg_files: [ |
| 231 | "core/res/AndroidManifest.xml", |
| 232 | ], |
Anton Hansson | 84ffba2 | 2020-10-09 10:13:51 +0100 | [diff] [blame] | 233 | args: metalava_framework_docs_args |
| 234 | + " --show-annotation android.annotation.TestApi" |
| 235 | + " --show-for-stub-purposes-annotation android.annotation.SystemApi\\(" |
| 236 | + "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" |
| 237 | + "\\)", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 238 | check_api: { |
| 239 | current: { |
| 240 | api_file: "api/test-current.txt", |
| 241 | removed_api_file: "api/test-removed.txt", |
| 242 | }, |
| 243 | api_lint: { |
| 244 | enabled: true, |
| 245 | baseline_file: "api/test-lint-baseline.txt", |
| 246 | }, |
| 247 | }, |
Anton Hansson | ba367d3 | 2020-03-23 18:08:55 +0000 | [diff] [blame] | 248 | dist: { |
| 249 | targets: ["sdk", "win_sdk"], |
| 250 | dir: "apistubs/android/test/api", |
| 251 | dest: "android.txt", |
| 252 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 253 | } |
| 254 | |
| 255 | ///////////////////////////////////////////////////////////////////// |
Anton Hansson | 43cc8bf | 2020-10-29 18:56:10 +0000 | [diff] [blame] | 256 | // Following droidstub module for extra APIs for modules, |
Makoto Onuki | a13287f | 2020-07-10 12:05:21 -0700 | [diff] [blame] | 257 | // namely @SystemApi(client=MODULE_LIBRARIES) APIs. |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 258 | ///////////////////////////////////////////////////////////////////// |
| 259 | |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 260 | droidstubs { |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 261 | name: "module-lib-api-stubs-docs-non-updatable", |
| 262 | defaults: ["metalava-non-updatable-api-stubs-default"], |
| 263 | arg_files: ["core/res/AndroidManifest.xml"], |
Makoto Onuki | 8c61de6 | 2020-07-15 10:38:04 -0700 | [diff] [blame] | 264 | args: metalava_framework_docs_args + priv_apps + module_libs, |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 265 | check_api: { |
| 266 | current: { |
Anton Hansson | 7bfceb8 | 2020-10-29 18:59:10 +0000 | [diff] [blame] | 267 | api_file: "core/api/module-lib-current.txt", |
| 268 | removed_api_file: "core/api/module-lib-removed.txt", |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 269 | }, |
Anton Hansson | c3ef1f56 | 2020-10-07 14:55:36 +0100 | [diff] [blame] | 270 | last_released: { |
| 271 | api_file: ":android-non-updatable.api.module-lib.latest", |
| 272 | removed_api_file: ":android-non-updatable-removed.api.module-lib.latest", |
| 273 | }, |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 274 | api_lint: { |
| 275 | enabled: true, |
| 276 | new_since: ":android-non-updatable.api.module-lib.latest", |
| 277 | }, |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 278 | }, |
| 279 | } |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 280 | |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 281 | ///////////////////////////////////////////////////////////////////// |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 282 | // android_*_stubs_current modules are the stubs libraries compiled |
| 283 | // from *-api-stubs-docs |
| 284 | ///////////////////////////////////////////////////////////////////// |
| 285 | |
| 286 | java_defaults { |
Anton Hansson | fbd32f3 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 287 | name: "android_defaults_stubs_current", |
Anton Hansson | 42afd61 | 2020-02-08 20:43:19 +0000 | [diff] [blame] | 288 | libs: [ "stub-annotations" ], |
Paul Duffin | a281e92 | 2020-03-25 10:13:33 +0000 | [diff] [blame] | 289 | static_libs: [ |
Paul Duffin | a281e92 | 2020-03-25 10:13:33 +0000 | [diff] [blame] | 290 | // License notices from art module |
| 291 | "art-notices-for-framework-stubs-jar", |
Anton Hansson | cf42e98 | 2020-08-13 19:40:13 +0100 | [diff] [blame] | 292 | "framework-res-package-jar", // Export package of framework-res |
Paul Duffin | a281e92 | 2020-03-25 10:13:33 +0000 | [diff] [blame] | 293 | ], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 294 | errorprone: { |
| 295 | javacflags: [ |
| 296 | "-XepDisableAllChecks", |
| 297 | ], |
| 298 | }, |
Anton Hansson | fbd32f3 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 299 | sdk_version: "none", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 300 | system_modules: "none", |
| 301 | java_version: "1.8", |
| 302 | compile_dex: true, |
| 303 | } |
| 304 | |
Anton Hansson | a920550 | 2020-07-15 13:36:34 +0100 | [diff] [blame] | 305 | java_defaults { |
| 306 | name: "android_stubs_dists_default", |
| 307 | dist: { |
| 308 | targets: ["sdk", "win_sdk"], |
| 309 | tag: ".jar", |
| 310 | dest: "android.jar", |
| 311 | }, |
| 312 | } |
| 313 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 314 | java_library_static { |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 315 | name: "android_monolith_stubs_current", |
Anton Hansson | 42afd61 | 2020-02-08 20:43:19 +0000 | [diff] [blame] | 316 | srcs: [ ":api-stubs-docs" ], |
Anton Hansson | f330f3a | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 317 | static_libs: [ "private-stub-annotations-jar" ], |
Anton Hansson | fbd32f3 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 318 | defaults: ["android_defaults_stubs_current"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 319 | } |
| 320 | |
| 321 | java_library_static { |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 322 | name: "android_merged_stubs_current", |
| 323 | srcs: [ ":api-stubs-docs-non-updatable" ], |
| 324 | static_libs: [ |
| 325 | "conscrypt.module.public.api.stubs", |
Paul Duffin | abebc6a | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 326 | "framework-media.stubs", |
| 327 | "framework-mediaprovider.stubs", |
| 328 | "framework-permission.stubs", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 329 | "framework-sdkextensions.stubs", |
Paul Duffin | abebc6a | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 330 | "framework-statsd.stubs", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 331 | "framework-tethering.stubs", |
Paul Duffin | abebc6a | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 332 | "framework-wifi.stubs", |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 333 | "private-stub-annotations-jar", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 334 | ], |
| 335 | defaults: ["android_defaults_stubs_current"], |
| 336 | } |
| 337 | |
| 338 | java_library_static { |
| 339 | name: "android_stubs_current", |
| 340 | static_libs: ["android_merged_stubs_current"], |
| 341 | defaults: ["android_defaults_stubs_current"], |
| 342 | } |
| 343 | |
| 344 | java_library_static { |
| 345 | name: "android_system_monolith_stubs_current", |
Anton Hansson | 42afd61 | 2020-02-08 20:43:19 +0000 | [diff] [blame] | 346 | srcs: [ ":system-api-stubs-docs" ], |
Anton Hansson | f330f3a | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 347 | static_libs: [ "private-stub-annotations-jar" ], |
Anton Hansson | a920550 | 2020-07-15 13:36:34 +0100 | [diff] [blame] | 348 | defaults: [ |
| 349 | "android_defaults_stubs_current", |
| 350 | "android_stubs_dists_default", |
| 351 | ], |
| 352 | dist: { |
| 353 | dir: "apistubs/android/system", |
| 354 | }, |
| 355 | dists: [ |
| 356 | { |
| 357 | // Legacy dist path |
| 358 | targets: ["sdk", "win_sdk"], |
| 359 | tag: ".jar", |
| 360 | dest: "android_system.jar", |
| 361 | }, |
| 362 | ], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 363 | } |
| 364 | |
| 365 | java_library_static { |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 366 | name: "android_system_merged_stubs_current", |
| 367 | srcs: [ ":system-api-stubs-docs-non-updatable" ], |
| 368 | static_libs: [ |
| 369 | "conscrypt.module.public.api.stubs", |
Paul Duffin | abebc6a | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 370 | "framework-media.stubs.system", |
| 371 | "framework-mediaprovider.stubs.system", |
| 372 | "framework-permission.stubs.system", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 373 | "framework-sdkextensions.stubs.system", |
Paul Duffin | abebc6a | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 374 | "framework-statsd.stubs.system", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 375 | "framework-tethering.stubs.system", |
Paul Duffin | abebc6a | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 376 | "framework-wifi.stubs.system", |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 377 | "private-stub-annotations-jar", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 378 | ], |
| 379 | defaults: ["android_defaults_stubs_current"], |
| 380 | } |
| 381 | |
| 382 | java_library_static { |
| 383 | name: "android_system_stubs_current", |
| 384 | static_libs: ["android_system_merged_stubs_current"], |
| 385 | defaults: ["android_defaults_stubs_current"], |
| 386 | } |
| 387 | |
| 388 | java_library_static { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 389 | name: "android_test_stubs_current", |
Anton Hansson | 42afd61 | 2020-02-08 20:43:19 +0000 | [diff] [blame] | 390 | srcs: [ ":test-api-stubs-docs" ], |
Anton Hansson | 7110ae7 | 2020-10-15 17:23:35 +0100 | [diff] [blame] | 391 | static_libs: [ |
| 392 | // Modules do not have test APIs, but we want to include their SystemApis, like we include |
| 393 | // the SystemApi of framework-non-updatable-sources. |
| 394 | "conscrypt.module.public.api.stubs", |
| 395 | "framework-media.stubs.system", |
| 396 | "framework-mediaprovider.stubs.system", |
| 397 | "framework-permission.stubs.system", |
| 398 | "framework-sdkextensions.stubs.system", |
| 399 | "framework-statsd.stubs.system", |
| 400 | "framework-tethering.stubs.system", |
| 401 | "framework-wifi.stubs.system", |
| 402 | "private-stub-annotations-jar", |
| 403 | ], |
Anton Hansson | a920550 | 2020-07-15 13:36:34 +0100 | [diff] [blame] | 404 | defaults: [ |
| 405 | "android_defaults_stubs_current", |
| 406 | "android_stubs_dists_default", |
| 407 | ], |
| 408 | dist: { |
| 409 | dir: "apistubs/android/test", |
| 410 | }, |
| 411 | dists: [ |
| 412 | { |
| 413 | // Legacy dist path |
| 414 | targets: ["sdk", "win_sdk"], |
| 415 | tag: ".jar", |
| 416 | dest: "android_test.jar", |
| 417 | }, |
| 418 | ], |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 419 | } |
| 420 | |
| 421 | java_library_static { |
Anton Hansson | 9c4bbe9 | 2020-01-30 12:09:02 +0000 | [diff] [blame] | 422 | name: "android_module_lib_stubs_current", |
Makoto Onuki | 8c61de6 | 2020-07-15 10:38:04 -0700 | [diff] [blame] | 423 | srcs: [ ":module-lib-api-stubs-docs-non-updatable" ], |
Anton Hansson | a920550 | 2020-07-15 13:36:34 +0100 | [diff] [blame] | 424 | defaults: [ |
| 425 | "android_defaults_stubs_current", |
| 426 | "android_stubs_dists_default", |
| 427 | ], |
Anton Hansson | ebb26a3 | 2020-04-14 16:35:36 +0100 | [diff] [blame] | 428 | libs: ["sdk_system_29_android"], |
Anton Hansson | a920550 | 2020-07-15 13:36:34 +0100 | [diff] [blame] | 429 | dist: { |
| 430 | dir: "apistubs/android/module-lib", |
| 431 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 432 | } |
| 433 | |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 434 | java_library_static { |
| 435 | name: "android_non_updatable_stubs_current", |
| 436 | srcs: [":api-stubs-docs-non-updatable"], |
| 437 | defaults: ["android_defaults_stubs_current"], |
| 438 | libs: ["sdk_system_29_android"], |
| 439 | } |
| 440 | |
| 441 | java_library_static { |
| 442 | name: "android_system_non_updatable_stubs_current", |
| 443 | srcs: [":system-api-stubs-docs-non-updatable"], |
| 444 | defaults: ["android_defaults_stubs_current"], |
| 445 | libs: ["sdk_system_29_android"], |
| 446 | } |
| 447 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 448 | ///////////////////////////////////////////////////////////////////// |
| 449 | // hwbinder.stubs provides APIs required for building HIDL Java |
| 450 | // libraries. |
| 451 | ///////////////////////////////////////////////////////////////////// |
| 452 | |
| 453 | droidstubs { |
| 454 | name: "hwbinder-stubs-docs", |
| 455 | srcs: [ |
| 456 | "core/java/android/os/HidlSupport.java", |
| 457 | "core/java/android/annotation/IntDef.java", |
| 458 | "core/java/android/annotation/IntRange.java", |
| 459 | "core/java/android/annotation/NonNull.java", |
| 460 | "core/java/android/annotation/SystemApi.java", |
| 461 | "core/java/android/os/HidlMemory.java", |
| 462 | "core/java/android/os/HwBinder.java", |
| 463 | "core/java/android/os/HwBlob.java", |
| 464 | "core/java/android/os/HwParcel.java", |
| 465 | "core/java/android/os/IHwBinder.java", |
| 466 | "core/java/android/os/IHwInterface.java", |
| 467 | "core/java/android/os/DeadObjectException.java", |
| 468 | "core/java/android/os/DeadSystemException.java", |
| 469 | "core/java/android/os/NativeHandle.java", |
| 470 | "core/java/android/os/RemoteException.java", |
| 471 | "core/java/android/util/AndroidException.java", |
| 472 | ], |
| 473 | installable: false, |
| 474 | sdk_version: "core_platform", |
| 475 | annotations_enabled: true, |
Anton Hansson | f68ddea | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 476 | previous_api: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 477 | merge_annotations_dirs: [ |
| 478 | "metalava-manual", |
| 479 | ], |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 480 | args: priv_apps, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 481 | } |
| 482 | |
| 483 | java_library_static { |
| 484 | name: "hwbinder.stubs", |
| 485 | sdk_version: "core_current", |
| 486 | srcs: [ |
| 487 | ":hwbinder-stubs-docs", |
| 488 | ], |
| 489 | } |