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