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 | 822cdb3 | 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 | 5c89e70 | 2020-03-26 15:33:48 +0000 | [diff] [blame] | 50 | ":art-module-public-api-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 | ], |
Ytai Ben-Tsvi | da7c21e | 2020-09-16 13:04:31 -0700 | [diff] [blame^] | 54 | // TODO(b/147699819, b/169090544): remove below aidl includes. |
Chen Xu | 546ce5e | 2020-01-10 08:38:31 -0800 | [diff] [blame] | 55 | aidl: { |
Ytai Ben-Tsvi | da7c21e | 2020-09-16 13:04:31 -0700 | [diff] [blame^] | 56 | local_include_dirs: [ |
| 57 | "telephony/java", |
| 58 | "media/aidl", |
| 59 | ], |
Chen Xu | 546ce5e | 2020-01-10 08:38:31 -0800 | [diff] [blame] | 60 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 61 | libs: ["framework-internal-utils"], |
| 62 | installable: false, |
| 63 | annotations_enabled: true, |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 64 | previous_api: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 65 | merge_annotations_dirs: [ |
| 66 | "metalava-manual", |
| 67 | ], |
Aurimas Liutikas | 94bac9c | 2020-03-12 17:06:12 -0700 | [diff] [blame] | 68 | api_levels_annotations_enabled: false, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 69 | filter_packages: packages_to_document, |
| 70 | } |
| 71 | |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 72 | stubs_defaults { |
Anton Hansson | 822cdb3 | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 73 | name: "metalava-full-api-stubs-default", |
| 74 | defaults: ["metalava-base-api-stubs-default"], |
Anton Hansson | e89d37d | 2020-05-07 12:06:00 +0100 | [diff] [blame] | 75 | srcs: [ |
Paul Duffin | e55d4e3 | 2020-05-14 17:55:46 +0100 | [diff] [blame] | 76 | ":conscrypt.module.public.api{.public.stubs.source}", |
Anton Hansson | e89d37d | 2020-05-07 12:06:00 +0100 | [diff] [blame] | 77 | ":framework-updatable-sources", |
| 78 | ], |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 79 | sdk_version: "core_platform", |
| 80 | } |
| 81 | |
Anton Hansson | 822cdb3 | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 82 | stubs_defaults { |
| 83 | name: "metalava-non-updatable-api-stubs-default", |
| 84 | defaults: ["metalava-base-api-stubs-default"], |
Anton Hansson | 92d79fd | 2020-03-20 09:12:52 +0000 | [diff] [blame] | 85 | sdk_version: "core_platform", |
Anton Hansson | 394febc | 2020-04-14 16:35:36 +0100 | [diff] [blame] | 86 | // There are a few classes from modules used as type arguments that |
| 87 | // need to be resolved by metalava. For now, we can use a previously |
| 88 | // finalized stub library to resolve them. If a new class gets added, |
| 89 | // this may be need to be revisited to use a manually maintained stub |
| 90 | // library with empty classes in order to resolve those references. |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 91 | libs: ["sdk_system_30_android"], |
Anton Hansson | 92d79fd | 2020-03-20 09:12:52 +0000 | [diff] [blame] | 92 | aidl: { |
Anton Hansson | 394febc | 2020-04-14 16:35:36 +0100 | [diff] [blame] | 93 | local_include_dirs: ["apex/media/aidl/stable"], |
Anton Hansson | 92d79fd | 2020-03-20 09:12:52 +0000 | [diff] [blame] | 94 | }, |
Anton Hansson | 822cdb3 | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 95 | } |
| 96 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 97 | ///////////////////////////////////////////////////////////////////// |
| 98 | // *-api-stubs-docs modules providing source files for the stub libraries |
| 99 | ///////////////////////////////////////////////////////////////////// |
| 100 | |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 101 | // api-stubs-docs, system-api-stubs-docs, and test-api-stubs-docs have APIs |
| 102 | // from the non-updatable part of the platform as well as from the updatable |
| 103 | // modules |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 104 | droidstubs { |
| 105 | name: "api-stubs-docs", |
Anton Hansson | 822cdb3 | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 106 | defaults: ["metalava-full-api-stubs-default"], |
Artur Satayev | 0a97d5e | 2020-03-25 16:45:56 +0000 | [diff] [blame] | 107 | removed_dex_api_filename: "removed-dex.txt", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 108 | arg_files: [ |
| 109 | "core/res/AndroidManifest.xml", |
| 110 | ], |
| 111 | args: metalava_framework_docs_args, |
| 112 | check_api: { |
| 113 | current: { |
| 114 | api_file: "api/current.txt", |
| 115 | removed_api_file: "api/removed.txt", |
| 116 | }, |
| 117 | last_released: { |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 118 | api_file: ":android.api.public.latest", |
Anton Hansson | 960c675 | 2020-05-02 18:00:30 +0100 | [diff] [blame] | 119 | removed_api_file: ":removed.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 120 | baseline_file: ":public-api-incompatibilities-with-last-released", |
| 121 | }, |
| 122 | api_lint: { |
| 123 | enabled: true, |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 124 | new_since: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 125 | baseline_file: "api/lint-baseline.txt", |
| 126 | }, |
| 127 | }, |
Anton Hansson | d9a3fee | 2020-03-23 18:08:55 +0000 | [diff] [blame] | 128 | dist: { |
| 129 | targets: ["sdk", "win_sdk"], |
| 130 | dir: "apistubs/android/public/api", |
| 131 | dest: "android.txt", |
| 132 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 133 | jdiff_enabled: true, |
| 134 | } |
| 135 | |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 136 | droidstubs { |
| 137 | name: "api-stubs-docs-non-updatable", |
| 138 | defaults: ["metalava-non-updatable-api-stubs-default"], |
| 139 | arg_files: ["core/res/AndroidManifest.xml"], |
| 140 | args: metalava_framework_docs_args, |
| 141 | check_api: { |
| 142 | current: { |
| 143 | api_file: "non-updatable-api/current.txt", |
| 144 | removed_api_file: "non-updatable-api/removed.txt", |
| 145 | }, |
| 146 | api_lint: { |
| 147 | enabled: true, |
| 148 | new_since: ":android-non-updatable.api.public.latest", |
| 149 | }, |
| 150 | }, |
| 151 | } |
| 152 | |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 153 | priv_apps = " " + |
| 154 | "--show-annotation android.annotation.SystemApi\\(" + |
| 155 | "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + |
| 156 | "\\) " |
| 157 | |
| 158 | module_libs = " " + |
| 159 | " --show-annotation android.annotation.SystemApi\\(" + |
| 160 | "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" + |
Makoto Onuki | 41ccbfb | 2020-07-10 12:05:21 -0700 | [diff] [blame] | 161 | "\\)" + |
| 162 | " --show-for-stub-purposes-annotation android.annotation.SystemApi\\(" + |
| 163 | "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 164 | "\\) " |
| 165 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 166 | droidstubs { |
| 167 | name: "system-api-stubs-docs", |
Anton Hansson | 822cdb3 | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 168 | defaults: ["metalava-full-api-stubs-default"], |
Artur Satayev | 0a97d5e | 2020-03-25 16:45:56 +0000 | [diff] [blame] | 169 | removed_dex_api_filename: "system-removed-dex.txt", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 170 | arg_files: [ |
| 171 | "core/res/AndroidManifest.xml", |
| 172 | ], |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 173 | args: metalava_framework_docs_args + priv_apps, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 174 | check_api: { |
| 175 | current: { |
| 176 | api_file: "api/system-current.txt", |
| 177 | removed_api_file: "api/system-removed.txt", |
| 178 | }, |
| 179 | last_released: { |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 180 | api_file: ":android.api.system.latest", |
Anton Hansson | 960c675 | 2020-05-02 18:00:30 +0100 | [diff] [blame] | 181 | removed_api_file: ":removed.api.system.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 182 | baseline_file: ":system-api-incompatibilities-with-last-released" |
| 183 | }, |
| 184 | api_lint: { |
| 185 | enabled: true, |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 186 | new_since: ":android.api.system.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 187 | baseline_file: "api/system-lint-baseline.txt", |
| 188 | }, |
| 189 | }, |
Anton Hansson | d9a3fee | 2020-03-23 18:08:55 +0000 | [diff] [blame] | 190 | dist: { |
| 191 | targets: ["sdk", "win_sdk"], |
| 192 | dir: "apistubs/android/system/api", |
| 193 | dest: "android.txt", |
| 194 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 195 | jdiff_enabled: true, |
| 196 | } |
| 197 | |
| 198 | droidstubs { |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 199 | name: "system-api-stubs-docs-non-updatable", |
| 200 | defaults: ["metalava-non-updatable-api-stubs-default"], |
| 201 | arg_files: ["core/res/AndroidManifest.xml"], |
| 202 | args: metalava_framework_docs_args + priv_apps, |
| 203 | check_api: { |
| 204 | current: { |
| 205 | api_file: "non-updatable-api/system-current.txt", |
| 206 | removed_api_file: "non-updatable-api/system-removed.txt", |
| 207 | }, |
| 208 | api_lint: { |
| 209 | enabled: true, |
| 210 | new_since: ":android-non-updatable.api.system.latest", |
| 211 | baseline_file: "non-updatable-api/system-lint-baseline.txt", |
| 212 | }, |
| 213 | }, |
| 214 | } |
| 215 | |
| 216 | droidstubs { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 217 | name: "test-api-stubs-docs", |
Anton Hansson | 822cdb3 | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 218 | defaults: ["metalava-full-api-stubs-default"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 219 | arg_files: [ |
| 220 | "core/res/AndroidManifest.xml", |
| 221 | ], |
| 222 | args: metalava_framework_docs_args + " --show-annotation android.annotation.TestApi", |
| 223 | check_api: { |
| 224 | current: { |
| 225 | api_file: "api/test-current.txt", |
| 226 | removed_api_file: "api/test-removed.txt", |
| 227 | }, |
| 228 | api_lint: { |
| 229 | enabled: true, |
| 230 | baseline_file: "api/test-lint-baseline.txt", |
| 231 | }, |
| 232 | }, |
Anton Hansson | d9a3fee | 2020-03-23 18:08:55 +0000 | [diff] [blame] | 233 | dist: { |
| 234 | targets: ["sdk", "win_sdk"], |
| 235 | dir: "apistubs/android/test/api", |
| 236 | dest: "android.txt", |
| 237 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 238 | } |
| 239 | |
| 240 | ///////////////////////////////////////////////////////////////////// |
Makoto Onuki | 41ccbfb | 2020-07-10 12:05:21 -0700 | [diff] [blame] | 241 | // Following droidstubs modules are for extra APIs for modules, |
| 242 | // namely @SystemApi(client=MODULE_LIBRARIES) APIs. |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 243 | ///////////////////////////////////////////////////////////////////// |
| 244 | |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 245 | droidstubs { |
| 246 | name: "module-lib-api", |
Anton Hansson | 822cdb3 | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 247 | defaults: ["metalava-full-api-stubs-default"], |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 248 | arg_files: ["core/res/AndroidManifest.xml"], |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 249 | args: metalava_framework_docs_args + module_libs, |
Paul Duffin | 4c5dc18 | 2020-04-08 18:28:15 +0100 | [diff] [blame] | 250 | |
| 251 | // Do not generate stubs as they are not needed |
| 252 | generate_stubs: false, |
| 253 | |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 254 | check_api: { |
| 255 | current: { |
| 256 | api_file: "api/module-lib-current.txt", |
| 257 | removed_api_file: "api/module-lib-removed.txt", |
| 258 | }, |
Anton Hansson | 79e35c3 | 2020-02-11 14:36:40 +0000 | [diff] [blame] | 259 | last_released: { |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 260 | api_file: ":android.api.module-lib.latest", |
Anton Hansson | 960c675 | 2020-05-02 18:00:30 +0100 | [diff] [blame] | 261 | removed_api_file: ":removed.api.module-lib.latest", |
Anton Hansson | 79e35c3 | 2020-02-11 14:36:40 +0000 | [diff] [blame] | 262 | baseline_file: ":module-lib-api-incompatibilities-with-last-released" |
| 263 | }, |
| 264 | api_lint: { |
| 265 | enabled: true, |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 266 | new_since: ":android.api.module-lib.latest", |
Anton Hansson | 79e35c3 | 2020-02-11 14:36:40 +0000 | [diff] [blame] | 267 | baseline_file: "api/module-lib-lint-baseline.txt", |
| 268 | }, |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 269 | }, |
Anton Hansson | d9a3fee | 2020-03-23 18:08:55 +0000 | [diff] [blame] | 270 | dist: { |
| 271 | targets: ["sdk", "win_sdk"], |
| 272 | dir: "apistubs/android/module-lib/api", |
| 273 | dest: "android.txt", |
| 274 | }, |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 275 | } |
| 276 | |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 277 | droidstubs { |
| 278 | name: "module-lib-api-stubs-docs-non-updatable", |
| 279 | defaults: ["metalava-non-updatable-api-stubs-default"], |
| 280 | arg_files: ["core/res/AndroidManifest.xml"], |
Makoto Onuki | f4a486e | 2020-07-15 10:38:04 -0700 | [diff] [blame] | 281 | args: metalava_framework_docs_args + priv_apps + module_libs, |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 282 | check_api: { |
| 283 | current: { |
| 284 | api_file: "non-updatable-api/module-lib-current.txt", |
| 285 | removed_api_file: "non-updatable-api/module-lib-removed.txt", |
| 286 | }, |
| 287 | api_lint: { |
| 288 | enabled: true, |
| 289 | new_since: ":android-non-updatable.api.module-lib.latest", |
| 290 | }, |
| 291 | }, |
| 292 | } |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 293 | |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 294 | ///////////////////////////////////////////////////////////////////// |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 295 | // android_*_stubs_current modules are the stubs libraries compiled |
| 296 | // from *-api-stubs-docs |
| 297 | ///////////////////////////////////////////////////////////////////// |
| 298 | |
| 299 | java_defaults { |
Anton Hansson | fbd32f3 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 300 | name: "android_defaults_stubs_current", |
Anton Hansson | 08b48bb | 2020-02-08 20:43:19 +0000 | [diff] [blame] | 301 | libs: [ "stub-annotations" ], |
Paul Duffin | a281e92 | 2020-03-25 10:13:33 +0000 | [diff] [blame] | 302 | static_libs: [ |
Paul Duffin | a281e92 | 2020-03-25 10:13:33 +0000 | [diff] [blame] | 303 | // License notices from art module |
| 304 | "art-notices-for-framework-stubs-jar", |
Anton Hansson | cf42e98 | 2020-08-13 19:40:13 +0100 | [diff] [blame] | 305 | "framework-res-package-jar", // Export package of framework-res |
Paul Duffin | a281e92 | 2020-03-25 10:13:33 +0000 | [diff] [blame] | 306 | ], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 307 | errorprone: { |
| 308 | javacflags: [ |
| 309 | "-XepDisableAllChecks", |
| 310 | ], |
| 311 | }, |
Anton Hansson | fbd32f3 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 312 | sdk_version: "none", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 313 | system_modules: "none", |
| 314 | java_version: "1.8", |
| 315 | compile_dex: true, |
| 316 | } |
| 317 | |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 318 | java_defaults { |
| 319 | name: "android_stubs_dists_default", |
| 320 | dist: { |
| 321 | targets: ["sdk", "win_sdk"], |
| 322 | tag: ".jar", |
| 323 | dest: "android.jar", |
| 324 | }, |
| 325 | } |
| 326 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 327 | java_library_static { |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 328 | name: "android_monolith_stubs_current", |
Anton Hansson | 08b48bb | 2020-02-08 20:43:19 +0000 | [diff] [blame] | 329 | srcs: [ ":api-stubs-docs" ], |
Anton Hansson | bf63f94 | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 330 | static_libs: [ "private-stub-annotations-jar" ], |
Anton Hansson | fbd32f3 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 331 | defaults: ["android_defaults_stubs_current"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 332 | } |
| 333 | |
| 334 | java_library_static { |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 335 | name: "android_merged_stubs_current", |
| 336 | srcs: [ ":api-stubs-docs-non-updatable" ], |
| 337 | static_libs: [ |
| 338 | "conscrypt.module.public.api.stubs", |
Paul Duffin | 4e00662 | 2020-05-31 16:55:13 +0100 | [diff] [blame] | 339 | "framework-graphics.stubs", |
Paul Duffin | 8b864fb | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 340 | "framework-media.stubs", |
| 341 | "framework-mediaprovider.stubs", |
| 342 | "framework-permission.stubs", |
| 343 | "framework-sdkextensions.stubs", |
| 344 | "framework-statsd.stubs", |
| 345 | "framework-tethering.stubs", |
| 346 | "framework-wifi.stubs", |
Anton Hansson | bf63f94 | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 347 | "private-stub-annotations-jar", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 348 | ], |
| 349 | defaults: ["android_defaults_stubs_current"], |
| 350 | } |
| 351 | |
| 352 | java_library_static { |
| 353 | name: "android_stubs_current", |
| 354 | static_libs: ["android_merged_stubs_current"], |
| 355 | defaults: ["android_defaults_stubs_current"], |
| 356 | } |
| 357 | |
| 358 | java_library_static { |
| 359 | name: "android_system_monolith_stubs_current", |
Anton Hansson | 08b48bb | 2020-02-08 20:43:19 +0000 | [diff] [blame] | 360 | srcs: [ ":system-api-stubs-docs" ], |
Anton Hansson | bf63f94 | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 361 | static_libs: [ "private-stub-annotations-jar" ], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 362 | defaults: [ |
| 363 | "android_defaults_stubs_current", |
| 364 | "android_stubs_dists_default", |
| 365 | ], |
| 366 | dist: { |
| 367 | dir: "apistubs/android/system", |
| 368 | }, |
| 369 | dists: [ |
| 370 | { |
| 371 | // Legacy dist path |
| 372 | targets: ["sdk", "win_sdk"], |
| 373 | tag: ".jar", |
| 374 | dest: "android_system.jar", |
| 375 | }, |
| 376 | ], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 377 | } |
| 378 | |
| 379 | java_library_static { |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 380 | name: "android_system_merged_stubs_current", |
| 381 | srcs: [ ":system-api-stubs-docs-non-updatable" ], |
| 382 | static_libs: [ |
| 383 | "conscrypt.module.public.api.stubs", |
| 384 | "framework-appsearch-stubs", // TODO: standardize appsearch stubs |
Paul Duffin | 4e00662 | 2020-05-31 16:55:13 +0100 | [diff] [blame] | 385 | "framework-graphics.stubs.system", |
Paul Duffin | 8b864fb | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 386 | "framework-media.stubs.system", |
| 387 | "framework-mediaprovider.stubs.system", |
| 388 | "framework-permission.stubs.system", |
| 389 | "framework-sdkextensions.stubs.system", |
| 390 | "framework-statsd.stubs.system", |
| 391 | "framework-tethering.stubs.system", |
| 392 | "framework-wifi.stubs.system", |
Anton Hansson | bf63f94 | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 393 | "private-stub-annotations-jar", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 394 | ], |
| 395 | defaults: ["android_defaults_stubs_current"], |
| 396 | } |
| 397 | |
| 398 | java_library_static { |
| 399 | name: "android_system_stubs_current", |
| 400 | static_libs: ["android_system_merged_stubs_current"], |
| 401 | defaults: ["android_defaults_stubs_current"], |
| 402 | } |
| 403 | |
| 404 | java_library_static { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 405 | name: "android_test_stubs_current", |
Anton Hansson | 08b48bb | 2020-02-08 20:43:19 +0000 | [diff] [blame] | 406 | srcs: [ ":test-api-stubs-docs" ], |
Anton Hansson | bf63f94 | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 407 | static_libs: [ "private-stub-annotations-jar" ], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 408 | defaults: [ |
| 409 | "android_defaults_stubs_current", |
| 410 | "android_stubs_dists_default", |
| 411 | ], |
| 412 | dist: { |
| 413 | dir: "apistubs/android/test", |
| 414 | }, |
| 415 | dists: [ |
| 416 | { |
| 417 | // Legacy dist path |
| 418 | targets: ["sdk", "win_sdk"], |
| 419 | tag: ".jar", |
| 420 | dest: "android_test.jar", |
| 421 | }, |
| 422 | ], |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 423 | } |
| 424 | |
| 425 | java_library_static { |
Anton Hansson | 1b9cf09 | 2020-01-30 12:09:02 +0000 | [diff] [blame] | 426 | name: "android_module_lib_stubs_current", |
Makoto Onuki | f4a486e | 2020-07-15 10:38:04 -0700 | [diff] [blame] | 427 | srcs: [ ":module-lib-api-stubs-docs-non-updatable" ], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 428 | defaults: [ |
| 429 | "android_defaults_stubs_current", |
| 430 | "android_stubs_dists_default", |
| 431 | ], |
Anton Hansson | 394febc | 2020-04-14 16:35:36 +0100 | [diff] [blame] | 432 | libs: ["sdk_system_29_android"], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 433 | dist: { |
| 434 | dir: "apistubs/android/module-lib", |
| 435 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 436 | } |
| 437 | |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 438 | java_library_static { |
| 439 | name: "android_non_updatable_stubs_current", |
| 440 | srcs: [":api-stubs-docs-non-updatable"], |
| 441 | defaults: ["android_defaults_stubs_current"], |
| 442 | libs: ["sdk_system_29_android"], |
| 443 | } |
| 444 | |
| 445 | java_library_static { |
| 446 | name: "android_system_non_updatable_stubs_current", |
| 447 | srcs: [":system-api-stubs-docs-non-updatable"], |
| 448 | defaults: ["android_defaults_stubs_current"], |
| 449 | libs: ["sdk_system_29_android"], |
| 450 | } |
| 451 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 452 | ///////////////////////////////////////////////////////////////////// |
| 453 | // hwbinder.stubs provides APIs required for building HIDL Java |
| 454 | // libraries. |
| 455 | ///////////////////////////////////////////////////////////////////// |
| 456 | |
| 457 | droidstubs { |
| 458 | name: "hwbinder-stubs-docs", |
| 459 | srcs: [ |
| 460 | "core/java/android/os/HidlSupport.java", |
| 461 | "core/java/android/annotation/IntDef.java", |
| 462 | "core/java/android/annotation/IntRange.java", |
| 463 | "core/java/android/annotation/NonNull.java", |
| 464 | "core/java/android/annotation/SystemApi.java", |
| 465 | "core/java/android/os/HidlMemory.java", |
| 466 | "core/java/android/os/HwBinder.java", |
| 467 | "core/java/android/os/HwBlob.java", |
| 468 | "core/java/android/os/HwParcel.java", |
| 469 | "core/java/android/os/IHwBinder.java", |
| 470 | "core/java/android/os/IHwInterface.java", |
| 471 | "core/java/android/os/DeadObjectException.java", |
| 472 | "core/java/android/os/DeadSystemException.java", |
| 473 | "core/java/android/os/NativeHandle.java", |
| 474 | "core/java/android/os/RemoteException.java", |
| 475 | "core/java/android/util/AndroidException.java", |
| 476 | ], |
| 477 | installable: false, |
| 478 | sdk_version: "core_platform", |
| 479 | annotations_enabled: true, |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 480 | previous_api: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 481 | merge_annotations_dirs: [ |
| 482 | "metalava-manual", |
| 483 | ], |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 484 | args: priv_apps, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 485 | } |
| 486 | |
| 487 | java_library_static { |
| 488 | name: "hwbinder.stubs", |
| 489 | sdk_version: "core_current", |
| 490 | srcs: [ |
| 491 | ":hwbinder-stubs-docs", |
| 492 | ], |
| 493 | } |
| 494 | |
| 495 | ///////////////////////////////////////////////////////////////////// |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 496 | // api/*-current.txt files for use by modules in other directories |
| 497 | // like the CTS test |
| 498 | ///////////////////////////////////////////////////////////////////// |
| 499 | |
| 500 | filegroup { |
| 501 | name: "frameworks-base-api-current.txt", |
| 502 | srcs: [ |
| 503 | "api/current.txt", |
| 504 | ], |
| 505 | } |
| 506 | |
| 507 | filegroup { |
| 508 | name: "frameworks-base-api-system-current.txt", |
| 509 | srcs: [ |
| 510 | "api/system-current.txt", |
| 511 | ], |
| 512 | } |
| 513 | |
| 514 | filegroup { |
| 515 | name: "frameworks-base-api-system-removed.txt", |
| 516 | srcs: [ |
| 517 | "api/system-removed.txt", |
| 518 | ], |
| 519 | } |