blob: 6e83c083245acf3b67c6fa4a35f63eb6db61499c [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: [
Yan Yanf8b973c2021-02-03 16:07:30 -0800147 ":android.net.ipsec.ike{.system.api.txt}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +0900148 ":framework-connectivity{.system.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +0100149 ":framework-media{.system.api.txt}",
150 ":framework-mediaprovider{.system.api.txt}",
151 ":framework-permission{.system.api.txt}",
152 ":framework-sdkextensions{.system.api.txt}",
153 ":framework-statsd{.system.api.txt}",
154 ":framework-tethering{.system.api.txt}",
155 ":framework-wifi{.system.api.txt}",
156 ":non-updatable-system-current.txt",
157 ],
158 out: ["system-current.txt"],
159 tools: ["metalava"],
160 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100161 dists: [
162 {
163 targets: ["droidcore"],
164 dir: "api",
165 dest: "system-current.txt",
166 },
167 {
Anton Hansson85785fe2021-01-20 20:23:34 +0000168 targets: ["sdk", "win_sdk"],
Anton Hanssona9ced802020-10-20 19:26:18 +0100169 dir: "apistubs/android/system/api",
170 dest: "android.txt",
171 },
172 ],
Anton Hansson1c4fab42020-11-02 11:57:33 +0000173 visibility: ["//visibility:public"],
Anton Hansson85359f62020-09-21 17:02:25 +0100174}
175
176genrule {
Anton Hansson0d6eae62021-02-12 16:47:18 +0000177 name: "frameworks-base-api-system-current-compat",
178 srcs: [
179 ":android.api.system.latest",
180 ":android-incompatibilities.api.system.latest",
181 ":frameworks-base-api-current.txt",
182 ":frameworks-base-api-system-current.txt",
183 ],
184 out: ["stdout.txt"],
185 tools: ["metalava"],
186 cmd: "$(location metalava) --no-banner --format=v2 " +
187 "--check-compatibility:api:released $(location :android.api.system.latest) " +
188 "--check-compatibility:base $(location :frameworks-base-api-current.txt) " +
189 "--baseline:compatibility:released $(location :android-incompatibilities.api.system.latest) " +
190 "$(location :frameworks-base-api-system-current.txt) " +
191 "> $(genDir)/stdout.txt",
192}
193
194genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000195 name: "frameworks-base-api-system-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100196 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -0800197 ":android.net.ipsec.ike{.system.removed-api.txt}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +0900198 ":framework-connectivity{.system.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100199 ":framework-media{.system.removed-api.txt}",
200 ":framework-mediaprovider{.system.removed-api.txt}",
201 ":framework-permission{.system.removed-api.txt}",
202 ":framework-sdkextensions{.system.removed-api.txt}",
203 ":framework-statsd{.system.removed-api.txt}",
204 ":framework-tethering{.system.removed-api.txt}",
205 ":framework-wifi{.system.removed-api.txt}",
206 ":non-updatable-system-removed.txt",
207 ],
208 out: ["system-removed.txt"],
209 tools: ["metalava"],
210 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100211 dists: [
212 {
213 targets: ["droidcore"],
214 dir: "api",
215 dest: "system-removed.txt",
216 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000217 {
218 targets: ["sdk", "win_sdk"],
219 dir: "apistubs/android/system/api",
220 dest: "removed.txt",
221 },
Anton Hanssona9ced802020-10-20 19:26:18 +0100222 ],
Anton Hansson1c4fab42020-11-02 11:57:33 +0000223 visibility: ["//visibility:public"],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100224}
225
226genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000227 name: "frameworks-base-api-module-lib-current.txt",
Anton Hansson85359f62020-09-21 17:02:25 +0100228 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -0800229 ":android.net.ipsec.ike{.module-lib.api.txt}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +0900230 ":framework-connectivity{.module-lib.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +0100231 ":framework-media{.module-lib.api.txt}",
232 ":framework-mediaprovider{.module-lib.api.txt}",
233 ":framework-permission{.module-lib.api.txt}",
234 ":framework-sdkextensions{.module-lib.api.txt}",
235 ":framework-statsd{.module-lib.api.txt}",
236 ":framework-tethering{.module-lib.api.txt}",
237 ":framework-wifi{.module-lib.api.txt}",
238 ":non-updatable-module-lib-current.txt",
239 ],
240 out: ["module-lib-current.txt"],
241 tools: ["metalava"],
242 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100243 dists: [
244 {
245 targets: ["droidcore"],
246 dir: "api",
247 dest: "module-lib-current.txt",
248 },
249 {
Anton Hansson85785fe2021-01-20 20:23:34 +0000250 targets: ["sdk", "win_sdk"],
Anton Hanssona9ced802020-10-20 19:26:18 +0100251 dir: "apistubs/android/module-lib/api",
252 dest: "android.txt",
253 },
254 ],
Anton Hansson85359f62020-09-21 17:02:25 +0100255}
Anton Hansson3c1aa112020-09-25 09:13:47 +0100256
257genrule {
Anton Hansson0d6eae62021-02-12 16:47:18 +0000258 name: "frameworks-base-api-module-lib-current-compat",
259 srcs: [
260 ":android.api.module-lib.latest",
261 ":android-incompatibilities.api.module-lib.latest",
262 ":frameworks-base-api-current.txt",
263 ":frameworks-base-api-module-lib-current.txt",
264 ],
265 out: ["stdout.txt"],
266 tools: ["metalava"],
267 cmd: "$(location metalava) --no-banner --format=v2 " +
268 "--check-compatibility:api:released $(location :android.api.module-lib.latest) " +
269 // Note: having "public" be the base of module-lib is not perfect -- it should
270 // ideally be a merged public+system), but this will help when migrating from
271 // MODULE_LIBS -> public.
272 "--check-compatibility:base $(location :frameworks-base-api-current.txt) " +
273 "--baseline:compatibility:released $(location :android-incompatibilities.api.module-lib.latest) " +
274 "$(location :frameworks-base-api-module-lib-current.txt) " +
275 "> $(genDir)/stdout.txt",
276}
277
278genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000279 name: "frameworks-base-api-module-lib-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100280 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -0800281 ":android.net.ipsec.ike{.module-lib.removed-api.txt}",
Remi NGUYEN VANc15d99e2021-01-28 13:37:03 +0900282 ":framework-connectivity{.module-lib.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100283 ":framework-media{.module-lib.removed-api.txt}",
284 ":framework-mediaprovider{.module-lib.removed-api.txt}",
285 ":framework-permission{.module-lib.removed-api.txt}",
286 ":framework-sdkextensions{.module-lib.removed-api.txt}",
287 ":framework-statsd{.module-lib.removed-api.txt}",
288 ":framework-tethering{.module-lib.removed-api.txt}",
289 ":framework-wifi{.module-lib.removed-api.txt}",
290 ":non-updatable-module-lib-removed.txt",
291 ],
292 out: ["module-lib-removed.txt"],
293 tools: ["metalava"],
294 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100295 dists: [
296 {
297 targets: ["droidcore"],
298 dir: "api",
299 dest: "module-lib-removed.txt",
300 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000301 {
302 targets: ["sdk", "win_sdk"],
303 dir: "apistubs/android/module-lib/api",
304 dest: "removed.txt",
305 },
Anton Hanssona9ced802020-10-20 19:26:18 +0100306 ],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100307}
Anton Hanssona15427a2020-10-02 18:21:14 +0100308
309genrule {
310 name: "combined-removed-dex",
Paul Duffin81af1f52021-04-08 19:22:50 +0100311 visibility: [
312 "//frameworks/base/boot",
313 ],
Anton Hanssona15427a2020-10-02 18:21:14 +0100314 srcs: [
Anton Hansson1c4fab42020-11-02 11:57:33 +0000315 ":frameworks-base-api-removed.txt",
316 ":frameworks-base-api-system-removed.txt",
Anton Hanssona15427a2020-10-02 18:21:14 +0100317 ":android.car-stubs-docs{.removed-api.txt}",
318 ":android.car-system-stubs-docs{.removed-api.txt}",
319 ],
320 tool_files: ["gen_combined_removed_dex.sh"],
321 tools: ["metalava"],
322 out: ["combined-removed-dex.txt"],
323 cmd: "$(location gen_combined_removed_dex.sh) $(location metalava) $(genDir) $(in) > $(out)",
324}
Andrei Oneab2cf1812021-02-19 16:28:30 +0000325
326genrule {
327 name: "services-system-server-current.txt",
328 srcs: [
329 ":service-permission{.system-server.api.txt}",
330 ":non-updatable-system-server-current.txt",
331 ],
332 out: ["system-server-current.txt"],
333 tools: ["metalava"],
334 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
335 dists: [
336 {
337 targets: ["droidcore"],
338 dir: "api",
339 dest: "system-server-current.txt",
340 },
341 {
342 targets: ["sdk", "win_sdk"],
343 dir: "apistubs/android/system-server/api",
344 dest: "merge-android.txt",
345 },
346 ],
347}
348
349genrule {
350 name: "services-system-server-removed.txt",
351 srcs: [
352 ":service-permission{.system-server.removed-api.txt}",
353 ":non-updatable-system-server-removed.txt",
354 ],
355 out: ["system-server-removed.txt"],
356 tools: ["metalava"],
357 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
358 dists: [
359 {
360 targets: ["droidcore"],
361 dir: "api",
362 dest: "system-server-removed.txt",
363 },
364 {
365 targets: ["sdk", "win_sdk"],
366 dir: "apistubs/android/system-server/api",
367 dest: "merge-removed.txt",
368 },
369 ],
370}