blob: 865fb46c7f8dbe9caac6c6f142435bb4c6a5bb2c [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
Sasha Smundak02cbff442019-08-15 08:27:51 -070027genrule {
28 name: "current-api-xml",
29 tools: ["metalava"],
Anton Hansson00febe22020-11-05 10:30:59 +000030 srcs: [":frameworks-base-api-current.txt"],
Sasha Smundak02cbff442019-08-15 08:27:51 -070031 out: ["current.api"],
32 cmd: "$(location metalava) --no-banner -convert2xmlnostrip $(in) $(out)",
Anton Hanssonfcb91d42020-09-21 16:32:14 +010033 visibility: ["//visibility:public"],
Sasha Smundak02cbff442019-08-15 08:27:51 -070034}
Anton Hansson85359f62020-09-21 17:02:25 +010035
36genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +000037 name: "frameworks-base-api-current.txt",
Anton Hansson85359f62020-09-21 17:02:25 +010038 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -080039 ":android.net.ipsec.ike{.public.api.txt}",
Anton Hanssonfc948d862020-12-17 16:57:35 +000040 ":art.module.public.api{.public.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +010041 ":conscrypt.module.public.api{.public.api.txt}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +090042 ":framework-connectivity{.public.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +010043 ":framework-media{.public.api.txt}",
44 ":framework-mediaprovider{.public.api.txt}",
45 ":framework-permission{.public.api.txt}",
46 ":framework-sdkextensions{.public.api.txt}",
47 ":framework-statsd{.public.api.txt}",
48 ":framework-tethering{.public.api.txt}",
49 ":framework-wifi{.public.api.txt}",
Paul Duffin5a4e8f22020-11-25 15:45:43 +000050 ":i18n.module.public.api{.public.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +010051 ":non-updatable-current.txt",
52 ],
53 out: ["current.txt"],
54 tools: ["metalava"],
55 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +010056 dists: [
57 {
58 targets: ["droidcore"],
59 dir: "api",
60 dest: "current.txt",
61 },
62 {
Anton Hansson85785fe2021-01-20 20:23:34 +000063 targets: ["sdk", "win_sdk"],
Anton Hanssona9ced802020-10-20 19:26:18 +010064 dir: "apistubs/android/public/api",
65 dest: "android.txt",
66 },
67 ],
Anton Hansson1c4fab42020-11-02 11:57:33 +000068 visibility: ["//visibility:public"],
Anton Hansson85359f62020-09-21 17:02:25 +010069}
70
71genrule {
Anton Hansson0d6eae62021-02-12 16:47:18 +000072 name: "frameworks-base-api-current-compat",
73 srcs: [
74 ":android.api.public.latest",
75 ":android-incompatibilities.api.public.latest",
76 ":frameworks-base-api-current.txt",
77 ],
78 out: ["stdout.txt"],
79 tools: ["metalava"],
80 cmd: "$(location metalava) --no-banner --format=v2 " +
81 "--check-compatibility:api:released $(location :android.api.public.latest) " +
82 "--baseline:compatibility:released $(location :android-incompatibilities.api.public.latest) " +
83 "$(location :frameworks-base-api-current.txt) " +
84 "> $(genDir)/stdout.txt",
85}
86
87genrule {
Anton Hanssond75144f2020-11-05 20:21:08 +000088 name: "frameworks-base-api-current.srcjar",
89 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -080090 ":android.net.ipsec.ike{.public.stubs.source}",
Anton Hanssond75144f2020-11-05 20:21:08 +000091 ":api-stubs-docs-non-updatable",
Anton Hanssonfc948d862020-12-17 16:57:35 +000092 ":art.module.public.api{.public.stubs.source}",
Anton Hanssond75144f2020-11-05 20:21:08 +000093 ":conscrypt.module.public.api{.public.stubs.source}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +090094 ":framework-connectivity{.public.stubs.source}",
Anton Hanssond75144f2020-11-05 20:21:08 +000095 ":framework-media{.public.stubs.source}",
96 ":framework-mediaprovider{.public.stubs.source}",
97 ":framework-permission{.public.stubs.source}",
98 ":framework-sdkextensions{.public.stubs.source}",
99 ":framework-statsd{.public.stubs.source}",
100 ":framework-tethering{.public.stubs.source}",
101 ":framework-wifi{.public.stubs.source}",
Paul Duffin5a4e8f22020-11-25 15:45:43 +0000102 ":i18n.module.public.api{.public.stubs.source}",
Anton Hanssond75144f2020-11-05 20:21:08 +0000103 ],
104 out: ["current.srcjar"],
105 tools: ["merge_zips"],
106 cmd: "$(location merge_zips) $(out) $(in)",
107 visibility: ["//visibility:private"], // Used by make module in //development, mind.
108}
109
110genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000111 name: "frameworks-base-api-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100112 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -0800113 ":android.net.ipsec.ike{.public.removed-api.txt}",
Anton Hanssonfc948d862020-12-17 16:57:35 +0000114 ":art.module.public.api{.public.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100115 ":conscrypt.module.public.api{.public.removed-api.txt}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +0900116 ":framework-connectivity{.public.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100117 ":framework-media{.public.removed-api.txt}",
118 ":framework-mediaprovider{.public.removed-api.txt}",
119 ":framework-permission{.public.removed-api.txt}",
120 ":framework-sdkextensions{.public.removed-api.txt}",
121 ":framework-statsd{.public.removed-api.txt}",
122 ":framework-tethering{.public.removed-api.txt}",
123 ":framework-wifi{.public.removed-api.txt}",
Paul Duffin5a4e8f22020-11-25 15:45:43 +0000124 ":i18n.module.public.api{.public.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100125 ":non-updatable-removed.txt",
126 ],
127 out: ["removed.txt"],
128 tools: ["metalava"],
129 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100130 dists: [
131 {
132 targets: ["droidcore"],
133 dir: "api",
134 dest: "removed.txt",
135 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000136 {
137 targets: ["sdk", "win_sdk"],
138 dir: "apistubs/android/public/api",
139 dest: "removed.txt",
140 },
Anton Hanssona9ced802020-10-20 19:26:18 +0100141 ],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100142}
143
144genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000145 name: "frameworks-base-api-system-current.txt",
Anton Hansson85359f62020-09-21 17:02:25 +0100146 srcs: [
Victor Changd21107a2021-05-12 10:47:16 +0100147 ":art.module.public.api{.system.api.txt}",
Yan Yanf8b973c2021-02-03 16:07:30 -0800148 ":android.net.ipsec.ike{.system.api.txt}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +0900149 ":framework-connectivity{.system.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +0100150 ":framework-media{.system.api.txt}",
151 ":framework-mediaprovider{.system.api.txt}",
152 ":framework-permission{.system.api.txt}",
153 ":framework-sdkextensions{.system.api.txt}",
154 ":framework-statsd{.system.api.txt}",
155 ":framework-tethering{.system.api.txt}",
156 ":framework-wifi{.system.api.txt}",
157 ":non-updatable-system-current.txt",
158 ],
159 out: ["system-current.txt"],
160 tools: ["metalava"],
161 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100162 dists: [
163 {
164 targets: ["droidcore"],
165 dir: "api",
166 dest: "system-current.txt",
167 },
168 {
Anton Hansson85785fe2021-01-20 20:23:34 +0000169 targets: ["sdk", "win_sdk"],
Anton Hanssona9ced802020-10-20 19:26:18 +0100170 dir: "apistubs/android/system/api",
171 dest: "android.txt",
172 },
173 ],
Anton Hansson1c4fab42020-11-02 11:57:33 +0000174 visibility: ["//visibility:public"],
Anton Hansson85359f62020-09-21 17:02:25 +0100175}
176
177genrule {
Anton Hansson0d6eae62021-02-12 16:47:18 +0000178 name: "frameworks-base-api-system-current-compat",
179 srcs: [
180 ":android.api.system.latest",
181 ":android-incompatibilities.api.system.latest",
182 ":frameworks-base-api-current.txt",
183 ":frameworks-base-api-system-current.txt",
184 ],
185 out: ["stdout.txt"],
186 tools: ["metalava"],
187 cmd: "$(location metalava) --no-banner --format=v2 " +
188 "--check-compatibility:api:released $(location :android.api.system.latest) " +
189 "--check-compatibility:base $(location :frameworks-base-api-current.txt) " +
190 "--baseline:compatibility:released $(location :android-incompatibilities.api.system.latest) " +
191 "$(location :frameworks-base-api-system-current.txt) " +
192 "> $(genDir)/stdout.txt",
193}
194
195genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000196 name: "frameworks-base-api-system-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100197 srcs: [
Victor Changd21107a2021-05-12 10:47:16 +0100198 ":art.module.public.api{.system.removed-api.txt}",
Yan Yanf8b973c2021-02-03 16:07:30 -0800199 ":android.net.ipsec.ike{.system.removed-api.txt}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +0900200 ":framework-connectivity{.system.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100201 ":framework-media{.system.removed-api.txt}",
202 ":framework-mediaprovider{.system.removed-api.txt}",
203 ":framework-permission{.system.removed-api.txt}",
204 ":framework-sdkextensions{.system.removed-api.txt}",
205 ":framework-statsd{.system.removed-api.txt}",
206 ":framework-tethering{.system.removed-api.txt}",
207 ":framework-wifi{.system.removed-api.txt}",
208 ":non-updatable-system-removed.txt",
209 ],
210 out: ["system-removed.txt"],
211 tools: ["metalava"],
212 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100213 dists: [
214 {
215 targets: ["droidcore"],
216 dir: "api",
217 dest: "system-removed.txt",
218 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000219 {
220 targets: ["sdk", "win_sdk"],
221 dir: "apistubs/android/system/api",
222 dest: "removed.txt",
223 },
Anton Hanssona9ced802020-10-20 19:26:18 +0100224 ],
Anton Hansson1c4fab42020-11-02 11:57:33 +0000225 visibility: ["//visibility:public"],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100226}
227
228genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000229 name: "frameworks-base-api-module-lib-current.txt",
Anton Hansson85359f62020-09-21 17:02:25 +0100230 srcs: [
Victor Changd21107a2021-05-12 10:47:16 +0100231 ":art.module.public.api{.module-lib.api.txt}",
Yan Yanf8b973c2021-02-03 16:07:30 -0800232 ":android.net.ipsec.ike{.module-lib.api.txt}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +0900233 ":framework-connectivity{.module-lib.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +0100234 ":framework-media{.module-lib.api.txt}",
235 ":framework-mediaprovider{.module-lib.api.txt}",
236 ":framework-permission{.module-lib.api.txt}",
237 ":framework-sdkextensions{.module-lib.api.txt}",
238 ":framework-statsd{.module-lib.api.txt}",
239 ":framework-tethering{.module-lib.api.txt}",
240 ":framework-wifi{.module-lib.api.txt}",
241 ":non-updatable-module-lib-current.txt",
242 ],
243 out: ["module-lib-current.txt"],
244 tools: ["metalava"],
245 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100246 dists: [
247 {
248 targets: ["droidcore"],
249 dir: "api",
250 dest: "module-lib-current.txt",
251 },
252 {
Anton Hansson85785fe2021-01-20 20:23:34 +0000253 targets: ["sdk", "win_sdk"],
Anton Hanssona9ced802020-10-20 19:26:18 +0100254 dir: "apistubs/android/module-lib/api",
255 dest: "android.txt",
256 },
257 ],
Anton Hansson85359f62020-09-21 17:02:25 +0100258}
Anton Hansson3c1aa112020-09-25 09:13:47 +0100259
260genrule {
Anton Hansson0d6eae62021-02-12 16:47:18 +0000261 name: "frameworks-base-api-module-lib-current-compat",
262 srcs: [
263 ":android.api.module-lib.latest",
264 ":android-incompatibilities.api.module-lib.latest",
265 ":frameworks-base-api-current.txt",
266 ":frameworks-base-api-module-lib-current.txt",
267 ],
268 out: ["stdout.txt"],
269 tools: ["metalava"],
270 cmd: "$(location metalava) --no-banner --format=v2 " +
271 "--check-compatibility:api:released $(location :android.api.module-lib.latest) " +
272 // Note: having "public" be the base of module-lib is not perfect -- it should
273 // ideally be a merged public+system), but this will help when migrating from
274 // MODULE_LIBS -> public.
275 "--check-compatibility:base $(location :frameworks-base-api-current.txt) " +
276 "--baseline:compatibility:released $(location :android-incompatibilities.api.module-lib.latest) " +
277 "$(location :frameworks-base-api-module-lib-current.txt) " +
278 "> $(genDir)/stdout.txt",
279}
280
281genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000282 name: "frameworks-base-api-module-lib-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100283 srcs: [
Victor Changd21107a2021-05-12 10:47:16 +0100284 ":art.module.public.api{.module-lib.removed-api.txt}",
Yan Yanf8b973c2021-02-03 16:07:30 -0800285 ":android.net.ipsec.ike{.module-lib.removed-api.txt}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +0900286 ":framework-connectivity{.module-lib.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100287 ":framework-media{.module-lib.removed-api.txt}",
288 ":framework-mediaprovider{.module-lib.removed-api.txt}",
289 ":framework-permission{.module-lib.removed-api.txt}",
290 ":framework-sdkextensions{.module-lib.removed-api.txt}",
291 ":framework-statsd{.module-lib.removed-api.txt}",
292 ":framework-tethering{.module-lib.removed-api.txt}",
293 ":framework-wifi{.module-lib.removed-api.txt}",
294 ":non-updatable-module-lib-removed.txt",
295 ],
296 out: ["module-lib-removed.txt"],
297 tools: ["metalava"],
298 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100299 dists: [
300 {
301 targets: ["droidcore"],
302 dir: "api",
303 dest: "module-lib-removed.txt",
304 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000305 {
306 targets: ["sdk", "win_sdk"],
307 dir: "apistubs/android/module-lib/api",
308 dest: "removed.txt",
309 },
Anton Hanssona9ced802020-10-20 19:26:18 +0100310 ],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100311}
Anton Hanssona15427a2020-10-02 18:21:14 +0100312
313genrule {
314 name: "combined-removed-dex",
Paul Duffin81af1f52021-04-08 19:22:50 +0100315 visibility: [
316 "//frameworks/base/boot",
317 ],
Anton Hanssona15427a2020-10-02 18:21:14 +0100318 srcs: [
Anton Hansson1c4fab42020-11-02 11:57:33 +0000319 ":frameworks-base-api-removed.txt",
320 ":frameworks-base-api-system-removed.txt",
Anton Hanssona15427a2020-10-02 18:21:14 +0100321 ":android.car-stubs-docs{.removed-api.txt}",
322 ":android.car-system-stubs-docs{.removed-api.txt}",
323 ],
324 tool_files: ["gen_combined_removed_dex.sh"],
325 tools: ["metalava"],
326 out: ["combined-removed-dex.txt"],
327 cmd: "$(location gen_combined_removed_dex.sh) $(location metalava) $(genDir) $(in) > $(out)",
328}
Andrei Oneab2cf1812021-02-19 16:28:30 +0000329
330genrule {
331 name: "services-system-server-current.txt",
332 srcs: [
333 ":service-permission{.system-server.api.txt}",
334 ":non-updatable-system-server-current.txt",
335 ],
336 out: ["system-server-current.txt"],
337 tools: ["metalava"],
338 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
339 dists: [
340 {
341 targets: ["droidcore"],
342 dir: "api",
343 dest: "system-server-current.txt",
344 },
345 {
346 targets: ["sdk", "win_sdk"],
347 dir: "apistubs/android/system-server/api",
Andrei Oneafaa271a2021-03-17 13:32:51 +0000348 dest: "android.txt",
Andrei Oneab2cf1812021-02-19 16:28:30 +0000349 },
350 ],
351}
352
353genrule {
354 name: "services-system-server-removed.txt",
355 srcs: [
356 ":service-permission{.system-server.removed-api.txt}",
357 ":non-updatable-system-server-removed.txt",
358 ],
359 out: ["system-server-removed.txt"],
360 tools: ["metalava"],
361 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
362 dists: [
363 {
364 targets: ["droidcore"],
365 dir: "api",
366 dest: "system-server-removed.txt",
367 },
368 {
369 targets: ["sdk", "win_sdk"],
370 dir: "apistubs/android/system-server/api",
Andrei Oneafaa271a2021-03-17 13:32:51 +0000371 dest: "removed.txt",
Andrei Oneab2cf1812021-02-19 16:28:30 +0000372 },
373 ],
374}