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 | ///////////////////////////////////////////////////////////////////// |
Anton Hansson | 51861e7 | 2020-11-13 09:55:29 +0000 | [diff] [blame] | 27 | // These modules provide source files for the stub libraries |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 28 | ///////////////////////////////////////////////////////////////////// |
| 29 | |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 30 | soong_config_module_type_import { |
| 31 | from: "frameworks/base/api/Android.bp", |
| 32 | module_types: ["non_updatable_exportable_droidstubs"], |
| 33 | } |
| 34 | |
| 35 | non_updatable_exportable_droidstubs { |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 36 | name: "api-stubs-docs-non-updatable", |
Anton Hansson | 9dce832 | 2022-01-24 14:14:33 +0000 | [diff] [blame] | 37 | defaults: [ |
| 38 | "android-non-updatable-stubs-defaults", |
| 39 | "module-classpath-stubs-defaults", |
| 40 | ], |
Paul Duffin | a2c4cd7 | 2024-06-18 18:49:48 +0100 | [diff] [blame^] | 41 | // Use full Android API not just the non-updatable API as the latter is incomplete |
| 42 | // and can result in incorrect behavior. |
| 43 | previous_api: ":android.api.combined.public.latest", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 44 | check_api: { |
| 45 | current: { |
Anton Hansson | b7cda92 | 2023-03-03 15:38:28 +0000 | [diff] [blame] | 46 | api_file: ":non-updatable-current.txt", |
| 47 | removed_api_file: ":non-updatable-removed.txt", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 48 | }, |
Anton Hansson | 37e102e | 2020-10-05 16:42:40 +0100 | [diff] [blame] | 49 | last_released: { |
Paul Duffin | f75e910 | 2024-05-20 16:20:39 +0100 | [diff] [blame] | 50 | api_file: ":android-non-updatable.api.combined.public.latest", |
| 51 | removed_api_file: ":android-non-updatable-removed.api.combined.public.latest", |
Anton Hansson | 7f3393d | 2021-04-12 11:56:53 +0100 | [diff] [blame] | 52 | baseline_file: ":android-non-updatable-incompatibilities.api.public.latest", |
Anton Hansson | 37e102e | 2020-10-05 16:42:40 +0100 | [diff] [blame] | 53 | }, |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 54 | api_lint: { |
| 55 | enabled: true, |
Paul Duffin | 98bc011 | 2024-05-17 14:21:44 +0100 | [diff] [blame] | 56 | new_since: ":android.api.combined.public.latest", |
Adrian Roos | 440f3cf | 2023-09-20 10:03:31 +0000 | [diff] [blame] | 57 | baseline_file: ":non-updatable-lint-baseline.txt", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 58 | }, |
| 59 | }, |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 60 | soong_config_variables: { |
| 61 | release_hidden_api_exportable_stubs: { |
| 62 | dists: [ |
| 63 | { |
Jihoon Kang | 00f480e | 2024-04-10 18:55:36 +0000 | [diff] [blame] | 64 | targets: ["sdk"], |
| 65 | dir: "apistubs/android/public/api", |
| 66 | dest: "android-non-updatable.txt", |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 67 | tag: ".exportable.api.txt", |
| 68 | }, |
| 69 | { |
Jihoon Kang | 00f480e | 2024-04-10 18:55:36 +0000 | [diff] [blame] | 70 | targets: ["sdk"], |
| 71 | dir: "apistubs/android/public/api", |
| 72 | dest: "android-non-updatable-removed.txt", |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 73 | tag: ".exportable.removed-api.txt", |
| 74 | }, |
| 75 | ], |
| 76 | conditions_default: { |
| 77 | dists: [ |
| 78 | { |
Jihoon Kang | 00f480e | 2024-04-10 18:55:36 +0000 | [diff] [blame] | 79 | targets: ["sdk"], |
| 80 | dir: "apistubs/android/public/api", |
| 81 | dest: "android-non-updatable.txt", |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 82 | tag: ".api.txt", |
| 83 | }, |
| 84 | { |
Jihoon Kang | 00f480e | 2024-04-10 18:55:36 +0000 | [diff] [blame] | 85 | targets: ["sdk"], |
| 86 | dir: "apistubs/android/public/api", |
| 87 | dest: "android-non-updatable-removed.txt", |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 88 | tag: ".removed-api.txt", |
| 89 | }, |
| 90 | ], |
| 91 | }, |
| 92 | }, |
| 93 | }, |
Jihoon Kang | 866b9b7a | 2023-09-20 22:28:05 +0000 | [diff] [blame] | 94 | api_surface: "public", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 95 | } |
| 96 | |
Anton Hansson | 84a0e71 | 2023-10-23 09:17:45 +0000 | [diff] [blame] | 97 | priv_apps = [ |
| 98 | "--show-annotation android.annotation.SystemApi\\(" + |
| 99 | "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + |
| 100 | "\\)", |
| 101 | ] |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 102 | |
Anton Hansson | 84a0e71 | 2023-10-23 09:17:45 +0000 | [diff] [blame] | 103 | priv_apps_in_stubs = [ |
| 104 | "--show-for-stub-purposes-annotation android.annotation.SystemApi\\(" + |
| 105 | "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + |
| 106 | "\\)", |
| 107 | ] |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 108 | |
Anton Hansson | 84a0e71 | 2023-10-23 09:17:45 +0000 | [diff] [blame] | 109 | test = ["--show-annotation android.annotation.TestApi"] |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 110 | |
Anton Hansson | 84a0e71 | 2023-10-23 09:17:45 +0000 | [diff] [blame] | 111 | module_libs = [ |
| 112 | "--show-annotation android.annotation.SystemApi\\(" + |
| 113 | "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" + |
| 114 | "\\)", |
| 115 | ] |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 116 | |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 117 | non_updatable_exportable_droidstubs { |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 118 | name: "system-api-stubs-docs-non-updatable", |
Anton Hansson | 9dce832 | 2022-01-24 14:14:33 +0000 | [diff] [blame] | 119 | defaults: [ |
| 120 | "android-non-updatable-stubs-defaults", |
| 121 | "module-classpath-stubs-defaults", |
| 122 | ], |
Anton Hansson | 84a0e71 | 2023-10-23 09:17:45 +0000 | [diff] [blame] | 123 | flags: priv_apps, |
Paul Duffin | a2c4cd7 | 2024-06-18 18:49:48 +0100 | [diff] [blame^] | 124 | // Use full Android API not just the non-updatable API as the latter is incomplete |
| 125 | // and can result in incorrect behavior. |
| 126 | previous_api: ":android.api.combined.system.latest", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 127 | check_api: { |
| 128 | current: { |
Anton Hansson | b7cda92 | 2023-03-03 15:38:28 +0000 | [diff] [blame] | 129 | api_file: ":non-updatable-system-current.txt", |
| 130 | removed_api_file: ":non-updatable-system-removed.txt", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 131 | }, |
Anton Hansson | 37e102e | 2020-10-05 16:42:40 +0100 | [diff] [blame] | 132 | last_released: { |
Paul Duffin | f75e910 | 2024-05-20 16:20:39 +0100 | [diff] [blame] | 133 | api_file: ":android-non-updatable.api.combined.system.latest", |
| 134 | removed_api_file: ":android-non-updatable-removed.api.combined.system.latest", |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 135 | baseline_file: ":android-non-updatable-incompatibilities.api.system.latest", |
Anton Hansson | 37e102e | 2020-10-05 16:42:40 +0100 | [diff] [blame] | 136 | }, |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 137 | api_lint: { |
| 138 | enabled: true, |
Paul Duffin | 98bc011 | 2024-05-17 14:21:44 +0100 | [diff] [blame] | 139 | new_since: ":android.api.combined.system.latest", |
Anton Hansson | b7cda92 | 2023-03-03 15:38:28 +0000 | [diff] [blame] | 140 | baseline_file: ":non-updatable-system-lint-baseline.txt", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 141 | }, |
| 142 | }, |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 143 | soong_config_variables: { |
| 144 | release_hidden_api_exportable_stubs: { |
| 145 | dists: [ |
| 146 | { |
Jihoon Kang | 00f480e | 2024-04-10 18:55:36 +0000 | [diff] [blame] | 147 | targets: ["sdk"], |
| 148 | dir: "apistubs/android/system/api", |
| 149 | dest: "android-non-updatable.txt", |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 150 | tag: ".exportable.api.txt", |
| 151 | }, |
| 152 | { |
Jihoon Kang | 00f480e | 2024-04-10 18:55:36 +0000 | [diff] [blame] | 153 | targets: ["sdk"], |
| 154 | dir: "apistubs/android/system/api", |
| 155 | dest: "android-non-updatable-removed.txt", |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 156 | tag: ".exportable.removed-api.txt", |
| 157 | }, |
| 158 | ], |
| 159 | conditions_default: { |
| 160 | dists: [ |
| 161 | { |
Jihoon Kang | 00f480e | 2024-04-10 18:55:36 +0000 | [diff] [blame] | 162 | targets: ["sdk"], |
| 163 | dir: "apistubs/android/system/api", |
| 164 | dest: "android-non-updatable.txt", |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 165 | tag: ".api.txt", |
| 166 | }, |
| 167 | { |
Jihoon Kang | 00f480e | 2024-04-10 18:55:36 +0000 | [diff] [blame] | 168 | targets: ["sdk"], |
| 169 | dir: "apistubs/android/system/api", |
| 170 | dest: "android-non-updatable-removed.txt", |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 171 | tag: ".removed-api.txt", |
| 172 | }, |
| 173 | ], |
| 174 | }, |
| 175 | }, |
| 176 | }, |
Jihoon Kang | 866b9b7a | 2023-09-20 22:28:05 +0000 | [diff] [blame] | 177 | api_surface: "system", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 178 | } |
| 179 | |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 180 | non_updatable_exportable_droidstubs { |
Anton Hansson | 022aac5 | 2020-11-05 10:45:13 +0000 | [diff] [blame] | 181 | name: "test-api-stubs-docs-non-updatable", |
Anton Hansson | 9dce832 | 2022-01-24 14:14:33 +0000 | [diff] [blame] | 182 | defaults: [ |
| 183 | "android-non-updatable-stubs-defaults", |
| 184 | "module-classpath-stubs-defaults", |
| 185 | ], |
Anton Hansson | 84a0e71 | 2023-10-23 09:17:45 +0000 | [diff] [blame] | 186 | flags: test + priv_apps_in_stubs, |
Paul Duffin | a2c4cd7 | 2024-06-18 18:49:48 +0100 | [diff] [blame^] | 187 | // Use full Android API not just the non-updatable API as the latter is incomplete |
| 188 | // and can result in incorrect behavior. |
| 189 | previous_api: ":android.api.combined.test.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 190 | check_api: { |
| 191 | current: { |
Anton Hansson | b7cda92 | 2023-03-03 15:38:28 +0000 | [diff] [blame] | 192 | api_file: ":non-updatable-test-current.txt", |
| 193 | removed_api_file: ":non-updatable-test-removed.txt", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 194 | }, |
| 195 | api_lint: { |
| 196 | enabled: true, |
Paul Duffin | 98bc011 | 2024-05-17 14:21:44 +0100 | [diff] [blame] | 197 | new_since: ":android.api.combined.test.latest", |
Anton Hansson | b7cda92 | 2023-03-03 15:38:28 +0000 | [diff] [blame] | 198 | baseline_file: ":non-updatable-test-lint-baseline.txt", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 199 | }, |
| 200 | }, |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 201 | soong_config_variables: { |
| 202 | release_hidden_api_exportable_stubs: { |
| 203 | dists: [ |
| 204 | { |
Jihoon Kang | 00f480e | 2024-04-10 18:55:36 +0000 | [diff] [blame] | 205 | targets: ["sdk"], |
| 206 | dir: "apistubs/android/test/api", |
| 207 | dest: "android.txt", |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 208 | tag: ".exportable.api.txt", |
| 209 | }, |
| 210 | { |
Jihoon Kang | 00f480e | 2024-04-10 18:55:36 +0000 | [diff] [blame] | 211 | targets: ["sdk"], |
| 212 | dir: "apistubs/android/test/api", |
| 213 | dest: "removed.txt", |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 214 | tag: ".exportable.removed-api.txt", |
| 215 | }, |
| 216 | { |
Jihoon Kang | 00f480e | 2024-04-10 18:55:36 +0000 | [diff] [blame] | 217 | targets: ["sdk"], |
| 218 | dir: "apistubs/android/test/api", |
| 219 | dest: "android-non-updatable.txt", |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 220 | tag: ".exportable.api.txt", |
| 221 | }, |
| 222 | { |
Jihoon Kang | 00f480e | 2024-04-10 18:55:36 +0000 | [diff] [blame] | 223 | targets: ["sdk"], |
| 224 | dir: "apistubs/android/test/api", |
| 225 | dest: "android-non-updatable-removed.txt", |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 226 | tag: ".exportable.removed-api.txt", |
| 227 | }, |
| 228 | ], |
| 229 | conditions_default: { |
| 230 | dists: [ |
| 231 | { |
Jihoon Kang | 00f480e | 2024-04-10 18:55:36 +0000 | [diff] [blame] | 232 | targets: ["sdk"], |
| 233 | dir: "apistubs/android/test/api", |
| 234 | dest: "android.txt", |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 235 | tag: ".api.txt", |
| 236 | }, |
| 237 | { |
Jihoon Kang | 00f480e | 2024-04-10 18:55:36 +0000 | [diff] [blame] | 238 | targets: ["sdk"], |
| 239 | dir: "apistubs/android/test/api", |
| 240 | dest: "removed.txt", |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 241 | tag: ".removed-api.txt", |
| 242 | }, |
| 243 | { |
Jihoon Kang | 00f480e | 2024-04-10 18:55:36 +0000 | [diff] [blame] | 244 | targets: ["sdk"], |
| 245 | dir: "apistubs/android/test/api", |
| 246 | dest: "android-non-updatable.txt", |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 247 | tag: ".api.txt", |
| 248 | }, |
| 249 | { |
Jihoon Kang | 00f480e | 2024-04-10 18:55:36 +0000 | [diff] [blame] | 250 | targets: ["sdk"], |
| 251 | dir: "apistubs/android/test/api", |
| 252 | dest: "android-non-updatable-removed.txt", |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 253 | tag: ".removed-api.txt", |
| 254 | }, |
| 255 | ], |
| 256 | }, |
| 257 | }, |
| 258 | }, |
Jihoon Kang | 866b9b7a | 2023-09-20 22:28:05 +0000 | [diff] [blame] | 259 | api_surface: "test", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 260 | } |
| 261 | |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 262 | non_updatable_exportable_droidstubs { |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 263 | name: "module-lib-api-stubs-docs-non-updatable", |
Anton Hansson | 9dce832 | 2022-01-24 14:14:33 +0000 | [diff] [blame] | 264 | defaults: [ |
| 265 | "android-non-updatable-stubs-defaults", |
| 266 | "module-classpath-stubs-defaults", |
| 267 | ], |
Anton Hansson | 84a0e71 | 2023-10-23 09:17:45 +0000 | [diff] [blame] | 268 | flags: priv_apps_in_stubs + module_libs, |
Paul Duffin | a2c4cd7 | 2024-06-18 18:49:48 +0100 | [diff] [blame^] | 269 | // Use full Android API not just the non-updatable API as the latter is incomplete |
| 270 | // and can result in incorrect behavior. |
| 271 | previous_api: ":android.api.combined.module-lib.latest", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 272 | check_api: { |
| 273 | current: { |
Anton Hansson | b7cda92 | 2023-03-03 15:38:28 +0000 | [diff] [blame] | 274 | api_file: ":non-updatable-module-lib-current.txt", |
| 275 | removed_api_file: ":non-updatable-module-lib-removed.txt", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 276 | }, |
Anton Hansson | c3ef1f56 | 2020-10-07 14:55:36 +0100 | [diff] [blame] | 277 | last_released: { |
Paul Duffin | f75e910 | 2024-05-20 16:20:39 +0100 | [diff] [blame] | 278 | api_file: ":android-non-updatable.api.combined.module-lib.latest", |
| 279 | removed_api_file: ":android-non-updatable-removed.api.combined.module-lib.latest", |
Junyu Lai | 2dbb177 | 2022-01-12 17:38:02 +0000 | [diff] [blame] | 280 | baseline_file: ":android-non-updatable-incompatibilities.api.module-lib.latest", |
Anton Hansson | c3ef1f56 | 2020-10-07 14:55:36 +0100 | [diff] [blame] | 281 | }, |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 282 | api_lint: { |
| 283 | enabled: true, |
Paul Duffin | 98bc011 | 2024-05-17 14:21:44 +0100 | [diff] [blame] | 284 | new_since: ":android.api.combined.module-lib.latest", |
Anton Hansson | b7cda92 | 2023-03-03 15:38:28 +0000 | [diff] [blame] | 285 | baseline_file: ":non-updatable-module-lib-lint-baseline.txt", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 286 | }, |
| 287 | }, |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 288 | soong_config_variables: { |
| 289 | release_hidden_api_exportable_stubs: { |
| 290 | dists: [ |
| 291 | { |
Jihoon Kang | 00f480e | 2024-04-10 18:55:36 +0000 | [diff] [blame] | 292 | targets: ["sdk"], |
| 293 | dir: "apistubs/android/module-lib/api", |
| 294 | dest: "android-non-updatable.txt", |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 295 | tag: ".exportable.api.txt", |
| 296 | }, |
| 297 | { |
Jihoon Kang | 00f480e | 2024-04-10 18:55:36 +0000 | [diff] [blame] | 298 | targets: ["sdk"], |
| 299 | dir: "apistubs/android/module-lib/api", |
| 300 | dest: "android-non-updatable-removed.txt", |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 301 | tag: ".exportable.removed-api.txt", |
| 302 | }, |
| 303 | ], |
| 304 | conditions_default: { |
| 305 | dists: [ |
| 306 | { |
Jihoon Kang | 00f480e | 2024-04-10 18:55:36 +0000 | [diff] [blame] | 307 | targets: ["sdk"], |
| 308 | dir: "apistubs/android/module-lib/api", |
| 309 | dest: "android-non-updatable.txt", |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 310 | tag: ".api.txt", |
| 311 | }, |
| 312 | { |
Jihoon Kang | 00f480e | 2024-04-10 18:55:36 +0000 | [diff] [blame] | 313 | targets: ["sdk"], |
| 314 | dir: "apistubs/android/module-lib/api", |
| 315 | dest: "android-non-updatable-removed.txt", |
Jihoon Kang | 2d295ae | 2024-03-21 23:57:14 +0000 | [diff] [blame] | 316 | tag: ".removed-api.txt", |
| 317 | }, |
| 318 | ], |
| 319 | }, |
| 320 | }, |
| 321 | }, |
Jihoon Kang | 866b9b7a | 2023-09-20 22:28:05 +0000 | [diff] [blame] | 322 | api_surface: "module-lib", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 323 | } |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 324 | |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 325 | ///////////////////////////////////////////////////////////////////// |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 326 | // android_*_stubs_current modules are the stubs libraries compiled |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 327 | // from stub sources |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 328 | ///////////////////////////////////////////////////////////////////// |
| 329 | |
| 330 | java_defaults { |
Anton Hansson | c43a66b | 2022-03-03 15:14:04 +0000 | [diff] [blame] | 331 | name: "android.jar_defaults", |
| 332 | sdk_version: "none", |
| 333 | system_modules: "none", |
| 334 | java_version: "1.8", |
| 335 | compile_dex: true, |
Anton Hansson | c43a66b | 2022-03-03 15:14:04 +0000 | [diff] [blame] | 336 | visibility: ["//visibility:public"], |
Jihoon Kang | a7073b5 | 2024-02-12 23:18:52 +0000 | [diff] [blame] | 337 | is_stubs_module: true, |
Anton Hansson | c43a66b | 2022-03-03 15:14:04 +0000 | [diff] [blame] | 338 | } |
| 339 | |
| 340 | java_defaults { |
Jihoon Kang | 491c708 | 2023-06-15 18:37:01 +0000 | [diff] [blame] | 341 | name: "android-non-updatable_defaults", |
Anton Hansson | fbd32f3 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 342 | sdk_version: "none", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 343 | system_modules: "none", |
| 344 | java_version: "1.8", |
| 345 | compile_dex: true, |
Jihoon Kang | a7073b5 | 2024-02-12 23:18:52 +0000 | [diff] [blame] | 346 | is_stubs_module: true, |
Jihoon Kang | 491c708 | 2023-06-15 18:37:01 +0000 | [diff] [blame] | 347 | } |
| 348 | |
| 349 | java_defaults { |
| 350 | name: "android-non-updatable_from_source_defaults", |
| 351 | libs: ["stub-annotations"], |
| 352 | static_libs: ["framework-res-package-jar"], // Export package of framework-res |
Jihoon Kang | 059b949 | 2023-12-29 00:40:34 +0000 | [diff] [blame] | 353 | } |
| 354 | |
| 355 | java_defaults { |
| 356 | name: "android-non-updatable_exportable_from_source_defaults", |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 357 | dist: { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 358 | targets: ["sdk"], |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 359 | tag: ".jar", |
| 360 | dest: "android-non-updatable.jar", |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 361 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 362 | } |
| 363 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 364 | java_library { |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 365 | name: "android-non-updatable.stubs", |
Jihoon Kang | 491c708 | 2023-06-15 18:37:01 +0000 | [diff] [blame] | 366 | defaults: ["android-non-updatable_defaults"], |
| 367 | static_libs: [ |
| 368 | "android-non-updatable.stubs.from-source", |
| 369 | ], |
| 370 | product_variables: { |
| 371 | build_from_text_stub: { |
| 372 | static_libs: [ |
| 373 | "android-non-updatable.stubs.from-text", |
| 374 | ], |
| 375 | exclude_static_libs: [ |
| 376 | "android-non-updatable.stubs.from-source", |
| 377 | ], |
| 378 | }, |
| 379 | }, |
| 380 | } |
| 381 | |
| 382 | java_library { |
Jihoon Kang | 059b949 | 2023-12-29 00:40:34 +0000 | [diff] [blame] | 383 | name: "android-non-updatable.stubs.exportable", |
| 384 | defaults: ["android-non-updatable_defaults"], |
| 385 | static_libs: [ |
| 386 | "android-non-updatable.stubs.exportable.from-source", |
| 387 | ], |
| 388 | } |
| 389 | |
| 390 | java_library { |
Jihoon Kang | 491c708 | 2023-06-15 18:37:01 +0000 | [diff] [blame] | 391 | name: "android-non-updatable.stubs.system", |
| 392 | defaults: ["android-non-updatable_defaults"], |
| 393 | static_libs: [ |
| 394 | "android-non-updatable.stubs.system.from-source", |
| 395 | ], |
| 396 | product_variables: { |
| 397 | build_from_text_stub: { |
| 398 | static_libs: [ |
| 399 | "android-non-updatable.stubs.system.from-text", |
| 400 | ], |
| 401 | exclude_static_libs: [ |
| 402 | "android-non-updatable.stubs.system.from-source", |
| 403 | ], |
| 404 | }, |
| 405 | }, |
| 406 | } |
| 407 | |
| 408 | java_library { |
Jihoon Kang | 059b949 | 2023-12-29 00:40:34 +0000 | [diff] [blame] | 409 | name: "android-non-updatable.stubs.exportable.system", |
| 410 | defaults: ["android-non-updatable_defaults"], |
| 411 | static_libs: [ |
| 412 | "android-non-updatable.stubs.exportable.system.from-source", |
| 413 | ], |
| 414 | } |
| 415 | |
| 416 | java_library { |
Jihoon Kang | 491c708 | 2023-06-15 18:37:01 +0000 | [diff] [blame] | 417 | name: "android-non-updatable.stubs.module_lib", |
| 418 | defaults: ["android-non-updatable_defaults"], |
| 419 | static_libs: [ |
| 420 | "android-non-updatable.stubs.module_lib.from-source", |
| 421 | ], |
| 422 | product_variables: { |
| 423 | build_from_text_stub: { |
| 424 | static_libs: [ |
| 425 | "android-non-updatable.stubs.module_lib.from-text", |
| 426 | ], |
| 427 | exclude_static_libs: [ |
| 428 | "android-non-updatable.stubs.module_lib.from-source", |
| 429 | ], |
| 430 | }, |
| 431 | }, |
| 432 | } |
| 433 | |
| 434 | java_library { |
Jihoon Kang | 059b949 | 2023-12-29 00:40:34 +0000 | [diff] [blame] | 435 | name: "android-non-updatable.stubs.exportable.module_lib", |
| 436 | defaults: ["android-non-updatable_defaults"], |
| 437 | static_libs: [ |
| 438 | "android-non-updatable.stubs.exportable.module_lib.from-source", |
| 439 | ], |
| 440 | } |
| 441 | |
| 442 | java_library { |
Jihoon Kang | 491c708 | 2023-06-15 18:37:01 +0000 | [diff] [blame] | 443 | name: "android-non-updatable.stubs.test", |
| 444 | defaults: ["android-non-updatable_defaults"], |
| 445 | static_libs: [ |
| 446 | "android-non-updatable.stubs.test.from-source", |
| 447 | ], |
| 448 | product_variables: { |
| 449 | build_from_text_stub: { |
| 450 | static_libs: [ |
| 451 | "android-non-updatable.stubs.test.from-text", |
| 452 | ], |
| 453 | exclude_static_libs: [ |
| 454 | "android-non-updatable.stubs.test.from-source", |
| 455 | ], |
| 456 | }, |
| 457 | }, |
| 458 | } |
| 459 | |
| 460 | java_library { |
Jihoon Kang | 059b949 | 2023-12-29 00:40:34 +0000 | [diff] [blame] | 461 | name: "android-non-updatable.stubs.exportable.test", |
| 462 | defaults: ["android-non-updatable_defaults"], |
| 463 | static_libs: [ |
| 464 | "android-non-updatable.stubs.exportable.test.from-source", |
| 465 | ], |
| 466 | } |
| 467 | |
| 468 | java_library { |
Jihoon Kang | 491c708 | 2023-06-15 18:37:01 +0000 | [diff] [blame] | 469 | name: "android-non-updatable.stubs.from-source", |
| 470 | defaults: [ |
| 471 | "android-non-updatable_defaults", |
| 472 | "android-non-updatable_from_source_defaults", |
| 473 | ], |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 474 | srcs: [":api-stubs-docs-non-updatable"], |
Anton Hansson | c6e9d2f | 2022-01-25 15:53:43 +0000 | [diff] [blame] | 475 | libs: ["all-modules-public-stubs"], |
Jihoon Kang | 059b949 | 2023-12-29 00:40:34 +0000 | [diff] [blame] | 476 | } |
| 477 | |
| 478 | java_library { |
| 479 | name: "android-non-updatable.stubs.exportable.from-source", |
| 480 | defaults: [ |
| 481 | "android-non-updatable_defaults", |
| 482 | "android-non-updatable_from_source_defaults", |
| 483 | "android-non-updatable_exportable_from_source_defaults", |
| 484 | ], |
| 485 | srcs: [":api-stubs-docs-non-updatable{.exportable}"], |
| 486 | libs: ["all-modules-public-stubs"], |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 487 | dist: { |
| 488 | dir: "apistubs/android/public", |
| 489 | }, |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 490 | } |
| 491 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 492 | java_library { |
Jihoon Kang | 491c708 | 2023-06-15 18:37:01 +0000 | [diff] [blame] | 493 | name: "android-non-updatable.stubs.system.from-source", |
| 494 | defaults: [ |
| 495 | "android-non-updatable_defaults", |
| 496 | "android-non-updatable_from_source_defaults", |
| 497 | ], |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 498 | srcs: [":system-api-stubs-docs-non-updatable"], |
Anton Hansson | c6e9d2f | 2022-01-25 15:53:43 +0000 | [diff] [blame] | 499 | libs: ["all-modules-system-stubs"], |
Jihoon Kang | 059b949 | 2023-12-29 00:40:34 +0000 | [diff] [blame] | 500 | } |
| 501 | |
| 502 | java_library { |
| 503 | name: "android-non-updatable.stubs.exportable.system.from-source", |
| 504 | defaults: [ |
| 505 | "android-non-updatable_defaults", |
| 506 | "android-non-updatable_from_source_defaults", |
| 507 | "android-non-updatable_exportable_from_source_defaults", |
| 508 | ], |
| 509 | srcs: [":system-api-stubs-docs-non-updatable{.exportable}"], |
| 510 | libs: ["all-modules-system-stubs"], |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 511 | dist: { |
| 512 | dir: "apistubs/android/system", |
| 513 | }, |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 514 | } |
| 515 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 516 | java_library { |
Jihoon Kang | 491c708 | 2023-06-15 18:37:01 +0000 | [diff] [blame] | 517 | name: "android-non-updatable.stubs.module_lib.from-source", |
| 518 | defaults: [ |
| 519 | "android-non-updatable_defaults", |
| 520 | "android-non-updatable_from_source_defaults", |
| 521 | ], |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 522 | srcs: [":module-lib-api-stubs-docs-non-updatable"], |
Anton Hansson | 648b0db | 2023-11-06 19:24:42 +0000 | [diff] [blame] | 523 | libs: non_updatable_api_deps_on_modules, |
Jihoon Kang | 059b949 | 2023-12-29 00:40:34 +0000 | [diff] [blame] | 524 | } |
| 525 | |
| 526 | java_library { |
| 527 | name: "android-non-updatable.stubs.exportable.module_lib.from-source", |
| 528 | defaults: [ |
| 529 | "android-non-updatable_defaults", |
| 530 | "android-non-updatable_from_source_defaults", |
| 531 | "android-non-updatable_exportable_from_source_defaults", |
| 532 | ], |
| 533 | srcs: [":module-lib-api-stubs-docs-non-updatable{.exportable}"], |
| 534 | libs: non_updatable_api_deps_on_modules, |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 535 | dist: { |
| 536 | dir: "apistubs/android/module-lib", |
| 537 | }, |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 538 | } |
| 539 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 540 | java_library { |
Jihoon Kang | 491c708 | 2023-06-15 18:37:01 +0000 | [diff] [blame] | 541 | name: "android-non-updatable.stubs.test.from-source", |
| 542 | defaults: [ |
| 543 | "android-non-updatable_defaults", |
| 544 | "android-non-updatable_from_source_defaults", |
| 545 | ], |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 546 | srcs: [":test-api-stubs-docs-non-updatable"], |
Anton Hansson | c6e9d2f | 2022-01-25 15:53:43 +0000 | [diff] [blame] | 547 | libs: ["all-modules-system-stubs"], |
Jihoon Kang | 059b949 | 2023-12-29 00:40:34 +0000 | [diff] [blame] | 548 | } |
| 549 | |
| 550 | java_library { |
| 551 | name: "android-non-updatable.stubs.exportable.test.from-source", |
| 552 | defaults: [ |
| 553 | "android-non-updatable_defaults", |
| 554 | "android-non-updatable_from_source_defaults", |
| 555 | "android-non-updatable_exportable_from_source_defaults", |
| 556 | ], |
| 557 | srcs: [":test-api-stubs-docs-non-updatable{.exportable}"], |
| 558 | libs: ["all-modules-system-stubs"], |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 559 | dist: { |
| 560 | dir: "apistubs/android/test", |
| 561 | }, |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 562 | } |
| 563 | |
| 564 | java_defaults { |
Jihoon Kang | 491c708 | 2023-06-15 18:37:01 +0000 | [diff] [blame] | 565 | name: "android-non-updatable_from_text_defaults", |
Jihoon Kang | 0c101db | 2023-03-14 07:03:46 +0000 | [diff] [blame] | 566 | static_libs: ["framework-res-package-jar"], |
| 567 | libs: ["stub-annotations"], |
| 568 | } |
| 569 | |
Jihoon Kang | 0d639bf | 2024-02-28 00:54:13 +0000 | [diff] [blame] | 570 | java_defaults { |
| 571 | name: "android-non-updatable_everything_from_text_defaults", |
| 572 | defaults: [ |
| 573 | "android-non-updatable_from_text_defaults", |
| 574 | ], |
| 575 | stubs_type: "everything", |
| 576 | } |
| 577 | |
Jihoon Kang | 0c101db | 2023-03-14 07:03:46 +0000 | [diff] [blame] | 578 | java_api_library { |
| 579 | name: "android-non-updatable.stubs.from-text", |
| 580 | api_surface: "public", |
Jihoon Kang | 25b6ced | 2023-09-20 21:48:09 +0000 | [diff] [blame] | 581 | api_contributions: [ |
| 582 | "api-stubs-docs-non-updatable.api.contribution", |
Jihoon Kang | 0c101db | 2023-03-14 07:03:46 +0000 | [diff] [blame] | 583 | ], |
Jihoon Kang | 0d639bf | 2024-02-28 00:54:13 +0000 | [diff] [blame] | 584 | defaults: ["android-non-updatable_everything_from_text_defaults"], |
Jihoon Kang | 12cddb3 | 2023-06-29 21:35:24 +0000 | [diff] [blame] | 585 | full_api_surface_stub: "android_stubs_current.from-text", |
Paul Duffin | a2c4cd7 | 2024-06-18 18:49:48 +0100 | [diff] [blame^] | 586 | // Use full Android API not just the non-updatable API as the latter is incomplete |
| 587 | // and can result in incorrect behavior. |
| 588 | previous_api: ":android.api.combined.public.latest", |
Jihoon Kang | 0c101db | 2023-03-14 07:03:46 +0000 | [diff] [blame] | 589 | } |
| 590 | |
| 591 | java_api_library { |
| 592 | name: "android-non-updatable.stubs.system.from-text", |
| 593 | api_surface: "system", |
Jihoon Kang | 25b6ced | 2023-09-20 21:48:09 +0000 | [diff] [blame] | 594 | api_contributions: [ |
| 595 | "api-stubs-docs-non-updatable.api.contribution", |
| 596 | "system-api-stubs-docs-non-updatable.api.contribution", |
Jihoon Kang | 0c101db | 2023-03-14 07:03:46 +0000 | [diff] [blame] | 597 | ], |
Jihoon Kang | 0d639bf | 2024-02-28 00:54:13 +0000 | [diff] [blame] | 598 | defaults: ["android-non-updatable_everything_from_text_defaults"], |
Jihoon Kang | 12cddb3 | 2023-06-29 21:35:24 +0000 | [diff] [blame] | 599 | full_api_surface_stub: "android_system_stubs_current.from-text", |
Paul Duffin | a2c4cd7 | 2024-06-18 18:49:48 +0100 | [diff] [blame^] | 600 | // Use full Android API not just the non-updatable API as the latter is incomplete |
| 601 | // and can result in incorrect behavior. |
| 602 | previous_api: ":android.api.combined.system.latest", |
Jihoon Kang | 0c101db | 2023-03-14 07:03:46 +0000 | [diff] [blame] | 603 | } |
| 604 | |
| 605 | java_api_library { |
| 606 | name: "android-non-updatable.stubs.test.from-text", |
| 607 | api_surface: "test", |
Jihoon Kang | 25b6ced | 2023-09-20 21:48:09 +0000 | [diff] [blame] | 608 | api_contributions: [ |
| 609 | "api-stubs-docs-non-updatable.api.contribution", |
| 610 | "system-api-stubs-docs-non-updatable.api.contribution", |
| 611 | "test-api-stubs-docs-non-updatable.api.contribution", |
Jihoon Kang | 0c101db | 2023-03-14 07:03:46 +0000 | [diff] [blame] | 612 | ], |
Jihoon Kang | 0d639bf | 2024-02-28 00:54:13 +0000 | [diff] [blame] | 613 | defaults: ["android-non-updatable_everything_from_text_defaults"], |
Jihoon Kang | 12cddb3 | 2023-06-29 21:35:24 +0000 | [diff] [blame] | 614 | full_api_surface_stub: "android_test_stubs_current.from-text", |
Paul Duffin | a2c4cd7 | 2024-06-18 18:49:48 +0100 | [diff] [blame^] | 615 | // Use full Android API not just the non-updatable API as the latter is incomplete |
| 616 | // and can result in incorrect behavior. |
| 617 | previous_api: ":android.api.combined.test.latest", |
Jihoon Kang | 0c101db | 2023-03-14 07:03:46 +0000 | [diff] [blame] | 618 | } |
| 619 | |
| 620 | java_api_library { |
| 621 | name: "android-non-updatable.stubs.module_lib.from-text", |
| 622 | api_surface: "module_lib", |
Jihoon Kang | 25b6ced | 2023-09-20 21:48:09 +0000 | [diff] [blame] | 623 | api_contributions: [ |
| 624 | "api-stubs-docs-non-updatable.api.contribution", |
| 625 | "system-api-stubs-docs-non-updatable.api.contribution", |
| 626 | "module-lib-api-stubs-docs-non-updatable.api.contribution", |
Jihoon Kang | 0c101db | 2023-03-14 07:03:46 +0000 | [diff] [blame] | 627 | ], |
Jihoon Kang | 0d639bf | 2024-02-28 00:54:13 +0000 | [diff] [blame] | 628 | defaults: ["android-non-updatable_everything_from_text_defaults"], |
Jihoon Kang | 12cddb3 | 2023-06-29 21:35:24 +0000 | [diff] [blame] | 629 | full_api_surface_stub: "android_module_lib_stubs_current_full.from-text", |
Paul Duffin | a2c4cd7 | 2024-06-18 18:49:48 +0100 | [diff] [blame^] | 630 | // Use full Android API not just the non-updatable API as the latter is incomplete |
| 631 | // and can result in incorrect behavior. |
| 632 | previous_api: ":android.api.combined.module-lib.latest", |
Jihoon Kang | 0c101db | 2023-03-14 07:03:46 +0000 | [diff] [blame] | 633 | } |
| 634 | |
Jihoon Kang | 4683b14 | 2023-10-05 23:42:51 +0000 | [diff] [blame] | 635 | // This module generates a stub jar that is a union of the test and module lib |
| 636 | // non-updatable api contributions. Modules should not depend on the stub jar |
| 637 | // generated from this module, as this module is strictly used for hiddenapi only. |
| 638 | java_api_library { |
| 639 | name: "android-non-updatable.stubs.test_module_lib", |
| 640 | api_surface: "module_lib", |
| 641 | api_contributions: [ |
| 642 | "api-stubs-docs-non-updatable.api.contribution", |
| 643 | "system-api-stubs-docs-non-updatable.api.contribution", |
| 644 | "test-api-stubs-docs-non-updatable.api.contribution", |
| 645 | "module-lib-api-stubs-docs-non-updatable.api.contribution", |
| 646 | ], |
Jihoon Kang | 0d639bf | 2024-02-28 00:54:13 +0000 | [diff] [blame] | 647 | defaults: ["android-non-updatable_everything_from_text_defaults"], |
Jihoon Kang | 4683b14 | 2023-10-05 23:42:51 +0000 | [diff] [blame] | 648 | full_api_surface_stub: "android_test_module_lib_stubs_current.from-text", |
| 649 | |
Paul Duffin | a2c4cd7 | 2024-06-18 18:49:48 +0100 | [diff] [blame^] | 650 | // No need to specify previous_api as this is not used for compiling against. |
| 651 | |
Jihoon Kang | 4683b14 | 2023-10-05 23:42:51 +0000 | [diff] [blame] | 652 | // This module is only used for hiddenapi, and other modules should not |
| 653 | // depend on this module. |
| 654 | visibility: ["//visibility:private"], |
| 655 | } |
| 656 | |
Jihoon Kang | 0c101db | 2023-03-14 07:03:46 +0000 | [diff] [blame] | 657 | java_defaults { |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 658 | name: "android_stubs_dists_default", |
| 659 | dist: { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 660 | targets: ["sdk"], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 661 | tag: ".jar", |
| 662 | dest: "android.jar", |
| 663 | }, |
Anton Hansson | 8692568 | 2021-04-14 14:54:43 +0100 | [diff] [blame] | 664 | defaults_visibility: ["//frameworks/base/services"], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 665 | } |
| 666 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 667 | java_library { |
Jihoon Kang | 1453baa | 2023-05-27 05:32:30 +0000 | [diff] [blame] | 668 | name: "android_stubs_current.from-source", |
Anton Hansson | c6e9d2f | 2022-01-25 15:53:43 +0000 | [diff] [blame] | 669 | static_libs: [ |
| 670 | "all-modules-public-stubs", |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 671 | "android-non-updatable.stubs", |
Anton Hansson | bf63f94 | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 672 | "private-stub-annotations-jar", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 673 | ], |
Anton Hansson | 65057af | 2021-04-14 18:52:08 +0100 | [diff] [blame] | 674 | defaults: ["android.jar_defaults"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 675 | } |
| 676 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 677 | java_library { |
Jihoon Kang | 059b949 | 2023-12-29 00:40:34 +0000 | [diff] [blame] | 678 | name: "android_stubs_current_exportable.from-source", |
| 679 | static_libs: [ |
| 680 | "all-modules-public-stubs-exportable", |
| 681 | "android-non-updatable.stubs.exportable", |
| 682 | "private-stub-annotations-jar", |
| 683 | ], |
| 684 | defaults: ["android.jar_defaults"], |
| 685 | } |
| 686 | |
| 687 | java_library { |
Jihoon Kang | 1453baa | 2023-05-27 05:32:30 +0000 | [diff] [blame] | 688 | name: "android_system_stubs_current.from-source", |
Anton Hansson | c6e9d2f | 2022-01-25 15:53:43 +0000 | [diff] [blame] | 689 | static_libs: [ |
| 690 | "all-modules-system-stubs", |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 691 | "android-non-updatable.stubs.system", |
Anton Hansson | bf63f94 | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 692 | "private-stub-annotations-jar", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 693 | ], |
Anton Hansson | c3002e5 | 2020-11-18 18:23:55 +0000 | [diff] [blame] | 694 | defaults: [ |
Anton Hansson | 65057af | 2021-04-14 18:52:08 +0100 | [diff] [blame] | 695 | "android.jar_defaults", |
Jihoon Kang | 059b949 | 2023-12-29 00:40:34 +0000 | [diff] [blame] | 696 | ], |
| 697 | visibility: ["//frameworks/base/services"], |
| 698 | } |
| 699 | |
| 700 | java_library { |
| 701 | name: "android_system_stubs_current_exportable.from-source", |
| 702 | static_libs: [ |
| 703 | "all-modules-system-stubs-exportable", |
| 704 | "android-non-updatable.stubs.exportable.system", |
| 705 | "private-stub-annotations-jar", |
| 706 | ], |
| 707 | defaults: [ |
| 708 | "android.jar_defaults", |
Anton Hansson | c3002e5 | 2020-11-18 18:23:55 +0000 | [diff] [blame] | 709 | "android_stubs_dists_default", |
| 710 | ], |
| 711 | dist: { |
| 712 | dir: "apistubs/android/system", |
| 713 | }, |
| 714 | dists: [ |
| 715 | { |
| 716 | // Legacy dist path |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 717 | targets: ["sdk"], |
Anton Hansson | c3002e5 | 2020-11-18 18:23:55 +0000 | [diff] [blame] | 718 | tag: ".jar", |
| 719 | dest: "android_system.jar", |
| 720 | }, |
| 721 | ], |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 722 | } |
| 723 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 724 | java_library { |
Jihoon Kang | 1453baa | 2023-05-27 05:32:30 +0000 | [diff] [blame] | 725 | name: "android_test_stubs_current.from-source", |
Anton Hansson | c6e9d2f | 2022-01-25 15:53:43 +0000 | [diff] [blame] | 726 | static_libs: [ |
Nikita Ioffe | 5593fbb | 2022-12-01 14:52:34 +0000 | [diff] [blame] | 727 | // Updatable modules do not have test APIs, but we want to include their SystemApis, like we |
| 728 | // include the SystemApi of framework-non-updatable-sources. |
| 729 | "all-updatable-modules-system-stubs", |
| 730 | // Non-updatable modules on the other hand can have test APIs, so include their test-stubs. |
| 731 | "all-non-updatable-modules-test-stubs", |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 732 | "android-non-updatable.stubs.test", |
Anton Hansson | 7ce31c1 | 2020-10-15 18:38:49 +0100 | [diff] [blame] | 733 | "private-stub-annotations-jar", |
| 734 | ], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 735 | defaults: [ |
Anton Hansson | 65057af | 2021-04-14 18:52:08 +0100 | [diff] [blame] | 736 | "android.jar_defaults", |
Jihoon Kang | 059b949 | 2023-12-29 00:40:34 +0000 | [diff] [blame] | 737 | ], |
| 738 | visibility: ["//frameworks/base/services"], |
| 739 | } |
| 740 | |
| 741 | java_library { |
| 742 | name: "android_test_stubs_current_exportable.from-source", |
| 743 | static_libs: [ |
| 744 | // Updatable modules do not have test APIs, but we want to include their SystemApis, like we |
| 745 | // include the SystemApi of framework-non-updatable-sources. |
| 746 | "all-updatable-modules-system-stubs-exportable", |
| 747 | // Non-updatable modules on the other hand can have test APIs, so include their test-stubs. |
| 748 | "all-non-updatable-modules-test-stubs-exportable", |
| 749 | "android-non-updatable.stubs.exportable.test", |
| 750 | "private-stub-annotations-jar", |
| 751 | ], |
| 752 | defaults: [ |
| 753 | "android.jar_defaults", |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 754 | "android_stubs_dists_default", |
| 755 | ], |
| 756 | dist: { |
| 757 | dir: "apistubs/android/test", |
| 758 | }, |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 759 | } |
| 760 | |
Jihoon Kang | 059b949 | 2023-12-29 00:40:34 +0000 | [diff] [blame] | 761 | // This module does not need to be copied to dist |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 762 | java_library { |
Mark White | e35b138 | 2023-08-12 01:31:26 +0000 | [diff] [blame] | 763 | name: "android_test_frameworks_core_stubs_current.from-source", |
| 764 | static_libs: [ |
| 765 | "all-updatable-modules-system-stubs", |
| 766 | "android-non-updatable.stubs.test", |
Mark White | e35b138 | 2023-08-12 01:31:26 +0000 | [diff] [blame] | 767 | ], |
| 768 | defaults: [ |
| 769 | "android.jar_defaults", |
Mark White | e35b138 | 2023-08-12 01:31:26 +0000 | [diff] [blame] | 770 | ], |
Jihoon Kang | 059b949 | 2023-12-29 00:40:34 +0000 | [diff] [blame] | 771 | visibility: ["//frameworks/base/services"], |
Mark White | e35b138 | 2023-08-12 01:31:26 +0000 | [diff] [blame] | 772 | } |
| 773 | |
| 774 | java_library { |
Jihoon Kang | 1453baa | 2023-05-27 05:32:30 +0000 | [diff] [blame] | 775 | name: "android_module_lib_stubs_current.from-source", |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 776 | defaults: [ |
Anton Hansson | 65057af | 2021-04-14 18:52:08 +0100 | [diff] [blame] | 777 | "android.jar_defaults", |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 778 | ], |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 779 | static_libs: [ |
| 780 | "android-non-updatable.stubs.module_lib", |
Victor Chang | 6b107a9 | 2021-06-17 23:49:42 +0100 | [diff] [blame] | 781 | "art.module.public.api.stubs.module_lib", |
Giulio Fiscella | 68a0411 | 2021-11-30 16:32:44 +0000 | [diff] [blame] | 782 | "i18n.module.public.api.stubs", |
Anton Hansson | b7d532e | 2021-02-05 11:40:25 +0000 | [diff] [blame] | 783 | ], |
Jihoon Kang | 059b949 | 2023-12-29 00:40:34 +0000 | [diff] [blame] | 784 | visibility: ["//frameworks/base/services"], |
| 785 | } |
| 786 | |
| 787 | java_library { |
| 788 | name: "android_module_lib_stubs_current_exportable.from-source", |
| 789 | defaults: [ |
| 790 | "android.jar_defaults", |
| 791 | "android_stubs_dists_default", |
| 792 | ], |
| 793 | static_libs: [ |
| 794 | "android-non-updatable.stubs.exportable.module_lib", |
| 795 | "art.module.public.api.stubs.exportable.module_lib", |
| 796 | "i18n.module.public.api.stubs.exportable", |
| 797 | ], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 798 | dist: { |
| 799 | dir: "apistubs/android/module-lib", |
| 800 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 801 | } |
| 802 | |
Andrei Onea | faa271a | 2021-03-17 13:32:51 +0000 | [diff] [blame] | 803 | java_library { |
Jihoon Kang | 1453baa | 2023-05-27 05:32:30 +0000 | [diff] [blame] | 804 | name: "android_system_server_stubs_current.from-source", |
Anton Hansson | 21fb108 | 2023-03-03 16:22:42 +0000 | [diff] [blame] | 805 | defaults: [ |
| 806 | "android.jar_defaults", |
Anton Hansson | 21fb108 | 2023-03-03 16:22:42 +0000 | [diff] [blame] | 807 | ], |
Andrei Onea | faa271a | 2021-03-17 13:32:51 +0000 | [diff] [blame] | 808 | srcs: [":services-non-updatable-stubs"], |
| 809 | installable: false, |
| 810 | static_libs: [ |
Jihoon Kang | 1453baa | 2023-05-27 05:32:30 +0000 | [diff] [blame] | 811 | "android_module_lib_stubs_current.from-source", |
Andrei Onea | faa271a | 2021-03-17 13:32:51 +0000 | [diff] [blame] | 812 | ], |
Jihoon Kang | 059b949 | 2023-12-29 00:40:34 +0000 | [diff] [blame] | 813 | visibility: ["//frameworks/base/services"], |
| 814 | } |
| 815 | |
| 816 | java_library { |
| 817 | name: "android_system_server_stubs_current_exportable.from-source", |
| 818 | defaults: [ |
| 819 | "android.jar_defaults", |
| 820 | "android_stubs_dists_default", |
| 821 | ], |
| 822 | srcs: [":services-non-updatable-stubs{.exportable}"], |
| 823 | installable: false, |
| 824 | static_libs: [ |
| 825 | "android_module_lib_stubs_current_exportable.from-source", |
| 826 | ], |
Andrei Onea | faa271a | 2021-03-17 13:32:51 +0000 | [diff] [blame] | 827 | dist: { |
| 828 | dir: "apistubs/android/system-server", |
| 829 | }, |
| 830 | } |
| 831 | |
Colin Cross | cf87a57 | 2022-10-20 14:06:53 -0700 | [diff] [blame] | 832 | java_library { |
| 833 | name: "android_stubs_private_jar", |
| 834 | defaults: ["android.jar_defaults"], |
| 835 | visibility: [ |
| 836 | "//visibility:override", |
| 837 | "//visibility:private", |
| 838 | ], |
| 839 | static_libs: [ |
| 840 | "stable.core.platform.api.stubs", |
| 841 | "core-lambda-stubs-for-system-modules", |
| 842 | "core-generated-annotation-stubs", |
| 843 | "framework", |
| 844 | "ext", |
| 845 | "framework-res-package-jar", |
| 846 | // The order of this matters, it has to be last to provide a |
| 847 | // package-private androidx.annotation.RecentlyNonNull without |
| 848 | // overriding the public android.annotation.Nullable in framework.jar |
| 849 | // with its own package-private android.annotation.Nullable. |
| 850 | "private-stub-annotations-jar", |
| 851 | ], |
Jihoon Kang | a7073b5 | 2024-02-12 23:18:52 +0000 | [diff] [blame] | 852 | is_stubs_module: true, |
Colin Cross | cf87a57 | 2022-10-20 14:06:53 -0700 | [diff] [blame] | 853 | } |
| 854 | |
| 855 | java_genrule { |
| 856 | name: "android_stubs_private_hjar", |
Colin Cross | cf87a57 | 2022-10-20 14:06:53 -0700 | [diff] [blame] | 857 | srcs: [":android_stubs_private_jar{.hjar}"], |
| 858 | out: ["android_stubs_private.jar"], |
| 859 | cmd: "cp $(in) $(out)", |
| 860 | } |
| 861 | |
| 862 | java_library { |
| 863 | name: "android_stubs_private", |
| 864 | defaults: ["android_stubs_dists_default"], |
Colin Cross | cf87a57 | 2022-10-20 14:06:53 -0700 | [diff] [blame] | 865 | sdk_version: "none", |
| 866 | system_modules: "none", |
| 867 | static_libs: ["android_stubs_private_hjar"], |
| 868 | dist: { |
Peter Kalauskas | cf9acc6 | 2024-02-12 21:13:03 +0000 | [diff] [blame] | 869 | // Add to private_api_stubs dist target for easier packaging by scripts. This module is |
| 870 | // useful for creating a platform SDK, which can be packaged in ANDROID_HOME and used from |
| 871 | // Gradle, allowing for development of platform apps that make use of hidden APIs. |
| 872 | targets: ["private_api_stubs"], |
Colin Cross | cf87a57 | 2022-10-20 14:06:53 -0700 | [diff] [blame] | 873 | dir: "apistubs/android/private", |
| 874 | }, |
| 875 | } |
| 876 | |
| 877 | java_genrule { |
| 878 | name: "android_stubs_private_framework_aidl", |
Colin Cross | cf87a57 | 2022-10-20 14:06:53 -0700 | [diff] [blame] | 879 | tools: ["sdkparcelables"], |
| 880 | srcs: [":android_stubs_private"], |
| 881 | out: ["framework.aidl"], |
| 882 | cmd: "rm -f $(genDir)/framework.aidl.merged && " + |
| 883 | "for i in $(in); do " + |
| 884 | " rm -f $(genDir)/framework.aidl.tmp && " + |
| 885 | " $(location sdkparcelables) $$i $(genDir)/framework.aidl.tmp && " + |
| 886 | " cat $(genDir)/framework.aidl.tmp >> $(genDir)/framework.aidl.merged; " + |
| 887 | "done && " + |
| 888 | "sort -u $(genDir)/framework.aidl.merged > $(out)", |
| 889 | dist: { |
Peter Kalauskas | cf9acc6 | 2024-02-12 21:13:03 +0000 | [diff] [blame] | 890 | targets: [ |
| 891 | "sdk", |
| 892 | // Add to private_api_stubs dist target for easier packaging by scripts. |
| 893 | // See explanation in the "android_stubs_private" module above. |
| 894 | "private_api_stubs", |
| 895 | ], |
Colin Cross | cf87a57 | 2022-10-20 14:06:53 -0700 | [diff] [blame] | 896 | dir: "apistubs/android/private", |
| 897 | }, |
| 898 | } |
| 899 | |
Jihoon Kang | 7b627ed | 2023-09-21 01:14:17 +0000 | [diff] [blame] | 900 | // |
| 901 | // Java API defaults and libraries for single tree build |
| 902 | // |
| 903 | |
| 904 | java_defaults { |
| 905 | name: "stub-annotation-defaults", |
| 906 | libs: [ |
| 907 | "stub-annotations", |
| 908 | ], |
| 909 | static_libs: [ |
| 910 | // stub annotations do not contribute to the API surfaces but are statically |
| 911 | // linked in the stubs for API surfaces (see frameworks/base/StubLibraries.bp). |
| 912 | // This is because annotation processors insist on loading the classes for any |
| 913 | // annotations found, thus should exist inside android.jar. |
| 914 | "private-stub-annotations-jar", |
| 915 | ], |
Jihoon Kang | a7073b5 | 2024-02-12 23:18:52 +0000 | [diff] [blame] | 916 | is_stubs_module: true, |
Jihoon Kang | 7b627ed | 2023-09-21 01:14:17 +0000 | [diff] [blame] | 917 | } |
| 918 | |
| 919 | // Listing of API domains contribution and dependencies per API surfaces |
| 920 | java_defaults { |
| 921 | name: "android_test_stubs_current_contributions", |
| 922 | api_surface: "test", |
| 923 | api_contributions: [ |
Jihoon Kang | 7b627ed | 2023-09-21 01:14:17 +0000 | [diff] [blame] | 924 | "framework-virtualization.stubs.source.test.api.contribution", |
Mark White | 3cc5e00 | 2023-08-07 11:18:09 +0000 | [diff] [blame] | 925 | "framework-location.stubs.source.test.api.contribution", |
Jihoon Kang | 7b627ed | 2023-09-21 01:14:17 +0000 | [diff] [blame] | 926 | ], |
| 927 | } |
| 928 | |
| 929 | java_defaults { |
| 930 | name: "android_test_frameworks_core_stubs_current_contributions", |
| 931 | api_surface: "test", |
| 932 | api_contributions: [ |
| 933 | "test-api-stubs-docs-non-updatable.api.contribution", |
| 934 | ], |
| 935 | } |
| 936 | |
| 937 | java_defaults { |
| 938 | name: "android_module_lib_stubs_current_contributions", |
| 939 | api_surface: "module-lib", |
| 940 | api_contributions: [ |
| 941 | "api-stubs-docs-non-updatable.api.contribution", |
| 942 | "system-api-stubs-docs-non-updatable.api.contribution", |
| 943 | "module-lib-api-stubs-docs-non-updatable.api.contribution", |
| 944 | "art.module.public.api.stubs.source.api.contribution", |
| 945 | "art.module.public.api.stubs.source.system.api.contribution", |
| 946 | "art.module.public.api.stubs.source.module_lib.api.contribution", |
| 947 | "i18n.module.public.api.stubs.source.api.contribution", |
| 948 | "i18n.module.public.api.stubs.source.system.api.contribution", |
| 949 | "i18n.module.public.api.stubs.source.module_lib.api.contribution", |
| 950 | ], |
Paul Duffin | a2c4cd7 | 2024-06-18 18:49:48 +0100 | [diff] [blame^] | 951 | previous_api: ":android.api.combined.module-lib.latest", |
Jihoon Kang | 7b627ed | 2023-09-21 01:14:17 +0000 | [diff] [blame] | 952 | } |
| 953 | |
| 954 | // Java API library definitions per API surface |
| 955 | java_api_library { |
| 956 | name: "android_stubs_current.from-text", |
| 957 | api_surface: "public", |
| 958 | defaults: [ |
| 959 | // This module is dynamically created at frameworks/base/api/api.go |
| 960 | // instead of being written out, in order to minimize edits in the codebase |
| 961 | // when there is a change in the list of modules. |
| 962 | // that contributes to an api surface. |
| 963 | "android_stubs_current_contributions", |
| 964 | "stub-annotation-defaults", |
| 965 | ], |
| 966 | api_contributions: [ |
| 967 | "api-stubs-docs-non-updatable.api.contribution", |
| 968 | ], |
| 969 | visibility: ["//visibility:public"], |
Jihoon Kang | d67ac47 | 2023-10-05 21:18:23 +0000 | [diff] [blame] | 970 | enable_validation: false, |
Jihoon Kang | 0d639bf | 2024-02-28 00:54:13 +0000 | [diff] [blame] | 971 | stubs_type: "everything", |
Jihoon Kang | 7b627ed | 2023-09-21 01:14:17 +0000 | [diff] [blame] | 972 | } |
| 973 | |
| 974 | java_api_library { |
| 975 | name: "android_system_stubs_current.from-text", |
| 976 | api_surface: "system", |
| 977 | defaults: [ |
| 978 | "android_stubs_current_contributions", |
| 979 | "android_system_stubs_current_contributions", |
| 980 | "stub-annotation-defaults", |
| 981 | ], |
| 982 | api_contributions: [ |
| 983 | "api-stubs-docs-non-updatable.api.contribution", |
| 984 | "system-api-stubs-docs-non-updatable.api.contribution", |
| 985 | ], |
| 986 | visibility: ["//visibility:public"], |
Jihoon Kang | d67ac47 | 2023-10-05 21:18:23 +0000 | [diff] [blame] | 987 | enable_validation: false, |
Jihoon Kang | 0d639bf | 2024-02-28 00:54:13 +0000 | [diff] [blame] | 988 | stubs_type: "everything", |
Jihoon Kang | 7b627ed | 2023-09-21 01:14:17 +0000 | [diff] [blame] | 989 | } |
| 990 | |
| 991 | java_api_library { |
| 992 | name: "android_test_stubs_current.from-text", |
| 993 | api_surface: "test", |
| 994 | defaults: [ |
| 995 | "android_stubs_current_contributions", |
| 996 | "android_system_stubs_current_contributions", |
| 997 | "android_test_stubs_current_contributions", |
| 998 | "stub-annotation-defaults", |
| 999 | ], |
| 1000 | api_contributions: [ |
| 1001 | "api-stubs-docs-non-updatable.api.contribution", |
| 1002 | "system-api-stubs-docs-non-updatable.api.contribution", |
Jihoon Kang | 1c5022b | 2023-09-20 22:02:29 +0000 | [diff] [blame] | 1003 | "test-api-stubs-docs-non-updatable.api.contribution", |
Jihoon Kang | 7b627ed | 2023-09-21 01:14:17 +0000 | [diff] [blame] | 1004 | ], |
| 1005 | visibility: ["//visibility:public"], |
Jihoon Kang | d67ac47 | 2023-10-05 21:18:23 +0000 | [diff] [blame] | 1006 | enable_validation: false, |
Jihoon Kang | 0d639bf | 2024-02-28 00:54:13 +0000 | [diff] [blame] | 1007 | stubs_type: "everything", |
Jihoon Kang | 7b627ed | 2023-09-21 01:14:17 +0000 | [diff] [blame] | 1008 | } |
| 1009 | |
| 1010 | java_api_library { |
| 1011 | name: "android_test_frameworks_core_stubs_current.from-text", |
| 1012 | api_surface: "test", |
| 1013 | defaults: [ |
| 1014 | "android_stubs_current_contributions", |
| 1015 | "android_system_stubs_current_contributions", |
| 1016 | "android_test_frameworks_core_stubs_current_contributions", |
Jihoon Kang | beeb35a | 2023-10-17 22:22:24 +0000 | [diff] [blame] | 1017 | ], |
| 1018 | libs: [ |
| 1019 | "stub-annotations", |
Jihoon Kang | 7b627ed | 2023-09-21 01:14:17 +0000 | [diff] [blame] | 1020 | ], |
| 1021 | api_contributions: [ |
| 1022 | "api-stubs-docs-non-updatable.api.contribution", |
| 1023 | "system-api-stubs-docs-non-updatable.api.contribution", |
| 1024 | ], |
Jihoon Kang | d67ac47 | 2023-10-05 21:18:23 +0000 | [diff] [blame] | 1025 | enable_validation: false, |
Jihoon Kang | 0d639bf | 2024-02-28 00:54:13 +0000 | [diff] [blame] | 1026 | stubs_type: "everything", |
Jihoon Kang | 7b627ed | 2023-09-21 01:14:17 +0000 | [diff] [blame] | 1027 | } |
| 1028 | |
| 1029 | java_api_library { |
| 1030 | name: "android_module_lib_stubs_current_full.from-text", |
| 1031 | api_surface: "module-lib", |
| 1032 | defaults: [ |
| 1033 | "android_stubs_current_contributions", |
| 1034 | "android_system_stubs_current_contributions", |
| 1035 | "android_module_lib_stubs_current_contributions_full", |
| 1036 | ], |
| 1037 | libs: [ |
| 1038 | "stub-annotations", |
| 1039 | ], |
| 1040 | api_contributions: [ |
| 1041 | "api-stubs-docs-non-updatable.api.contribution", |
| 1042 | "system-api-stubs-docs-non-updatable.api.contribution", |
| 1043 | "module-lib-api-stubs-docs-non-updatable.api.contribution", |
| 1044 | ], |
| 1045 | visibility: ["//visibility:public"], |
Jihoon Kang | d67ac47 | 2023-10-05 21:18:23 +0000 | [diff] [blame] | 1046 | enable_validation: false, |
Jihoon Kang | 0d639bf | 2024-02-28 00:54:13 +0000 | [diff] [blame] | 1047 | stubs_type: "everything", |
Jihoon Kang | 7b627ed | 2023-09-21 01:14:17 +0000 | [diff] [blame] | 1048 | } |
| 1049 | |
| 1050 | java_api_library { |
| 1051 | name: "android_module_lib_stubs_current.from-text", |
| 1052 | api_surface: "module-lib", |
| 1053 | defaults: [ |
| 1054 | "android_module_lib_stubs_current_contributions", |
| 1055 | ], |
| 1056 | libs: [ |
| 1057 | "android_module_lib_stubs_current_full.from-text", |
| 1058 | "stub-annotations", |
| 1059 | ], |
| 1060 | visibility: ["//visibility:public"], |
Jihoon Kang | d67ac47 | 2023-10-05 21:18:23 +0000 | [diff] [blame] | 1061 | enable_validation: false, |
Jihoon Kang | 0d639bf | 2024-02-28 00:54:13 +0000 | [diff] [blame] | 1062 | stubs_type: "everything", |
Jihoon Kang | 7b627ed | 2023-09-21 01:14:17 +0000 | [diff] [blame] | 1063 | } |
| 1064 | |
| 1065 | java_api_library { |
Jihoon Kang | 4683b14 | 2023-10-05 23:42:51 +0000 | [diff] [blame] | 1066 | name: "android_test_module_lib_stubs_current.from-text", |
| 1067 | api_surface: "module-lib", |
| 1068 | defaults: [ |
| 1069 | "android_stubs_current_contributions", |
| 1070 | "android_system_stubs_current_contributions", |
| 1071 | "android_test_stubs_current_contributions", |
| 1072 | "android_module_lib_stubs_current_contributions", |
| 1073 | ], |
| 1074 | libs: [ |
| 1075 | "android_module_lib_stubs_current_full.from-text", |
| 1076 | "stub-annotations", |
| 1077 | ], |
| 1078 | api_contributions: [ |
| 1079 | "test-api-stubs-docs-non-updatable.api.contribution", |
| 1080 | ], |
| 1081 | |
| 1082 | // This module is only used to build android-non-updatable.stubs.test_module_lib |
| 1083 | // and other modules should not depend on this module. |
| 1084 | visibility: [ |
| 1085 | "//visibility:private", |
| 1086 | ], |
Jihoon Kang | d67ac47 | 2023-10-05 21:18:23 +0000 | [diff] [blame] | 1087 | enable_validation: false, |
Jihoon Kang | 0d639bf | 2024-02-28 00:54:13 +0000 | [diff] [blame] | 1088 | stubs_type: "everything", |
Jihoon Kang | 4683b14 | 2023-10-05 23:42:51 +0000 | [diff] [blame] | 1089 | } |
| 1090 | |
| 1091 | java_api_library { |
Jihoon Kang | 7b627ed | 2023-09-21 01:14:17 +0000 | [diff] [blame] | 1092 | name: "android_system_server_stubs_current.from-text", |
| 1093 | api_surface: "system-server", |
| 1094 | api_contributions: [ |
| 1095 | "services-non-updatable-stubs.api.contribution", |
| 1096 | ], |
| 1097 | libs: [ |
| 1098 | "android_module_lib_stubs_current.from-text", |
| 1099 | "stub-annotations", |
| 1100 | ], |
| 1101 | static_libs: [ |
| 1102 | "android_module_lib_stubs_current.from-text", |
| 1103 | ], |
| 1104 | visibility: ["//visibility:public"], |
Jihoon Kang | d67ac47 | 2023-10-05 21:18:23 +0000 | [diff] [blame] | 1105 | enable_validation: false, |
Jihoon Kang | 0d639bf | 2024-02-28 00:54:13 +0000 | [diff] [blame] | 1106 | stubs_type: "everything", |
Jihoon Kang | 7b627ed | 2023-09-21 01:14:17 +0000 | [diff] [blame] | 1107 | } |
| 1108 | |
Anton Hansson | 36bc27c | 2021-09-14 15:45:13 +0100 | [diff] [blame] | 1109 | //////////////////////////////////////////////////////////////////////// |
| 1110 | // api-versions.xml generation, for public and system. This API database |
| 1111 | // also contains the android.test.* APIs. |
| 1112 | //////////////////////////////////////////////////////////////////////// |
| 1113 | |
| 1114 | java_library { |
| 1115 | name: "android_stubs_current_with_test_libs", |
| 1116 | static_libs: [ |
Jihoon Kang | 2a829bb | 2024-02-01 22:01:15 +0000 | [diff] [blame] | 1117 | "android_stubs_current_exportable", |
Anton Hansson | 36bc27c | 2021-09-14 15:45:13 +0100 | [diff] [blame] | 1118 | "android.test.base.stubs", |
| 1119 | "android.test.mock.stubs", |
| 1120 | "android.test.runner.stubs", |
| 1121 | ], |
| 1122 | defaults: ["android.jar_defaults"], |
| 1123 | visibility: [ |
| 1124 | "//visibility:override", |
| 1125 | "//visibility:private", |
| 1126 | ], |
| 1127 | } |
| 1128 | |
| 1129 | java_library { |
| 1130 | name: "android_system_stubs_current_with_test_libs", |
| 1131 | static_libs: [ |
Jihoon Kang | 2a829bb | 2024-02-01 22:01:15 +0000 | [diff] [blame] | 1132 | "android_system_stubs_current_exportable", |
Anton Hansson | 36bc27c | 2021-09-14 15:45:13 +0100 | [diff] [blame] | 1133 | "android.test.base.stubs.system", |
| 1134 | "android.test.mock.stubs.system", |
| 1135 | "android.test.runner.stubs.system", |
| 1136 | ], |
| 1137 | defaults: ["android.jar_defaults"], |
| 1138 | visibility: [ |
| 1139 | "//visibility:override", |
| 1140 | "//visibility:private", |
| 1141 | ], |
| 1142 | } |
| 1143 | |
Cole Faust | dcda370 | 2022-10-04 14:46:35 -0700 | [diff] [blame] | 1144 | java_library { |
| 1145 | name: "android_module_stubs_current_with_test_libs", |
| 1146 | static_libs: [ |
Jihoon Kang | 2a829bb | 2024-02-01 22:01:15 +0000 | [diff] [blame] | 1147 | "android_module_lib_stubs_current_exportable", |
Cole Faust | dcda370 | 2022-10-04 14:46:35 -0700 | [diff] [blame] | 1148 | "android.test.base.stubs", |
| 1149 | "android.test.mock.stubs", |
| 1150 | "android.test.runner.stubs", |
| 1151 | ], |
| 1152 | defaults: ["android.jar_defaults"], |
| 1153 | visibility: [ |
| 1154 | "//visibility:override", |
| 1155 | "//visibility:private", |
| 1156 | ], |
| 1157 | } |
| 1158 | |
| 1159 | java_library { |
| 1160 | name: "android_system_server_stubs_current_with_test_libs", |
| 1161 | static_libs: [ |
Jihoon Kang | 2a829bb | 2024-02-01 22:01:15 +0000 | [diff] [blame] | 1162 | "android_system_server_stubs_current_exportable", |
Cole Faust | dcda370 | 2022-10-04 14:46:35 -0700 | [diff] [blame] | 1163 | "android.test.base.stubs.system", |
| 1164 | "android.test.mock.stubs.system", |
| 1165 | "android.test.runner.stubs.system", |
| 1166 | ], |
| 1167 | defaults: ["android.jar_defaults"], |
| 1168 | visibility: [ |
| 1169 | "//visibility:override", |
| 1170 | "//visibility:private", |
| 1171 | ], |
| 1172 | } |
| 1173 | |
Paul Duffin | 0834ea7 | 2024-05-02 12:09:51 +0100 | [diff] [blame] | 1174 | // Defaults for `droidstubs` modules that generate `api-versions.xml` files for |
| 1175 | // the various API surfaces. |
| 1176 | stubs_defaults { |
| 1177 | name: "api_versions_base_defaults", |
| 1178 | defaults_visibility: ["//visibility:private"], |
Anton Hansson | 36bc27c | 2021-09-14 15:45:13 +0100 | [diff] [blame] | 1179 | generate_stubs: false, |
| 1180 | api_levels_annotations_enabled: true, |
| 1181 | api_levels_annotations_dirs: [ |
| 1182 | "sdk-dir", |
| 1183 | "api-versions-jars-dir", |
| 1184 | ], |
Paul Duffin | 0834ea7 | 2024-05-02 12:09:51 +0100 | [diff] [blame] | 1185 | } |
| 1186 | |
| 1187 | // Defaults for `droidstubs` modules that generate complete `api-versions.xml` |
| 1188 | // files, i.e. include SDK extensions. |
| 1189 | stubs_defaults { |
| 1190 | name: "api_versions_complete_defaults", |
| 1191 | defaults_visibility: ["//visibility:private"], |
| 1192 | defaults: ["api_versions_base_defaults"], |
MÃ¥rten Kongstad | 5484533 | 2022-09-06 15:50:37 +0200 | [diff] [blame] | 1193 | extensions_info_file: ":sdk-extensions-info", |
Paul Duffin | 0834ea7 | 2024-05-02 12:09:51 +0100 | [diff] [blame] | 1194 | } |
| 1195 | |
| 1196 | // Produces an `api-versions.xml` file that includes up-to-date information |
| 1197 | // about all the public APIs, both updatable and non-updatable and historic |
| 1198 | // information about all previous dessert and SDK extension releases. |
| 1199 | droidstubs { |
| 1200 | name: "api_versions_public", |
| 1201 | defaults: ["api_versions_complete_defaults"], |
| 1202 | srcs: [":android_stubs_current_with_test_libs{.jar}"], |
| 1203 | api_levels_sdk_type: "public", |
Anton Hansson | ca6e67a | 2023-03-03 17:55:09 +0000 | [diff] [blame] | 1204 | visibility: ["//frameworks/base"], |
Anton Hansson | 36bc27c | 2021-09-14 15:45:13 +0100 | [diff] [blame] | 1205 | } |
| 1206 | |
Paul Duffin | 0834ea7 | 2024-05-02 12:09:51 +0100 | [diff] [blame] | 1207 | // Produces an `api-versions.xml` file that includes up-to-date information |
| 1208 | // about all the system APIs, both updatable and non-updatable and historic |
| 1209 | // information about all previous dessert and SDK extension releases. |
Anton Hansson | 36bc27c | 2021-09-14 15:45:13 +0100 | [diff] [blame] | 1210 | droidstubs { |
| 1211 | name: "api_versions_system", |
Paul Duffin | 0834ea7 | 2024-05-02 12:09:51 +0100 | [diff] [blame] | 1212 | defaults: ["api_versions_complete_defaults"], |
Anton Hansson | 36bc27c | 2021-09-14 15:45:13 +0100 | [diff] [blame] | 1213 | srcs: [":android_system_stubs_current_with_test_libs{.jar}"], |
Anton Hansson | 36bc27c | 2021-09-14 15:45:13 +0100 | [diff] [blame] | 1214 | api_levels_sdk_type: "system", |
Paul Duffin | 75f6360 | 2024-01-05 18:15:59 +0000 | [diff] [blame] | 1215 | dists: [ |
| 1216 | // Make the api-versions.xml file for the system API available in the |
| 1217 | // sdk build target. |
| 1218 | { |
| 1219 | targets: ["sdk"], |
| 1220 | dest: "api-versions_system.xml", |
| 1221 | tag: ".api_versions.xml", |
| 1222 | }, |
| 1223 | ], |
Anton Hansson | 36bc27c | 2021-09-14 15:45:13 +0100 | [diff] [blame] | 1224 | } |
| 1225 | |
Paul Duffin | 0834ea7 | 2024-05-02 12:09:51 +0100 | [diff] [blame] | 1226 | // Defaults for `droidstubs` modules that generate `api-versions.xml` files that |
| 1227 | // only include non-updatable code, i.e. for platform API only, not SDK |
| 1228 | // extensions. |
| 1229 | stubs_defaults { |
| 1230 | name: "api_versions_non_updatable_defaults", |
| 1231 | defaults_visibility: ["//visibility:private"], |
| 1232 | defaults: ["api_versions_base_defaults"], |
Cole Faust | bf4ce75 | 2023-02-08 12:46:06 -0800 | [diff] [blame] | 1233 | // this only has the non-updatable portions of the module lib sdk, |
| 1234 | // which can reference classes from updatable apexes, so remove references to them |
| 1235 | // from this api_versions file. |
| 1236 | flags: ["--remove-missing-class-references-in-api-levels"], |
Cole Faust | 1deced1 | 2023-02-15 13:24:18 -0800 | [diff] [blame] | 1237 | // extensions_info_file is purposefully omitted, because this module should just be |
| 1238 | // the non-updatable portions of the sdk, and extension sdks are updatable. |
Cole Faust | dcda370 | 2022-10-04 14:46:35 -0700 | [diff] [blame] | 1239 | } |
| 1240 | |
Paul Duffin | 0834ea7 | 2024-05-02 12:09:51 +0100 | [diff] [blame] | 1241 | // Produces an `api-versions.xml` file that includes up-to-date information |
| 1242 | // about only the non-updatable module-lib APIs and historic information about |
| 1243 | // all previous dessert and SDK extension releases. That historic information |
| 1244 | // may include information about APIs that were previously not-updatable which |
| 1245 | // have since become updatable. |
| 1246 | droidstubs { |
| 1247 | name: "api_versions_module_lib", |
| 1248 | defaults: ["api_versions_non_updatable_defaults"], |
| 1249 | srcs: [":android_module_stubs_current_with_test_libs{.jar}"], |
| 1250 | api_levels_sdk_type: "module-lib", |
| 1251 | } |
| 1252 | |
Paul Duffin | fb5e07d | 2024-05-02 14:51:41 +0100 | [diff] [blame] | 1253 | // Create a single jar containing the whole module-lib API surface. |
| 1254 | // This is needed because Metalava only consumes the first jar file it is given |
| 1255 | // and ignores the rest. |
| 1256 | java_library { |
| 1257 | name: "android_module_stubs_complete_current_with_test_libs", |
| 1258 | static_libs: [ |
| 1259 | "android_module_stubs_current_with_test_libs", |
| 1260 | "framework-updatable-stubs-module_libs_api-exportable", |
| 1261 | ], |
| 1262 | defaults: ["android.jar_defaults"], |
| 1263 | visibility: [ |
| 1264 | "//visibility:override", |
| 1265 | "//visibility:private", |
| 1266 | ], |
| 1267 | } |
| 1268 | |
| 1269 | // Produces an `api-versions.xml` file that includes up-to-date information |
| 1270 | // about all the module-lib APIs, both updatable and non-updatable and historic |
| 1271 | // information about all previous dessert and SDK extension releases. |
| 1272 | droidstubs { |
| 1273 | name: "api_versions_module_lib_complete", |
| 1274 | defaults: ["api_versions_complete_defaults"], |
| 1275 | srcs: [":android_module_stubs_complete_current_with_test_libs{.jar}"], |
| 1276 | api_levels_sdk_type: "module-lib", |
| 1277 | } |
| 1278 | |
Paul Duffin | 0834ea7 | 2024-05-02 12:09:51 +0100 | [diff] [blame] | 1279 | // Produces an `api-versions.xml` file that includes up-to-date information |
| 1280 | // about only the non-updatable system-server APIs and historic information |
| 1281 | // about all previous dessert and SDK extension releases. That historic |
| 1282 | // information may include information about APIs that were previously |
| 1283 | // not-updatable which have since become updatable. |
Cole Faust | dcda370 | 2022-10-04 14:46:35 -0700 | [diff] [blame] | 1284 | droidstubs { |
| 1285 | name: "api_versions_system_server", |
Paul Duffin | 0834ea7 | 2024-05-02 12:09:51 +0100 | [diff] [blame] | 1286 | defaults: ["api_versions_non_updatable_defaults"], |
Cole Faust | dcda370 | 2022-10-04 14:46:35 -0700 | [diff] [blame] | 1287 | srcs: [":android_system_server_stubs_current_with_test_libs{.jar}"], |
Cole Faust | dcda370 | 2022-10-04 14:46:35 -0700 | [diff] [blame] | 1288 | api_levels_sdk_type: "system-server", |
Cole Faust | dcda370 | 2022-10-04 14:46:35 -0700 | [diff] [blame] | 1289 | } |
| 1290 | |
Paul Duffin | fb5e07d | 2024-05-02 14:51:41 +0100 | [diff] [blame] | 1291 | // Create a single jar containing the whole system-server API surface. |
| 1292 | // This is needed because Metalava only consumes the first jar file it is given |
| 1293 | // and ignores the rest. |
| 1294 | java_library { |
| 1295 | name: "android_system_server_stubs_complete_current_with_test_libs", |
| 1296 | static_libs: [ |
| 1297 | "android_system_server_stubs_current_with_test_libs", |
| 1298 | // system-server extends module-lib but libraries which only service-* |
| 1299 | // libraries provided system-server APIs, so include module-lib APIs for |
| 1300 | // the others, e.g. framework-* libraries. |
| 1301 | "framework-updatable-stubs-module_libs_api-exportable", |
| 1302 | "framework-updatable-stubs-system_server_api-exportable", |
| 1303 | ], |
| 1304 | defaults: ["android.jar_defaults"], |
| 1305 | visibility: [ |
| 1306 | "//visibility:override", |
| 1307 | "//visibility:private", |
| 1308 | ], |
| 1309 | } |
| 1310 | |
| 1311 | // Produces an `api-versions.xml` file that includes up-to-date information |
| 1312 | // about all the system-server APIs, both updatable and non-updatable and |
| 1313 | // historic information about all previous dessert and SDK extension releases. |
| 1314 | droidstubs { |
| 1315 | name: "api_versions_system_server_complete", |
| 1316 | defaults: ["api_versions_complete_defaults"], |
| 1317 | srcs: [":android_system_server_stubs_complete_current_with_test_libs{.jar}"], |
| 1318 | api_levels_sdk_type: "system-server", |
| 1319 | } |
| 1320 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 1321 | ///////////////////////////////////////////////////////////////////// |
| 1322 | // hwbinder.stubs provides APIs required for building HIDL Java |
| 1323 | // libraries. |
| 1324 | ///////////////////////////////////////////////////////////////////// |
| 1325 | |
| 1326 | droidstubs { |
| 1327 | name: "hwbinder-stubs-docs", |
Anton Hansson | 23f319f | 2023-03-03 16:04:02 +0000 | [diff] [blame] | 1328 | srcs: [":hwbinder-stubs-srcs"], |
Colin Cross | 037d7fb | 2021-03-25 17:01:55 -0700 | [diff] [blame] | 1329 | libs: ["framework-annotations-lib"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 1330 | installable: false, |
| 1331 | sdk_version: "core_platform", |
| 1332 | annotations_enabled: true, |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 1333 | previous_api: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 1334 | merge_annotations_dirs: [ |
| 1335 | "metalava-manual", |
| 1336 | ], |
Anton Hansson | 84a0e71 | 2023-10-23 09:17:45 +0000 | [diff] [blame] | 1337 | flags: priv_apps, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 1338 | } |
| 1339 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 1340 | java_library { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 1341 | name: "hwbinder.stubs", |
| 1342 | sdk_version: "core_current", |
Colin Cross | 037d7fb | 2021-03-25 17:01:55 -0700 | [diff] [blame] | 1343 | libs: ["framework-annotations-lib"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 1344 | srcs: [ |
| 1345 | ":hwbinder-stubs-docs", |
| 1346 | ], |
Anton Hansson | 8692568 | 2021-04-14 14:54:43 +0100 | [diff] [blame] | 1347 | visibility: ["//visibility:public"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 1348 | } |