blob: 0acd759bc73ea504793a1bfd089212f3cac3b81e [file] [log] [blame]
Anton Hanssonfcb91d42020-09-21 16:32:14 +01001// Copyright (C) 2020 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
15package {
16 default_visibility: ["//visibility:private"],
Bob Badour051ef782021-02-12 17:07:05 -080017 // See: http://go/android-license-faq
18 // A large-scale-change added 'default_applicable_licenses' to import
19 // all of the 'license_kinds' from "frameworks_base_license"
20 // to get the below license kinds:
21 // SPDX-license-identifier-Apache-2.0
22 // SPDX-license-identifier-MIT
23 // SPDX-license-identifier-Unicode-DFS
24 default_applicable_licenses: ["frameworks_base_license"],
Anton Hanssonfcb91d42020-09-21 16:32:14 +010025}
26
Anton Hanssone6737842021-09-27 12:18:20 +010027python_defaults {
28 name: "python3_version_defaults",
Pedro Loureirodea35e12021-05-26 15:50:07 +000029 version: {
30 py2: {
31 enabled: false,
32 },
33 py3: {
34 enabled: true,
35 embedded_launcher: false,
36 },
37 },
38}
39
Anton Hanssone6737842021-09-27 12:18:20 +010040python_binary_host {
41 name: "api_versions_trimmer",
42 srcs: ["api_versions_trimmer.py"],
43 defaults: ["python3_version_defaults"],
44}
45
Pedro Loureirodea35e12021-05-26 15:50:07 +000046python_test_host {
47 name: "api_versions_trimmer_unittests",
48 main: "api_versions_trimmer_unittests.py",
49 srcs: [
50 "api_versions_trimmer_unittests.py",
51 "api_versions_trimmer.py",
52 ],
Anton Hanssone6737842021-09-27 12:18:20 +010053 defaults: ["python3_version_defaults"],
Pedro Loureirodea35e12021-05-26 15:50:07 +000054 test_options: {
55 unit_test: true,
56 },
Anton Hanssone6737842021-09-27 12:18:20 +010057}
58
59python_binary_host {
60 name: "merge_annotation_zips",
61 srcs: ["merge_annotation_zips.py"],
62 defaults: ["python3_version_defaults"],
63}
64
65python_test_host {
66 name: "merge_annotation_zips_test",
67 main: "merge_annotation_zips_test.py",
68 srcs: [
69 "merge_annotation_zips.py",
70 "merge_annotation_zips_test.py",
71 ],
72 defaults: ["python3_version_defaults"],
73 test_options: {
74 unit_test: true,
Pedro Loureirodea35e12021-05-26 15:50:07 +000075 },
76}
77
Anton Hanssonaa26cc12021-02-15 10:52:33 +000078metalava_cmd = "$(location metalava)"
79// Silence reflection warnings. See b/168689341
80metalava_cmd += " -J--add-opens=java.base/java.util=ALL-UNNAMED "
Anton Hanssonb8ce0812021-08-24 12:08:39 +010081metalava_cmd += " --quiet --no-banner --format=v2 "
Anton Hanssonaa26cc12021-02-15 10:52:33 +000082
Sasha Smundak02cbff442019-08-15 08:27:51 -070083genrule {
84 name: "current-api-xml",
85 tools: ["metalava"],
Anton Hansson00febe22020-11-05 10:30:59 +000086 srcs: [":frameworks-base-api-current.txt"],
Sasha Smundak02cbff442019-08-15 08:27:51 -070087 out: ["current.api"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +000088 cmd: metalava_cmd + "-convert2xmlnostrip $(in) $(out)",
Anton Hanssonfcb91d42020-09-21 16:32:14 +010089 visibility: ["//visibility:public"],
Sasha Smundak02cbff442019-08-15 08:27:51 -070090}
Anton Hansson85359f62020-09-21 17:02:25 +010091
92genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +000093 name: "frameworks-base-api-current.txt",
Anton Hansson85359f62020-09-21 17:02:25 +010094 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -080095 ":android.net.ipsec.ike{.public.api.txt}",
Anton Hanssonfc948d862020-12-17 16:57:35 +000096 ":art.module.public.api{.public.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +010097 ":conscrypt.module.public.api{.public.api.txt}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +090098 ":framework-connectivity{.public.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +010099 ":framework-media{.public.api.txt}",
100 ":framework-mediaprovider{.public.api.txt}",
101 ":framework-permission{.public.api.txt}",
102 ":framework-sdkextensions{.public.api.txt}",
103 ":framework-statsd{.public.api.txt}",
104 ":framework-tethering{.public.api.txt}",
105 ":framework-wifi{.public.api.txt}",
Paul Duffin5a4e8f22020-11-25 15:45:43 +0000106 ":i18n.module.public.api{.public.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +0100107 ":non-updatable-current.txt",
108 ],
109 out: ["current.txt"],
110 tools: ["metalava"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +0000111 cmd: metalava_cmd + "$(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100112 dists: [
113 {
114 targets: ["droidcore"],
115 dir: "api",
116 dest: "current.txt",
117 },
118 {
Pedro Loureiro4f09b852021-06-09 10:59:32 +0000119 targets: [
120 "sdk",
121 "win_sdk",
122 ],
Anton Hanssona9ced802020-10-20 19:26:18 +0100123 dir: "apistubs/android/public/api",
124 dest: "android.txt",
125 },
126 ],
Anton Hansson1c4fab42020-11-02 11:57:33 +0000127 visibility: ["//visibility:public"],
Anton Hansson85359f62020-09-21 17:02:25 +0100128}
129
130genrule {
Anton Hansson0d6eae62021-02-12 16:47:18 +0000131 name: "frameworks-base-api-current-compat",
132 srcs: [
133 ":android.api.public.latest",
134 ":android-incompatibilities.api.public.latest",
135 ":frameworks-base-api-current.txt",
136 ],
Anton Hanssonb8ce0812021-08-24 12:08:39 +0100137 out: ["updated-baseline.txt"],
Anton Hansson0d6eae62021-02-12 16:47:18 +0000138 tools: ["metalava"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +0000139 cmd: metalava_cmd +
Anton Hansson0d6eae62021-02-12 16:47:18 +0000140 "--check-compatibility:api:released $(location :android.api.public.latest) " +
141 "--baseline:compatibility:released $(location :android-incompatibilities.api.public.latest) " +
Anton Hanssonb8ce0812021-08-24 12:08:39 +0100142 "--update-baseline:compatibility:released $(genDir)/updated-baseline.txt " +
143 "$(location :frameworks-base-api-current.txt)",
Anton Hansson0d6eae62021-02-12 16:47:18 +0000144}
145
146genrule {
Anton Hanssond75144f2020-11-05 20:21:08 +0000147 name: "frameworks-base-api-current.srcjar",
148 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -0800149 ":android.net.ipsec.ike{.public.stubs.source}",
Anton Hanssond75144f2020-11-05 20:21:08 +0000150 ":api-stubs-docs-non-updatable",
Anton Hanssonfc948d862020-12-17 16:57:35 +0000151 ":art.module.public.api{.public.stubs.source}",
Anton Hanssond75144f2020-11-05 20:21:08 +0000152 ":conscrypt.module.public.api{.public.stubs.source}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +0900153 ":framework-connectivity{.public.stubs.source}",
Anton Hanssond75144f2020-11-05 20:21:08 +0000154 ":framework-media{.public.stubs.source}",
155 ":framework-mediaprovider{.public.stubs.source}",
156 ":framework-permission{.public.stubs.source}",
157 ":framework-sdkextensions{.public.stubs.source}",
158 ":framework-statsd{.public.stubs.source}",
159 ":framework-tethering{.public.stubs.source}",
160 ":framework-wifi{.public.stubs.source}",
Paul Duffin5a4e8f22020-11-25 15:45:43 +0000161 ":i18n.module.public.api{.public.stubs.source}",
Anton Hanssond75144f2020-11-05 20:21:08 +0000162 ],
163 out: ["current.srcjar"],
164 tools: ["merge_zips"],
165 cmd: "$(location merge_zips) $(out) $(in)",
166 visibility: ["//visibility:private"], // Used by make module in //development, mind.
167}
168
169genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000170 name: "frameworks-base-api-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100171 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -0800172 ":android.net.ipsec.ike{.public.removed-api.txt}",
Anton Hanssonfc948d862020-12-17 16:57:35 +0000173 ":art.module.public.api{.public.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100174 ":conscrypt.module.public.api{.public.removed-api.txt}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +0900175 ":framework-connectivity{.public.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100176 ":framework-media{.public.removed-api.txt}",
177 ":framework-mediaprovider{.public.removed-api.txt}",
178 ":framework-permission{.public.removed-api.txt}",
179 ":framework-sdkextensions{.public.removed-api.txt}",
180 ":framework-statsd{.public.removed-api.txt}",
181 ":framework-tethering{.public.removed-api.txt}",
182 ":framework-wifi{.public.removed-api.txt}",
Paul Duffin5a4e8f22020-11-25 15:45:43 +0000183 ":i18n.module.public.api{.public.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100184 ":non-updatable-removed.txt",
185 ],
186 out: ["removed.txt"],
187 tools: ["metalava"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +0000188 cmd: metalava_cmd + "$(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100189 dists: [
190 {
191 targets: ["droidcore"],
192 dir: "api",
193 dest: "removed.txt",
194 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000195 {
Pedro Loureiro4f09b852021-06-09 10:59:32 +0000196 targets: [
197 "sdk",
198 "win_sdk",
199 ],
Anton Hansson85785fe2021-01-20 20:23:34 +0000200 dir: "apistubs/android/public/api",
201 dest: "removed.txt",
202 },
Anton Hanssona9ced802020-10-20 19:26:18 +0100203 ],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100204}
205
206genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000207 name: "frameworks-base-api-system-current.txt",
Anton Hansson85359f62020-09-21 17:02:25 +0100208 srcs: [
Victor Changd21107a2021-05-12 10:47:16 +0100209 ":art.module.public.api{.system.api.txt}",
Yan Yanf8b973c2021-02-03 16:07:30 -0800210 ":android.net.ipsec.ike{.system.api.txt}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +0900211 ":framework-connectivity{.system.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +0100212 ":framework-media{.system.api.txt}",
213 ":framework-mediaprovider{.system.api.txt}",
214 ":framework-permission{.system.api.txt}",
215 ":framework-sdkextensions{.system.api.txt}",
216 ":framework-statsd{.system.api.txt}",
217 ":framework-tethering{.system.api.txt}",
218 ":framework-wifi{.system.api.txt}",
219 ":non-updatable-system-current.txt",
220 ],
221 out: ["system-current.txt"],
222 tools: ["metalava"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +0000223 cmd: metalava_cmd + "$(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100224 dists: [
225 {
226 targets: ["droidcore"],
227 dir: "api",
228 dest: "system-current.txt",
229 },
230 {
Pedro Loureiro4f09b852021-06-09 10:59:32 +0000231 targets: [
232 "sdk",
233 "win_sdk",
234 ],
Anton Hanssona9ced802020-10-20 19:26:18 +0100235 dir: "apistubs/android/system/api",
236 dest: "android.txt",
237 },
238 ],
Anton Hansson1c4fab42020-11-02 11:57:33 +0000239 visibility: ["//visibility:public"],
Anton Hansson85359f62020-09-21 17:02:25 +0100240}
241
242genrule {
Anton Hansson0d6eae62021-02-12 16:47:18 +0000243 name: "frameworks-base-api-system-current-compat",
244 srcs: [
245 ":android.api.system.latest",
246 ":android-incompatibilities.api.system.latest",
247 ":frameworks-base-api-current.txt",
248 ":frameworks-base-api-system-current.txt",
249 ],
Anton Hanssonb8ce0812021-08-24 12:08:39 +0100250 out: ["updated-baseline.txt"],
Anton Hansson0d6eae62021-02-12 16:47:18 +0000251 tools: ["metalava"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +0000252 cmd: metalava_cmd +
Anton Hansson0d6eae62021-02-12 16:47:18 +0000253 "--check-compatibility:api:released $(location :android.api.system.latest) " +
254 "--check-compatibility:base $(location :frameworks-base-api-current.txt) " +
255 "--baseline:compatibility:released $(location :android-incompatibilities.api.system.latest) " +
Anton Hanssonb8ce0812021-08-24 12:08:39 +0100256 "--update-baseline:compatibility:released $(genDir)/updated-baseline.txt " +
257 "$(location :frameworks-base-api-system-current.txt)",
Anton Hansson0d6eae62021-02-12 16:47:18 +0000258}
259
260genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000261 name: "frameworks-base-api-system-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100262 srcs: [
Victor Changd21107a2021-05-12 10:47:16 +0100263 ":art.module.public.api{.system.removed-api.txt}",
Yan Yanf8b973c2021-02-03 16:07:30 -0800264 ":android.net.ipsec.ike{.system.removed-api.txt}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +0900265 ":framework-connectivity{.system.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100266 ":framework-media{.system.removed-api.txt}",
267 ":framework-mediaprovider{.system.removed-api.txt}",
268 ":framework-permission{.system.removed-api.txt}",
269 ":framework-sdkextensions{.system.removed-api.txt}",
270 ":framework-statsd{.system.removed-api.txt}",
271 ":framework-tethering{.system.removed-api.txt}",
272 ":framework-wifi{.system.removed-api.txt}",
273 ":non-updatable-system-removed.txt",
274 ],
275 out: ["system-removed.txt"],
276 tools: ["metalava"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +0000277 cmd: metalava_cmd + "$(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100278 dists: [
279 {
280 targets: ["droidcore"],
281 dir: "api",
282 dest: "system-removed.txt",
283 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000284 {
Pedro Loureiro4f09b852021-06-09 10:59:32 +0000285 targets: [
286 "sdk",
287 "win_sdk",
288 ],
Anton Hansson85785fe2021-01-20 20:23:34 +0000289 dir: "apistubs/android/system/api",
290 dest: "removed.txt",
291 },
Anton Hanssona9ced802020-10-20 19:26:18 +0100292 ],
Anton Hansson1c4fab42020-11-02 11:57:33 +0000293 visibility: ["//visibility:public"],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100294}
295
296genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000297 name: "frameworks-base-api-module-lib-current.txt",
Anton Hansson85359f62020-09-21 17:02:25 +0100298 srcs: [
Victor Changd21107a2021-05-12 10:47:16 +0100299 ":art.module.public.api{.module-lib.api.txt}",
Yan Yanf8b973c2021-02-03 16:07:30 -0800300 ":android.net.ipsec.ike{.module-lib.api.txt}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +0900301 ":framework-connectivity{.module-lib.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +0100302 ":framework-media{.module-lib.api.txt}",
303 ":framework-mediaprovider{.module-lib.api.txt}",
304 ":framework-permission{.module-lib.api.txt}",
305 ":framework-sdkextensions{.module-lib.api.txt}",
306 ":framework-statsd{.module-lib.api.txt}",
307 ":framework-tethering{.module-lib.api.txt}",
308 ":framework-wifi{.module-lib.api.txt}",
309 ":non-updatable-module-lib-current.txt",
310 ],
311 out: ["module-lib-current.txt"],
312 tools: ["metalava"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +0000313 cmd: metalava_cmd + "$(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100314 dists: [
315 {
316 targets: ["droidcore"],
317 dir: "api",
318 dest: "module-lib-current.txt",
319 },
320 {
Pedro Loureiro4f09b852021-06-09 10:59:32 +0000321 targets: [
322 "sdk",
323 "win_sdk",
324 ],
Anton Hanssona9ced802020-10-20 19:26:18 +0100325 dir: "apistubs/android/module-lib/api",
326 dest: "android.txt",
327 },
328 ],
Anton Hansson85359f62020-09-21 17:02:25 +0100329}
Anton Hansson3c1aa112020-09-25 09:13:47 +0100330
331genrule {
Anton Hansson0d6eae62021-02-12 16:47:18 +0000332 name: "frameworks-base-api-module-lib-current-compat",
333 srcs: [
334 ":android.api.module-lib.latest",
335 ":android-incompatibilities.api.module-lib.latest",
336 ":frameworks-base-api-current.txt",
337 ":frameworks-base-api-module-lib-current.txt",
338 ],
Anton Hanssonb8ce0812021-08-24 12:08:39 +0100339 out: ["updated-baseline.txt"],
Anton Hansson0d6eae62021-02-12 16:47:18 +0000340 tools: ["metalava"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +0000341 cmd: metalava_cmd +
Anton Hansson0d6eae62021-02-12 16:47:18 +0000342 "--check-compatibility:api:released $(location :android.api.module-lib.latest) " +
343 // Note: having "public" be the base of module-lib is not perfect -- it should
344 // ideally be a merged public+system), but this will help when migrating from
345 // MODULE_LIBS -> public.
346 "--check-compatibility:base $(location :frameworks-base-api-current.txt) " +
347 "--baseline:compatibility:released $(location :android-incompatibilities.api.module-lib.latest) " +
Anton Hanssonb8ce0812021-08-24 12:08:39 +0100348 "--update-baseline:compatibility:released $(genDir)/updated-baseline.txt " +
349 "$(location :frameworks-base-api-module-lib-current.txt)",
Anton Hansson0d6eae62021-02-12 16:47:18 +0000350}
351
352genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000353 name: "frameworks-base-api-module-lib-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100354 srcs: [
Victor Changd21107a2021-05-12 10:47:16 +0100355 ":art.module.public.api{.module-lib.removed-api.txt}",
Yan Yanf8b973c2021-02-03 16:07:30 -0800356 ":android.net.ipsec.ike{.module-lib.removed-api.txt}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +0900357 ":framework-connectivity{.module-lib.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100358 ":framework-media{.module-lib.removed-api.txt}",
359 ":framework-mediaprovider{.module-lib.removed-api.txt}",
360 ":framework-permission{.module-lib.removed-api.txt}",
361 ":framework-sdkextensions{.module-lib.removed-api.txt}",
362 ":framework-statsd{.module-lib.removed-api.txt}",
363 ":framework-tethering{.module-lib.removed-api.txt}",
364 ":framework-wifi{.module-lib.removed-api.txt}",
365 ":non-updatable-module-lib-removed.txt",
366 ],
367 out: ["module-lib-removed.txt"],
368 tools: ["metalava"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +0000369 cmd: metalava_cmd + "$(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100370 dists: [
371 {
372 targets: ["droidcore"],
373 dir: "api",
374 dest: "module-lib-removed.txt",
375 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000376 {
Pedro Loureiro4f09b852021-06-09 10:59:32 +0000377 targets: [
378 "sdk",
379 "win_sdk",
380 ],
Anton Hansson85785fe2021-01-20 20:23:34 +0000381 dir: "apistubs/android/module-lib/api",
382 dest: "removed.txt",
383 },
Anton Hanssona9ced802020-10-20 19:26:18 +0100384 ],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100385}
Anton Hanssona15427a2020-10-02 18:21:14 +0100386
387genrule {
388 name: "combined-removed-dex",
Paul Duffin81af1f52021-04-08 19:22:50 +0100389 visibility: [
390 "//frameworks/base/boot",
391 ],
Anton Hanssona15427a2020-10-02 18:21:14 +0100392 srcs: [
Anton Hansson1c4fab42020-11-02 11:57:33 +0000393 ":frameworks-base-api-removed.txt",
394 ":frameworks-base-api-system-removed.txt",
Anton Hanssona15427a2020-10-02 18:21:14 +0100395 ":android.car-stubs-docs{.removed-api.txt}",
396 ":android.car-system-stubs-docs{.removed-api.txt}",
397 ],
398 tool_files: ["gen_combined_removed_dex.sh"],
399 tools: ["metalava"],
400 out: ["combined-removed-dex.txt"],
401 cmd: "$(location gen_combined_removed_dex.sh) $(location metalava) $(genDir) $(in) > $(out)",
402}
Andrei Oneab2cf1812021-02-19 16:28:30 +0000403
404genrule {
405 name: "services-system-server-current.txt",
406 srcs: [
407 ":service-permission{.system-server.api.txt}",
408 ":non-updatable-system-server-current.txt",
409 ],
410 out: ["system-server-current.txt"],
411 tools: ["metalava"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +0000412 cmd: metalava_cmd + "$(in) --api $(out)",
Andrei Oneab2cf1812021-02-19 16:28:30 +0000413 dists: [
414 {
415 targets: ["droidcore"],
416 dir: "api",
417 dest: "system-server-current.txt",
418 },
419 {
Pedro Loureiro4f09b852021-06-09 10:59:32 +0000420 targets: [
421 "sdk",
422 "win_sdk",
423 ],
Andrei Oneab2cf1812021-02-19 16:28:30 +0000424 dir: "apistubs/android/system-server/api",
Andrei Oneafaa271a2021-03-17 13:32:51 +0000425 dest: "android.txt",
Andrei Oneab2cf1812021-02-19 16:28:30 +0000426 },
427 ],
428}
429
430genrule {
431 name: "services-system-server-removed.txt",
432 srcs: [
433 ":service-permission{.system-server.removed-api.txt}",
434 ":non-updatable-system-server-removed.txt",
435 ],
436 out: ["system-server-removed.txt"],
437 tools: ["metalava"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +0000438 cmd: metalava_cmd + "$(in) --api $(out)",
Andrei Oneab2cf1812021-02-19 16:28:30 +0000439 dists: [
440 {
441 targets: ["droidcore"],
442 dir: "api",
443 dest: "system-server-removed.txt",
444 },
445 {
Pedro Loureiro4f09b852021-06-09 10:59:32 +0000446 targets: [
447 "sdk",
448 "win_sdk",
449 ],
Andrei Oneab2cf1812021-02-19 16:28:30 +0000450 dir: "apistubs/android/system-server/api",
Andrei Oneafaa271a2021-03-17 13:32:51 +0000451 dest: "removed.txt",
Andrei Oneab2cf1812021-02-19 16:28:30 +0000452 },
453 ],
454}
Pedro Loureirodea35e12021-05-26 15:50:07 +0000455
456// This rule will filter classes present in the jar files of mainline modules
457// from the lint database in api-versions.xml.
458// This is done to reduce the number of false positive NewApi findings in
459// java libraries that compile against the module SDK
460genrule {
461 name: "api-versions-xml-public-filtered",
462 srcs: [
463 // Note: order matters: first parameter is the full api-versions.xml
464 // after that the stubs files in any order
465 // stubs files are all modules that export API surfaces EXCEPT ART
466 ":framework-doc-stubs{.api_versions.xml}",
467 ":android.net.ipsec.ike.stubs{.jar}",
468 ":conscrypt.module.public.api.stubs{.jar}",
469 ":framework-connectivity.stubs{.jar}",
470 ":framework-media.stubs{.jar}",
471 ":framework-mediaprovider.stubs{.jar}",
472 ":framework-permission.stubs{.jar}",
473 ":framework-sdkextensions.stubs{.jar}",
474 ":framework-statsd.stubs{.jar}",
475 ":framework-tethering.stubs{.jar}",
476 ":framework-wifi.stubs{.jar}",
477 ":i18n.module.public.api.stubs{.jar}",
478 ],
479 out: ["api-versions-public-filtered.xml"],
480 tools: ["api_versions_trimmer"],
481 cmd: "$(location api_versions_trimmer) $(out) $(in)",
482 dist: {
483 targets: [
484 "sdk",
485 "win_sdk",
486 ],
487 },
488}