blob: 8dff60af8bbdfba14c0de280df595287e9d4f13e [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
Pedro Loureirodea35e12021-05-26 15:50:07 +000027python_binary_host {
28 name: "api_versions_trimmer",
29 srcs: ["api_versions_trimmer.py"],
30 version: {
31 py2: {
32 enabled: false,
33 },
34 py3: {
35 enabled: true,
36 embedded_launcher: false,
37 },
38 },
39}
40
41python_test_host {
42 name: "api_versions_trimmer_unittests",
43 main: "api_versions_trimmer_unittests.py",
44 srcs: [
45 "api_versions_trimmer_unittests.py",
46 "api_versions_trimmer.py",
47 ],
48 test_options: {
49 unit_test: true,
50 },
51 version: {
52 py2: {
53 enabled: false,
54 },
55 py3: {
56 enabled: true,
57 embedded_launcher: false,
58 },
59 },
60}
61
Anton Hanssonaa26cc12021-02-15 10:52:33 +000062metalava_cmd = "$(location metalava)"
63// Silence reflection warnings. See b/168689341
64metalava_cmd += " -J--add-opens=java.base/java.util=ALL-UNNAMED "
Anton Hanssonb8ce0812021-08-24 12:08:39 +010065metalava_cmd += " --quiet --no-banner --format=v2 "
Anton Hanssonaa26cc12021-02-15 10:52:33 +000066
Sasha Smundak02cbff442019-08-15 08:27:51 -070067genrule {
68 name: "current-api-xml",
69 tools: ["metalava"],
Anton Hansson00febe22020-11-05 10:30:59 +000070 srcs: [":frameworks-base-api-current.txt"],
Sasha Smundak02cbff442019-08-15 08:27:51 -070071 out: ["current.api"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +000072 cmd: metalava_cmd + "-convert2xmlnostrip $(in) $(out)",
Anton Hanssonfcb91d42020-09-21 16:32:14 +010073 visibility: ["//visibility:public"],
Sasha Smundak02cbff442019-08-15 08:27:51 -070074}
Anton Hansson85359f62020-09-21 17:02:25 +010075
76genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +000077 name: "frameworks-base-api-current.txt",
Anton Hansson85359f62020-09-21 17:02:25 +010078 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -080079 ":android.net.ipsec.ike{.public.api.txt}",
Anton Hanssonfc948d862020-12-17 16:57:35 +000080 ":art.module.public.api{.public.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +010081 ":conscrypt.module.public.api{.public.api.txt}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +090082 ":framework-connectivity{.public.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +010083 ":framework-media{.public.api.txt}",
84 ":framework-mediaprovider{.public.api.txt}",
85 ":framework-permission{.public.api.txt}",
86 ":framework-sdkextensions{.public.api.txt}",
87 ":framework-statsd{.public.api.txt}",
88 ":framework-tethering{.public.api.txt}",
89 ":framework-wifi{.public.api.txt}",
Paul Duffin5a4e8f22020-11-25 15:45:43 +000090 ":i18n.module.public.api{.public.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +010091 ":non-updatable-current.txt",
92 ],
93 out: ["current.txt"],
94 tools: ["metalava"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +000095 cmd: metalava_cmd + "$(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +010096 dists: [
97 {
98 targets: ["droidcore"],
99 dir: "api",
100 dest: "current.txt",
101 },
102 {
Pedro Loureiro4f09b852021-06-09 10:59:32 +0000103 targets: [
104 "sdk",
105 "win_sdk",
106 ],
Anton Hanssona9ced802020-10-20 19:26:18 +0100107 dir: "apistubs/android/public/api",
108 dest: "android.txt",
109 },
110 ],
Anton Hansson1c4fab42020-11-02 11:57:33 +0000111 visibility: ["//visibility:public"],
Anton Hansson85359f62020-09-21 17:02:25 +0100112}
113
114genrule {
Anton Hansson0d6eae62021-02-12 16:47:18 +0000115 name: "frameworks-base-api-current-compat",
116 srcs: [
117 ":android.api.public.latest",
118 ":android-incompatibilities.api.public.latest",
119 ":frameworks-base-api-current.txt",
120 ],
Anton Hanssonb8ce0812021-08-24 12:08:39 +0100121 out: ["updated-baseline.txt"],
Anton Hansson0d6eae62021-02-12 16:47:18 +0000122 tools: ["metalava"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +0000123 cmd: metalava_cmd +
Anton Hansson0d6eae62021-02-12 16:47:18 +0000124 "--check-compatibility:api:released $(location :android.api.public.latest) " +
125 "--baseline:compatibility:released $(location :android-incompatibilities.api.public.latest) " +
Anton Hanssonb8ce0812021-08-24 12:08:39 +0100126 "--update-baseline:compatibility:released $(genDir)/updated-baseline.txt " +
127 "$(location :frameworks-base-api-current.txt)",
Anton Hansson0d6eae62021-02-12 16:47:18 +0000128}
129
130genrule {
Anton Hanssond75144f2020-11-05 20:21:08 +0000131 name: "frameworks-base-api-current.srcjar",
132 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -0800133 ":android.net.ipsec.ike{.public.stubs.source}",
Anton Hanssond75144f2020-11-05 20:21:08 +0000134 ":api-stubs-docs-non-updatable",
Anton Hanssonfc948d862020-12-17 16:57:35 +0000135 ":art.module.public.api{.public.stubs.source}",
Anton Hanssond75144f2020-11-05 20:21:08 +0000136 ":conscrypt.module.public.api{.public.stubs.source}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +0900137 ":framework-connectivity{.public.stubs.source}",
Anton Hanssond75144f2020-11-05 20:21:08 +0000138 ":framework-media{.public.stubs.source}",
139 ":framework-mediaprovider{.public.stubs.source}",
140 ":framework-permission{.public.stubs.source}",
141 ":framework-sdkextensions{.public.stubs.source}",
142 ":framework-statsd{.public.stubs.source}",
143 ":framework-tethering{.public.stubs.source}",
144 ":framework-wifi{.public.stubs.source}",
Paul Duffin5a4e8f22020-11-25 15:45:43 +0000145 ":i18n.module.public.api{.public.stubs.source}",
Anton Hanssond75144f2020-11-05 20:21:08 +0000146 ],
147 out: ["current.srcjar"],
148 tools: ["merge_zips"],
149 cmd: "$(location merge_zips) $(out) $(in)",
150 visibility: ["//visibility:private"], // Used by make module in //development, mind.
151}
152
153genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000154 name: "frameworks-base-api-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100155 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -0800156 ":android.net.ipsec.ike{.public.removed-api.txt}",
Anton Hanssonfc948d862020-12-17 16:57:35 +0000157 ":art.module.public.api{.public.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100158 ":conscrypt.module.public.api{.public.removed-api.txt}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +0900159 ":framework-connectivity{.public.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100160 ":framework-media{.public.removed-api.txt}",
161 ":framework-mediaprovider{.public.removed-api.txt}",
162 ":framework-permission{.public.removed-api.txt}",
163 ":framework-sdkextensions{.public.removed-api.txt}",
164 ":framework-statsd{.public.removed-api.txt}",
165 ":framework-tethering{.public.removed-api.txt}",
166 ":framework-wifi{.public.removed-api.txt}",
Paul Duffin5a4e8f22020-11-25 15:45:43 +0000167 ":i18n.module.public.api{.public.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100168 ":non-updatable-removed.txt",
169 ],
170 out: ["removed.txt"],
171 tools: ["metalava"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +0000172 cmd: metalava_cmd + "$(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100173 dists: [
174 {
175 targets: ["droidcore"],
176 dir: "api",
177 dest: "removed.txt",
178 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000179 {
Pedro Loureiro4f09b852021-06-09 10:59:32 +0000180 targets: [
181 "sdk",
182 "win_sdk",
183 ],
Anton Hansson85785fe2021-01-20 20:23:34 +0000184 dir: "apistubs/android/public/api",
185 dest: "removed.txt",
186 },
Anton Hanssona9ced802020-10-20 19:26:18 +0100187 ],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100188}
189
190genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000191 name: "frameworks-base-api-system-current.txt",
Anton Hansson85359f62020-09-21 17:02:25 +0100192 srcs: [
Victor Changd21107a2021-05-12 10:47:16 +0100193 ":art.module.public.api{.system.api.txt}",
Yan Yanf8b973c2021-02-03 16:07:30 -0800194 ":android.net.ipsec.ike{.system.api.txt}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +0900195 ":framework-connectivity{.system.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +0100196 ":framework-media{.system.api.txt}",
197 ":framework-mediaprovider{.system.api.txt}",
198 ":framework-permission{.system.api.txt}",
199 ":framework-sdkextensions{.system.api.txt}",
200 ":framework-statsd{.system.api.txt}",
201 ":framework-tethering{.system.api.txt}",
202 ":framework-wifi{.system.api.txt}",
203 ":non-updatable-system-current.txt",
204 ],
205 out: ["system-current.txt"],
206 tools: ["metalava"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +0000207 cmd: metalava_cmd + "$(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100208 dists: [
209 {
210 targets: ["droidcore"],
211 dir: "api",
212 dest: "system-current.txt",
213 },
214 {
Pedro Loureiro4f09b852021-06-09 10:59:32 +0000215 targets: [
216 "sdk",
217 "win_sdk",
218 ],
Anton Hanssona9ced802020-10-20 19:26:18 +0100219 dir: "apistubs/android/system/api",
220 dest: "android.txt",
221 },
222 ],
Anton Hansson1c4fab42020-11-02 11:57:33 +0000223 visibility: ["//visibility:public"],
Anton Hansson85359f62020-09-21 17:02:25 +0100224}
225
226genrule {
Anton Hansson0d6eae62021-02-12 16:47:18 +0000227 name: "frameworks-base-api-system-current-compat",
228 srcs: [
229 ":android.api.system.latest",
230 ":android-incompatibilities.api.system.latest",
231 ":frameworks-base-api-current.txt",
232 ":frameworks-base-api-system-current.txt",
233 ],
Anton Hanssonb8ce0812021-08-24 12:08:39 +0100234 out: ["updated-baseline.txt"],
Anton Hansson0d6eae62021-02-12 16:47:18 +0000235 tools: ["metalava"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +0000236 cmd: metalava_cmd +
Anton Hansson0d6eae62021-02-12 16:47:18 +0000237 "--check-compatibility:api:released $(location :android.api.system.latest) " +
238 "--check-compatibility:base $(location :frameworks-base-api-current.txt) " +
239 "--baseline:compatibility:released $(location :android-incompatibilities.api.system.latest) " +
Anton Hanssonb8ce0812021-08-24 12:08:39 +0100240 "--update-baseline:compatibility:released $(genDir)/updated-baseline.txt " +
241 "$(location :frameworks-base-api-system-current.txt)",
Anton Hansson0d6eae62021-02-12 16:47:18 +0000242}
243
244genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000245 name: "frameworks-base-api-system-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100246 srcs: [
Victor Changd21107a2021-05-12 10:47:16 +0100247 ":art.module.public.api{.system.removed-api.txt}",
Yan Yanf8b973c2021-02-03 16:07:30 -0800248 ":android.net.ipsec.ike{.system.removed-api.txt}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +0900249 ":framework-connectivity{.system.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100250 ":framework-media{.system.removed-api.txt}",
251 ":framework-mediaprovider{.system.removed-api.txt}",
252 ":framework-permission{.system.removed-api.txt}",
253 ":framework-sdkextensions{.system.removed-api.txt}",
254 ":framework-statsd{.system.removed-api.txt}",
255 ":framework-tethering{.system.removed-api.txt}",
256 ":framework-wifi{.system.removed-api.txt}",
257 ":non-updatable-system-removed.txt",
258 ],
259 out: ["system-removed.txt"],
260 tools: ["metalava"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +0000261 cmd: metalava_cmd + "$(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100262 dists: [
263 {
264 targets: ["droidcore"],
265 dir: "api",
266 dest: "system-removed.txt",
267 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000268 {
Pedro Loureiro4f09b852021-06-09 10:59:32 +0000269 targets: [
270 "sdk",
271 "win_sdk",
272 ],
Anton Hansson85785fe2021-01-20 20:23:34 +0000273 dir: "apistubs/android/system/api",
274 dest: "removed.txt",
275 },
Anton Hanssona9ced802020-10-20 19:26:18 +0100276 ],
Anton Hansson1c4fab42020-11-02 11:57:33 +0000277 visibility: ["//visibility:public"],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100278}
279
280genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000281 name: "frameworks-base-api-module-lib-current.txt",
Anton Hansson85359f62020-09-21 17:02:25 +0100282 srcs: [
Victor Changd21107a2021-05-12 10:47:16 +0100283 ":art.module.public.api{.module-lib.api.txt}",
Yan Yanf8b973c2021-02-03 16:07:30 -0800284 ":android.net.ipsec.ike{.module-lib.api.txt}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +0900285 ":framework-connectivity{.module-lib.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +0100286 ":framework-media{.module-lib.api.txt}",
287 ":framework-mediaprovider{.module-lib.api.txt}",
288 ":framework-permission{.module-lib.api.txt}",
289 ":framework-sdkextensions{.module-lib.api.txt}",
290 ":framework-statsd{.module-lib.api.txt}",
291 ":framework-tethering{.module-lib.api.txt}",
292 ":framework-wifi{.module-lib.api.txt}",
293 ":non-updatable-module-lib-current.txt",
294 ],
295 out: ["module-lib-current.txt"],
296 tools: ["metalava"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +0000297 cmd: metalava_cmd + "$(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100298 dists: [
299 {
300 targets: ["droidcore"],
301 dir: "api",
302 dest: "module-lib-current.txt",
303 },
304 {
Pedro Loureiro4f09b852021-06-09 10:59:32 +0000305 targets: [
306 "sdk",
307 "win_sdk",
308 ],
Anton Hanssona9ced802020-10-20 19:26:18 +0100309 dir: "apistubs/android/module-lib/api",
310 dest: "android.txt",
311 },
312 ],
Anton Hansson85359f62020-09-21 17:02:25 +0100313}
Anton Hansson3c1aa112020-09-25 09:13:47 +0100314
315genrule {
Anton Hansson0d6eae62021-02-12 16:47:18 +0000316 name: "frameworks-base-api-module-lib-current-compat",
317 srcs: [
318 ":android.api.module-lib.latest",
319 ":android-incompatibilities.api.module-lib.latest",
320 ":frameworks-base-api-current.txt",
321 ":frameworks-base-api-module-lib-current.txt",
322 ],
Anton Hanssonb8ce0812021-08-24 12:08:39 +0100323 out: ["updated-baseline.txt"],
Anton Hansson0d6eae62021-02-12 16:47:18 +0000324 tools: ["metalava"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +0000325 cmd: metalava_cmd +
Anton Hansson0d6eae62021-02-12 16:47:18 +0000326 "--check-compatibility:api:released $(location :android.api.module-lib.latest) " +
327 // Note: having "public" be the base of module-lib is not perfect -- it should
328 // ideally be a merged public+system), but this will help when migrating from
329 // MODULE_LIBS -> public.
330 "--check-compatibility:base $(location :frameworks-base-api-current.txt) " +
331 "--baseline:compatibility:released $(location :android-incompatibilities.api.module-lib.latest) " +
Anton Hanssonb8ce0812021-08-24 12:08:39 +0100332 "--update-baseline:compatibility:released $(genDir)/updated-baseline.txt " +
333 "$(location :frameworks-base-api-module-lib-current.txt)",
Anton Hansson0d6eae62021-02-12 16:47:18 +0000334}
335
336genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000337 name: "frameworks-base-api-module-lib-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100338 srcs: [
Victor Changd21107a2021-05-12 10:47:16 +0100339 ":art.module.public.api{.module-lib.removed-api.txt}",
Yan Yanf8b973c2021-02-03 16:07:30 -0800340 ":android.net.ipsec.ike{.module-lib.removed-api.txt}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +0900341 ":framework-connectivity{.module-lib.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100342 ":framework-media{.module-lib.removed-api.txt}",
343 ":framework-mediaprovider{.module-lib.removed-api.txt}",
344 ":framework-permission{.module-lib.removed-api.txt}",
345 ":framework-sdkextensions{.module-lib.removed-api.txt}",
346 ":framework-statsd{.module-lib.removed-api.txt}",
347 ":framework-tethering{.module-lib.removed-api.txt}",
348 ":framework-wifi{.module-lib.removed-api.txt}",
349 ":non-updatable-module-lib-removed.txt",
350 ],
351 out: ["module-lib-removed.txt"],
352 tools: ["metalava"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +0000353 cmd: metalava_cmd + "$(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100354 dists: [
355 {
356 targets: ["droidcore"],
357 dir: "api",
358 dest: "module-lib-removed.txt",
359 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000360 {
Pedro Loureiro4f09b852021-06-09 10:59:32 +0000361 targets: [
362 "sdk",
363 "win_sdk",
364 ],
Anton Hansson85785fe2021-01-20 20:23:34 +0000365 dir: "apistubs/android/module-lib/api",
366 dest: "removed.txt",
367 },
Anton Hanssona9ced802020-10-20 19:26:18 +0100368 ],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100369}
Anton Hanssona15427a2020-10-02 18:21:14 +0100370
371genrule {
372 name: "combined-removed-dex",
Paul Duffin81af1f52021-04-08 19:22:50 +0100373 visibility: [
374 "//frameworks/base/boot",
375 ],
Anton Hanssona15427a2020-10-02 18:21:14 +0100376 srcs: [
Anton Hansson1c4fab42020-11-02 11:57:33 +0000377 ":frameworks-base-api-removed.txt",
378 ":frameworks-base-api-system-removed.txt",
Anton Hanssona15427a2020-10-02 18:21:14 +0100379 ":android.car-stubs-docs{.removed-api.txt}",
380 ":android.car-system-stubs-docs{.removed-api.txt}",
381 ],
382 tool_files: ["gen_combined_removed_dex.sh"],
383 tools: ["metalava"],
384 out: ["combined-removed-dex.txt"],
385 cmd: "$(location gen_combined_removed_dex.sh) $(location metalava) $(genDir) $(in) > $(out)",
386}
Andrei Oneab2cf1812021-02-19 16:28:30 +0000387
388genrule {
389 name: "services-system-server-current.txt",
390 srcs: [
391 ":service-permission{.system-server.api.txt}",
392 ":non-updatable-system-server-current.txt",
393 ],
394 out: ["system-server-current.txt"],
395 tools: ["metalava"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +0000396 cmd: metalava_cmd + "$(in) --api $(out)",
Andrei Oneab2cf1812021-02-19 16:28:30 +0000397 dists: [
398 {
399 targets: ["droidcore"],
400 dir: "api",
401 dest: "system-server-current.txt",
402 },
403 {
Pedro Loureiro4f09b852021-06-09 10:59:32 +0000404 targets: [
405 "sdk",
406 "win_sdk",
407 ],
Andrei Oneab2cf1812021-02-19 16:28:30 +0000408 dir: "apistubs/android/system-server/api",
Andrei Oneafaa271a2021-03-17 13:32:51 +0000409 dest: "android.txt",
Andrei Oneab2cf1812021-02-19 16:28:30 +0000410 },
411 ],
412}
413
414genrule {
415 name: "services-system-server-removed.txt",
416 srcs: [
417 ":service-permission{.system-server.removed-api.txt}",
418 ":non-updatable-system-server-removed.txt",
419 ],
420 out: ["system-server-removed.txt"],
421 tools: ["metalava"],
Anton Hanssonaa26cc12021-02-15 10:52:33 +0000422 cmd: metalava_cmd + "$(in) --api $(out)",
Andrei Oneab2cf1812021-02-19 16:28:30 +0000423 dists: [
424 {
425 targets: ["droidcore"],
426 dir: "api",
427 dest: "system-server-removed.txt",
428 },
429 {
Pedro Loureiro4f09b852021-06-09 10:59:32 +0000430 targets: [
431 "sdk",
432 "win_sdk",
433 ],
Andrei Oneab2cf1812021-02-19 16:28:30 +0000434 dir: "apistubs/android/system-server/api",
Andrei Oneafaa271a2021-03-17 13:32:51 +0000435 dest: "removed.txt",
Andrei Oneab2cf1812021-02-19 16:28:30 +0000436 },
437 ],
438}
Pedro Loureirodea35e12021-05-26 15:50:07 +0000439
440// This rule will filter classes present in the jar files of mainline modules
441// from the lint database in api-versions.xml.
442// This is done to reduce the number of false positive NewApi findings in
443// java libraries that compile against the module SDK
444genrule {
445 name: "api-versions-xml-public-filtered",
446 srcs: [
447 // Note: order matters: first parameter is the full api-versions.xml
448 // after that the stubs files in any order
449 // stubs files are all modules that export API surfaces EXCEPT ART
450 ":framework-doc-stubs{.api_versions.xml}",
451 ":android.net.ipsec.ike.stubs{.jar}",
452 ":conscrypt.module.public.api.stubs{.jar}",
453 ":framework-connectivity.stubs{.jar}",
454 ":framework-media.stubs{.jar}",
455 ":framework-mediaprovider.stubs{.jar}",
456 ":framework-permission.stubs{.jar}",
457 ":framework-sdkextensions.stubs{.jar}",
458 ":framework-statsd.stubs{.jar}",
459 ":framework-tethering.stubs{.jar}",
460 ":framework-wifi.stubs{.jar}",
461 ":i18n.module.public.api.stubs{.jar}",
462 ],
463 out: ["api-versions-public-filtered.xml"],
464 tools: ["api_versions_trimmer"],
465 cmd: "$(location api_versions_trimmer) $(out) $(in)",
466 dist: {
467 targets: [
468 "sdk",
469 "win_sdk",
470 ],
471 },
472}