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 | // |
Anton Hansson | 1c58ffc | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 19 | // - The metalava conversion is done by droidstub modules |
| 20 | // - The javac compilation is done by java_library modules |
| 21 | // |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 22 | // The metalava conversion is also responsible for creating API signature files |
Anton Hansson | 1c58ffc | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 23 | // and comparing them against the checked in API signature, and also checking compatibility |
| 24 | // with the latest frozen API signature. |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 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 | 1c58ffc | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 44 | name: "metalava-non-updatable-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", |
Ramy Medhat | aaa8386 | 2020-05-04 05:54:30 -0400 | [diff] [blame] | 50 | "**/package.html", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 51 | ], |
Anton Hansson | 121ccbc | 2020-12-17 14:56:06 +0000 | [diff] [blame] | 52 | sdk_version: "none", |
| 53 | system_modules: "none", |
| 54 | java_version: "1.8", |
Anton Hansson | 1c58ffc | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 55 | arg_files: ["core/res/AndroidManifest.xml"], |
Chen Xu | 546ce5e | 2020-01-10 08:38:31 -0800 | [diff] [blame] | 56 | // TODO(b/147699819): remove below aidl includes. |
| 57 | aidl: { |
Anton Hansson | 1c58ffc | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 58 | local_include_dirs: [ |
| 59 | "apex/media/aidl/stable", |
| 60 | "telephony/java", |
| 61 | ], |
Chen Xu | 546ce5e | 2020-01-10 08:38:31 -0800 | [diff] [blame] | 62 | }, |
Jiyong Park | c0f8a28 | 2020-09-29 13:43:00 +0900 | [diff] [blame] | 63 | // These are libs from framework-internal-utils that are required (i.e. being referenced) |
| 64 | // from framework-non-updatable-sources. Add more here when there's a need. |
| 65 | // DO NOT add the entire framework-internal-utils. It might cause unnecessary circular |
| 66 | // dependencies gets bigger. |
| 67 | libs: [ |
| 68 | "android.hardware.cas-V1.2-java", |
| 69 | "android.hardware.health-V1.0-java-constants", |
| 70 | "android.hardware.radio-V1.5-java", |
Jayachandran C | 0f14f81 | 2020-08-10 10:58:23 -0700 | [diff] [blame] | 71 | "android.hardware.radio-V1.6-java", |
Jiyong Park | c0f8a28 | 2020-09-29 13:43:00 +0900 | [diff] [blame] | 72 | "android.hardware.thermal-V1.0-java-constants", |
| 73 | "android.hardware.thermal-V2.0-java", |
| 74 | "android.hardware.tv.input-V1.0-java-constants", |
| 75 | "android.hardware.tv.tuner-V1.0-java-constants", |
| 76 | "android.hardware.usb-V1.0-java-constants", |
| 77 | "android.hardware.usb-V1.1-java-constants", |
| 78 | "android.hardware.usb.gadget-V1.0-java", |
| 79 | "android.hardware.vibrator-V1.3-java", |
| 80 | "framework-protos", |
Anton Hansson | 121ccbc | 2020-12-17 14:56:06 +0000 | [diff] [blame] | 81 | "stable.core.platform.api.stubs", |
Anton Hansson | 1c58ffc | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 82 | // There are a few classes from modules used as type arguments that |
| 83 | // need to be resolved by metalava. For now, we can use a previously |
| 84 | // finalized stub library to resolve them. If a new class gets added, |
| 85 | // this may be need to be revisited to use a manually maintained stub |
| 86 | // library with empty classes in order to resolve those references. |
| 87 | "sdk_system_30_android", |
Jiyong Park | c0f8a28 | 2020-09-29 13:43:00 +0900 | [diff] [blame] | 88 | ], |
Anton Hansson | 3514689 | 2020-10-26 10:27:57 +0000 | [diff] [blame] | 89 | high_mem: true, // Lots of sources => high memory use, see b/170701554 |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 90 | installable: false, |
| 91 | annotations_enabled: true, |
Anton Hansson | f68ddea | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 92 | previous_api: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 93 | merge_annotations_dirs: [ |
| 94 | "metalava-manual", |
| 95 | ], |
Aurimas Liutikas | 94bac9c | 2020-03-12 17:06:12 -0700 | [diff] [blame] | 96 | api_levels_annotations_enabled: false, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 97 | filter_packages: packages_to_document, |
| 98 | } |
| 99 | |
| 100 | ///////////////////////////////////////////////////////////////////// |
Anton Hansson | 51861e7 | 2020-11-13 09:55:29 +0000 | [diff] [blame] | 101 | // These modules provide source files for the stub libraries |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 102 | ///////////////////////////////////////////////////////////////////// |
| 103 | |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 104 | droidstubs { |
| 105 | name: "api-stubs-docs-non-updatable", |
| 106 | defaults: ["metalava-non-updatable-api-stubs-default"], |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 107 | args: metalava_framework_docs_args, |
| 108 | check_api: { |
| 109 | current: { |
Anton Hansson | 7bfceb8 | 2020-10-29 18:59:10 +0000 | [diff] [blame] | 110 | api_file: "core/api/current.txt", |
| 111 | removed_api_file: "core/api/removed.txt", |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 112 | }, |
Anton Hansson | 3258a47 | 2020-10-05 16:23:27 +0100 | [diff] [blame] | 113 | last_released: { |
| 114 | api_file: ":android-non-updatable.api.public.latest", |
| 115 | removed_api_file: ":android-non-updatable-removed.api.public.latest", |
Anton Hansson | ce55623 | 2021-01-22 16:40:06 +0000 | [diff] [blame^] | 116 | baseline_file: ":android-incompatibilities.api.public.latest", |
Anton Hansson | 3258a47 | 2020-10-05 16:23:27 +0100 | [diff] [blame] | 117 | }, |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 118 | api_lint: { |
| 119 | enabled: true, |
| 120 | new_since: ":android-non-updatable.api.public.latest", |
| 121 | }, |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 122 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 123 | dists: [ |
| 124 | { |
| 125 | targets: ["sdk", "win_sdk"], |
| 126 | dir: "apistubs/android/public/api", |
| 127 | dest: "android-non-updatable.txt", |
| 128 | tag: ".api.txt", |
| 129 | }, |
| 130 | { |
| 131 | targets: ["sdk", "win_sdk"], |
| 132 | dir: "apistubs/android/public/api", |
| 133 | dest: "android-non-updatable-removed.txt", |
| 134 | tag: ".removed-api.txt", |
| 135 | }, |
| 136 | ], |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 137 | } |
| 138 | |
Anton Hansson | 1c58ffc | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 139 | priv_apps = |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 140 | " --show-annotation android.annotation.SystemApi\\(" + |
Anton Hansson | 1c58ffc | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 141 | "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + |
| 142 | "\\)" |
| 143 | |
| 144 | priv_apps_in_stubs = |
Makoto Onuki | a13287f | 2020-07-10 12:05:21 -0700 | [diff] [blame] | 145 | " --show-for-stub-purposes-annotation android.annotation.SystemApi\\(" + |
| 146 | "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + |
Anton Hansson | 1c58ffc | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 147 | "\\)" |
| 148 | |
| 149 | test = " --show-annotation android.annotation.TestApi" |
| 150 | |
| 151 | module_libs = |
| 152 | " --show-annotation android.annotation.SystemApi\\(" + |
| 153 | "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" + |
| 154 | "\\)" |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 155 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 156 | droidstubs { |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 157 | name: "system-api-stubs-docs-non-updatable", |
| 158 | defaults: ["metalava-non-updatable-api-stubs-default"], |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 159 | args: metalava_framework_docs_args + priv_apps, |
| 160 | check_api: { |
| 161 | current: { |
Anton Hansson | 7bfceb8 | 2020-10-29 18:59:10 +0000 | [diff] [blame] | 162 | api_file: "core/api/system-current.txt", |
| 163 | removed_api_file: "core/api/system-removed.txt", |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 164 | }, |
Anton Hansson | 3258a47 | 2020-10-05 16:23:27 +0100 | [diff] [blame] | 165 | last_released: { |
| 166 | api_file: ":android-non-updatable.api.system.latest", |
| 167 | removed_api_file: ":android-non-updatable-removed.api.system.latest", |
Anton Hansson | ce55623 | 2021-01-22 16:40:06 +0000 | [diff] [blame^] | 168 | baseline_file: ":android-incompatibilities.api.system.latest" |
Anton Hansson | 3258a47 | 2020-10-05 16:23:27 +0100 | [diff] [blame] | 169 | }, |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 170 | api_lint: { |
| 171 | enabled: true, |
| 172 | new_since: ":android-non-updatable.api.system.latest", |
Anton Hansson | 7bfceb8 | 2020-10-29 18:59:10 +0000 | [diff] [blame] | 173 | baseline_file: "core/api/system-lint-baseline.txt", |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 174 | }, |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 175 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 176 | dists: [ |
| 177 | { |
| 178 | targets: ["sdk", "win_sdk"], |
| 179 | dir: "apistubs/android/system/api", |
| 180 | dest: "android-non-updatable.txt", |
| 181 | tag: ".api.txt", |
| 182 | }, |
| 183 | { |
| 184 | targets: ["sdk", "win_sdk"], |
| 185 | dir: "apistubs/android/system/api", |
| 186 | dest: "android-non-updatable-removed.txt", |
| 187 | tag: ".removed-api.txt", |
| 188 | }, |
| 189 | ], |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 190 | } |
| 191 | |
| 192 | droidstubs { |
Anton Hansson | 552ba2c | 2020-11-05 10:45:13 +0000 | [diff] [blame] | 193 | name: "test-api-stubs-docs-non-updatable", |
Anton Hansson | 7110ae7 | 2020-10-15 17:23:35 +0100 | [diff] [blame] | 194 | defaults: ["metalava-non-updatable-api-stubs-default"], |
Anton Hansson | 1c58ffc | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 195 | args: metalava_framework_docs_args + test + priv_apps_in_stubs, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 196 | check_api: { |
| 197 | current: { |
Anton Hansson | 552ba2c | 2020-11-05 10:45:13 +0000 | [diff] [blame] | 198 | api_file: "core/api/test-current.txt", |
| 199 | removed_api_file: "core/api/test-removed.txt", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 200 | }, |
| 201 | api_lint: { |
| 202 | enabled: true, |
Anton Hansson | 552ba2c | 2020-11-05 10:45:13 +0000 | [diff] [blame] | 203 | baseline_file: "core/api/test-lint-baseline.txt", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 204 | }, |
| 205 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 206 | dists: [ |
| 207 | { |
| 208 | targets: ["sdk", "win_sdk"], |
| 209 | dir: "apistubs/android/test/api", |
| 210 | dest: "android.txt", |
| 211 | tag: ".api.txt", |
| 212 | }, |
| 213 | { |
| 214 | targets: ["sdk", "win_sdk"], |
| 215 | dir: "apistubs/android/test/api", |
| 216 | dest: "removed.txt", |
| 217 | tag: ".removed-api.txt", |
| 218 | }, |
| 219 | { |
| 220 | targets: ["sdk", "win_sdk"], |
| 221 | dir: "apistubs/android/test/api", |
| 222 | dest: "android-non-updatable.txt", |
| 223 | tag: ".api.txt", |
| 224 | }, |
| 225 | { |
| 226 | targets: ["sdk", "win_sdk"], |
| 227 | dir: "apistubs/android/test/api", |
| 228 | dest: "android-non-updatable-removed.txt", |
| 229 | tag: ".removed-api.txt", |
| 230 | }, |
| 231 | ], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 232 | } |
| 233 | |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 234 | droidstubs { |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 235 | name: "module-lib-api-stubs-docs-non-updatable", |
| 236 | defaults: ["metalava-non-updatable-api-stubs-default"], |
Anton Hansson | 1c58ffc | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 237 | args: metalava_framework_docs_args + priv_apps_in_stubs + module_libs, |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 238 | check_api: { |
| 239 | current: { |
Anton Hansson | 7bfceb8 | 2020-10-29 18:59:10 +0000 | [diff] [blame] | 240 | api_file: "core/api/module-lib-current.txt", |
| 241 | removed_api_file: "core/api/module-lib-removed.txt", |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 242 | }, |
Anton Hansson | c3ef1f56 | 2020-10-07 14:55:36 +0100 | [diff] [blame] | 243 | last_released: { |
| 244 | api_file: ":android-non-updatable.api.module-lib.latest", |
| 245 | removed_api_file: ":android-non-updatable-removed.api.module-lib.latest", |
| 246 | }, |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 247 | api_lint: { |
| 248 | enabled: true, |
| 249 | new_since: ":android-non-updatable.api.module-lib.latest", |
| 250 | }, |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 251 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 252 | dists: [ |
| 253 | { |
| 254 | targets: ["sdk", "win_sdk"], |
| 255 | dir: "apistubs/android/module-lib/api", |
| 256 | dest: "android-non-updatable.txt", |
| 257 | tag: ".api.txt", |
| 258 | }, |
| 259 | { |
| 260 | targets: ["sdk", "win_sdk"], |
| 261 | dir: "apistubs/android/module-lib/api", |
| 262 | dest: "android-non-updatable-removed.txt", |
| 263 | tag: ".removed-api.txt", |
| 264 | }, |
| 265 | ], |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 266 | } |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 267 | |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 268 | ///////////////////////////////////////////////////////////////////// |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 269 | // android_*_stubs_current modules are the stubs libraries compiled |
Anton Hansson | 1c58ffc | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 270 | // from stub sources |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 271 | ///////////////////////////////////////////////////////////////////// |
| 272 | |
| 273 | java_defaults { |
Anton Hansson | fbd32f3 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 274 | name: "android_defaults_stubs_current", |
Anton Hansson | 42afd61 | 2020-02-08 20:43:19 +0000 | [diff] [blame] | 275 | libs: [ "stub-annotations" ], |
Paul Duffin | a281e92 | 2020-03-25 10:13:33 +0000 | [diff] [blame] | 276 | static_libs: [ |
Paul Duffin | a281e92 | 2020-03-25 10:13:33 +0000 | [diff] [blame] | 277 | // License notices from art module |
| 278 | "art-notices-for-framework-stubs-jar", |
Anton Hansson | cf42e98 | 2020-08-13 19:40:13 +0100 | [diff] [blame] | 279 | "framework-res-package-jar", // Export package of framework-res |
Paul Duffin | a281e92 | 2020-03-25 10:13:33 +0000 | [diff] [blame] | 280 | ], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 281 | errorprone: { |
| 282 | javacflags: [ |
| 283 | "-XepDisableAllChecks", |
| 284 | ], |
| 285 | }, |
Anton Hansson | fbd32f3 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 286 | sdk_version: "none", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 287 | system_modules: "none", |
| 288 | java_version: "1.8", |
| 289 | compile_dex: true, |
| 290 | } |
| 291 | |
Anton Hansson | a920550 | 2020-07-15 13:36:34 +0100 | [diff] [blame] | 292 | java_defaults { |
| 293 | name: "android_stubs_dists_default", |
| 294 | dist: { |
| 295 | targets: ["sdk", "win_sdk"], |
| 296 | tag: ".jar", |
| 297 | dest: "android.jar", |
| 298 | }, |
| 299 | } |
| 300 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 301 | java_library_static { |
Anton Hansson | 3a8e036 | 2020-11-03 19:35:56 +0000 | [diff] [blame] | 302 | name: "android_stubs_current", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 303 | srcs: [ ":api-stubs-docs-non-updatable" ], |
| 304 | static_libs: [ |
Anton Hansson | fc948d86 | 2020-12-17 16:57:35 +0000 | [diff] [blame] | 305 | "art.module.public.api.stubs", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 306 | "conscrypt.module.public.api.stubs", |
Paul Duffin | abebc6a | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 307 | "framework-media.stubs", |
| 308 | "framework-mediaprovider.stubs", |
| 309 | "framework-permission.stubs", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 310 | "framework-sdkextensions.stubs", |
Paul Duffin | abebc6a | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 311 | "framework-statsd.stubs", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 312 | "framework-tethering.stubs", |
Paul Duffin | abebc6a | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 313 | "framework-wifi.stubs", |
Paul Duffin | 5a4e8f2 | 2020-11-25 15:45:43 +0000 | [diff] [blame] | 314 | "i18n.module.public.api.stubs", |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 315 | "private-stub-annotations-jar", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 316 | ], |
Anton Hansson | c3002e5 | 2020-11-18 18:23:55 +0000 | [diff] [blame] | 317 | defaults: ["android_defaults_stubs_current"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 318 | } |
| 319 | |
| 320 | java_library_static { |
Anton Hansson | 3a8e036 | 2020-11-03 19:35:56 +0000 | [diff] [blame] | 321 | name: "android_system_stubs_current", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 322 | srcs: [ ":system-api-stubs-docs-non-updatable" ], |
| 323 | static_libs: [ |
Anton Hansson | fc948d86 | 2020-12-17 16:57:35 +0000 | [diff] [blame] | 324 | "art.module.public.api.stubs", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 325 | "conscrypt.module.public.api.stubs", |
Paul Duffin | abebc6a | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 326 | "framework-media.stubs.system", |
| 327 | "framework-mediaprovider.stubs.system", |
| 328 | "framework-permission.stubs.system", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 329 | "framework-sdkextensions.stubs.system", |
Paul Duffin | abebc6a | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 330 | "framework-statsd.stubs.system", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 331 | "framework-tethering.stubs.system", |
Paul Duffin | abebc6a | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 332 | "framework-wifi.stubs.system", |
Paul Duffin | 5a4e8f2 | 2020-11-25 15:45:43 +0000 | [diff] [blame] | 333 | "i18n.module.public.api.stubs", |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 334 | "private-stub-annotations-jar", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 335 | ], |
Anton Hansson | c3002e5 | 2020-11-18 18:23:55 +0000 | [diff] [blame] | 336 | defaults: [ |
| 337 | "android_defaults_stubs_current", |
| 338 | "android_stubs_dists_default", |
| 339 | ], |
| 340 | dist: { |
| 341 | dir: "apistubs/android/system", |
| 342 | }, |
| 343 | dists: [ |
| 344 | { |
| 345 | // Legacy dist path |
| 346 | targets: ["sdk", "win_sdk"], |
| 347 | tag: ".jar", |
| 348 | dest: "android_system.jar", |
| 349 | }, |
| 350 | ], |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 351 | } |
| 352 | |
| 353 | java_library_static { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 354 | name: "android_test_stubs_current", |
Anton Hansson | 552ba2c | 2020-11-05 10:45:13 +0000 | [diff] [blame] | 355 | srcs: [ ":test-api-stubs-docs-non-updatable" ], |
Anton Hansson | 7110ae7 | 2020-10-15 17:23:35 +0100 | [diff] [blame] | 356 | static_libs: [ |
| 357 | // Modules do not have test APIs, but we want to include their SystemApis, like we include |
| 358 | // the SystemApi of framework-non-updatable-sources. |
Anton Hansson | fc948d86 | 2020-12-17 16:57:35 +0000 | [diff] [blame] | 359 | "art.module.public.api.stubs", |
Anton Hansson | 7110ae7 | 2020-10-15 17:23:35 +0100 | [diff] [blame] | 360 | "conscrypt.module.public.api.stubs", |
| 361 | "framework-media.stubs.system", |
| 362 | "framework-mediaprovider.stubs.system", |
| 363 | "framework-permission.stubs.system", |
| 364 | "framework-sdkextensions.stubs.system", |
| 365 | "framework-statsd.stubs.system", |
| 366 | "framework-tethering.stubs.system", |
| 367 | "framework-wifi.stubs.system", |
Paul Duffin | 5a4e8f2 | 2020-11-25 15:45:43 +0000 | [diff] [blame] | 368 | "i18n.module.public.api.stubs", |
Anton Hansson | 7110ae7 | 2020-10-15 17:23:35 +0100 | [diff] [blame] | 369 | "private-stub-annotations-jar", |
| 370 | ], |
Anton Hansson | a920550 | 2020-07-15 13:36:34 +0100 | [diff] [blame] | 371 | defaults: [ |
| 372 | "android_defaults_stubs_current", |
| 373 | "android_stubs_dists_default", |
| 374 | ], |
| 375 | dist: { |
| 376 | dir: "apistubs/android/test", |
| 377 | }, |
| 378 | dists: [ |
| 379 | { |
| 380 | // Legacy dist path |
| 381 | targets: ["sdk", "win_sdk"], |
| 382 | tag: ".jar", |
| 383 | dest: "android_test.jar", |
| 384 | }, |
| 385 | ], |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 386 | } |
| 387 | |
| 388 | java_library_static { |
Anton Hansson | 9c4bbe9 | 2020-01-30 12:09:02 +0000 | [diff] [blame] | 389 | name: "android_module_lib_stubs_current", |
Makoto Onuki | 8c61de6 | 2020-07-15 10:38:04 -0700 | [diff] [blame] | 390 | srcs: [ ":module-lib-api-stubs-docs-non-updatable" ], |
Anton Hansson | a920550 | 2020-07-15 13:36:34 +0100 | [diff] [blame] | 391 | defaults: [ |
| 392 | "android_defaults_stubs_current", |
| 393 | "android_stubs_dists_default", |
| 394 | ], |
Anton Hansson | ebb26a3 | 2020-04-14 16:35:36 +0100 | [diff] [blame] | 395 | libs: ["sdk_system_29_android"], |
Anton Hansson | fc948d86 | 2020-12-17 16:57:35 +0000 | [diff] [blame] | 396 | static_libs: ["art.module.public.api.stubs"], |
Anton Hansson | a920550 | 2020-07-15 13:36:34 +0100 | [diff] [blame] | 397 | dist: { |
| 398 | dir: "apistubs/android/module-lib", |
| 399 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 400 | } |
| 401 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 402 | ///////////////////////////////////////////////////////////////////// |
| 403 | // hwbinder.stubs provides APIs required for building HIDL Java |
| 404 | // libraries. |
| 405 | ///////////////////////////////////////////////////////////////////// |
| 406 | |
| 407 | droidstubs { |
| 408 | name: "hwbinder-stubs-docs", |
| 409 | srcs: [ |
| 410 | "core/java/android/os/HidlSupport.java", |
| 411 | "core/java/android/annotation/IntDef.java", |
| 412 | "core/java/android/annotation/IntRange.java", |
| 413 | "core/java/android/annotation/NonNull.java", |
| 414 | "core/java/android/annotation/SystemApi.java", |
| 415 | "core/java/android/os/HidlMemory.java", |
| 416 | "core/java/android/os/HwBinder.java", |
| 417 | "core/java/android/os/HwBlob.java", |
| 418 | "core/java/android/os/HwParcel.java", |
| 419 | "core/java/android/os/IHwBinder.java", |
| 420 | "core/java/android/os/IHwInterface.java", |
| 421 | "core/java/android/os/DeadObjectException.java", |
| 422 | "core/java/android/os/DeadSystemException.java", |
| 423 | "core/java/android/os/NativeHandle.java", |
| 424 | "core/java/android/os/RemoteException.java", |
| 425 | "core/java/android/util/AndroidException.java", |
| 426 | ], |
| 427 | installable: false, |
| 428 | sdk_version: "core_platform", |
| 429 | annotations_enabled: true, |
Anton Hansson | f68ddea | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 430 | previous_api: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 431 | merge_annotations_dirs: [ |
| 432 | "metalava-manual", |
| 433 | ], |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 434 | args: priv_apps, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 435 | } |
| 436 | |
| 437 | java_library_static { |
| 438 | name: "hwbinder.stubs", |
| 439 | sdk_version: "core_current", |
| 440 | srcs: [ |
| 441 | ":hwbinder-stubs-docs", |
| 442 | ], |
| 443 | } |