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