blob: 7e2147e99a5ef104d042a23affe64b6605491af3 [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"],
17}
18
Sasha Smundak02cbff442019-08-15 08:27:51 -070019genrule {
20 name: "current-api-xml",
21 tools: ["metalava"],
Anton Hansson00febe22020-11-05 10:30:59 +000022 srcs: [":frameworks-base-api-current.txt"],
Sasha Smundak02cbff442019-08-15 08:27:51 -070023 out: ["current.api"],
24 cmd: "$(location metalava) --no-banner -convert2xmlnostrip $(in) $(out)",
Anton Hanssonfcb91d42020-09-21 16:32:14 +010025 visibility: ["//visibility:public"],
Sasha Smundak02cbff442019-08-15 08:27:51 -070026}
Anton Hansson85359f62020-09-21 17:02:25 +010027
28genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +000029 name: "frameworks-base-api-current.txt",
Anton Hansson85359f62020-09-21 17:02:25 +010030 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -080031 ":android.net.ipsec.ike{.public.api.txt}",
Anton Hanssonfc948d862020-12-17 16:57:35 +000032 ":art.module.public.api{.public.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +010033 ":conscrypt.module.public.api{.public.api.txt}",
34 ":framework-media{.public.api.txt}",
35 ":framework-mediaprovider{.public.api.txt}",
36 ":framework-permission{.public.api.txt}",
37 ":framework-sdkextensions{.public.api.txt}",
38 ":framework-statsd{.public.api.txt}",
39 ":framework-tethering{.public.api.txt}",
40 ":framework-wifi{.public.api.txt}",
Paul Duffin5a4e8f22020-11-25 15:45:43 +000041 ":i18n.module.public.api{.public.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +010042 ":non-updatable-current.txt",
43 ],
44 out: ["current.txt"],
45 tools: ["metalava"],
46 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +010047 dists: [
48 {
49 targets: ["droidcore"],
50 dir: "api",
51 dest: "current.txt",
52 },
53 {
Anton Hansson85785fe2021-01-20 20:23:34 +000054 targets: ["sdk", "win_sdk"],
Anton Hanssona9ced802020-10-20 19:26:18 +010055 dir: "apistubs/android/public/api",
56 dest: "android.txt",
57 },
58 ],
Anton Hansson1c4fab42020-11-02 11:57:33 +000059 visibility: ["//visibility:public"],
Anton Hansson85359f62020-09-21 17:02:25 +010060}
61
62genrule {
Anton Hansson0d6eae62021-02-12 16:47:18 +000063 name: "frameworks-base-api-current-compat",
64 srcs: [
65 ":android.api.public.latest",
66 ":android-incompatibilities.api.public.latest",
67 ":frameworks-base-api-current.txt",
68 ],
69 out: ["stdout.txt"],
70 tools: ["metalava"],
71 cmd: "$(location metalava) --no-banner --format=v2 " +
72 "--check-compatibility:api:released $(location :android.api.public.latest) " +
73 "--baseline:compatibility:released $(location :android-incompatibilities.api.public.latest) " +
74 "$(location :frameworks-base-api-current.txt) " +
75 "> $(genDir)/stdout.txt",
76}
77
78genrule {
Anton Hanssond75144f2020-11-05 20:21:08 +000079 name: "frameworks-base-api-current.srcjar",
80 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -080081 ":android.net.ipsec.ike{.public.stubs.source}",
Anton Hanssond75144f2020-11-05 20:21:08 +000082 ":api-stubs-docs-non-updatable",
Anton Hanssonfc948d862020-12-17 16:57:35 +000083 ":art.module.public.api{.public.stubs.source}",
Anton Hanssond75144f2020-11-05 20:21:08 +000084 ":conscrypt.module.public.api{.public.stubs.source}",
85 ":framework-media{.public.stubs.source}",
86 ":framework-mediaprovider{.public.stubs.source}",
87 ":framework-permission{.public.stubs.source}",
88 ":framework-sdkextensions{.public.stubs.source}",
89 ":framework-statsd{.public.stubs.source}",
90 ":framework-tethering{.public.stubs.source}",
91 ":framework-wifi{.public.stubs.source}",
Paul Duffin5a4e8f22020-11-25 15:45:43 +000092 ":i18n.module.public.api{.public.stubs.source}",
Anton Hanssond75144f2020-11-05 20:21:08 +000093 ],
94 out: ["current.srcjar"],
95 tools: ["merge_zips"],
96 cmd: "$(location merge_zips) $(out) $(in)",
97 visibility: ["//visibility:private"], // Used by make module in //development, mind.
98}
99
100genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000101 name: "frameworks-base-api-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100102 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -0800103 ":android.net.ipsec.ike{.public.removed-api.txt}",
Anton Hanssonfc948d862020-12-17 16:57:35 +0000104 ":art.module.public.api{.public.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100105 ":conscrypt.module.public.api{.public.removed-api.txt}",
106 ":framework-media{.public.removed-api.txt}",
107 ":framework-mediaprovider{.public.removed-api.txt}",
108 ":framework-permission{.public.removed-api.txt}",
109 ":framework-sdkextensions{.public.removed-api.txt}",
110 ":framework-statsd{.public.removed-api.txt}",
111 ":framework-tethering{.public.removed-api.txt}",
112 ":framework-wifi{.public.removed-api.txt}",
Paul Duffin5a4e8f22020-11-25 15:45:43 +0000113 ":i18n.module.public.api{.public.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100114 ":non-updatable-removed.txt",
115 ],
116 out: ["removed.txt"],
117 tools: ["metalava"],
118 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100119 dists: [
120 {
121 targets: ["droidcore"],
122 dir: "api",
123 dest: "removed.txt",
124 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000125 {
126 targets: ["sdk", "win_sdk"],
127 dir: "apistubs/android/public/api",
128 dest: "removed.txt",
129 },
Anton Hanssona9ced802020-10-20 19:26:18 +0100130 ],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100131}
132
133genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000134 name: "frameworks-base-api-system-current.txt",
Anton Hansson85359f62020-09-21 17:02:25 +0100135 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -0800136 ":android.net.ipsec.ike{.system.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +0100137 ":framework-media{.system.api.txt}",
138 ":framework-mediaprovider{.system.api.txt}",
139 ":framework-permission{.system.api.txt}",
140 ":framework-sdkextensions{.system.api.txt}",
141 ":framework-statsd{.system.api.txt}",
142 ":framework-tethering{.system.api.txt}",
143 ":framework-wifi{.system.api.txt}",
144 ":non-updatable-system-current.txt",
145 ],
146 out: ["system-current.txt"],
147 tools: ["metalava"],
148 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100149 dists: [
150 {
151 targets: ["droidcore"],
152 dir: "api",
153 dest: "system-current.txt",
154 },
155 {
Anton Hansson85785fe2021-01-20 20:23:34 +0000156 targets: ["sdk", "win_sdk"],
Anton Hanssona9ced802020-10-20 19:26:18 +0100157 dir: "apistubs/android/system/api",
158 dest: "android.txt",
159 },
160 ],
Anton Hansson1c4fab42020-11-02 11:57:33 +0000161 visibility: ["//visibility:public"],
Anton Hansson85359f62020-09-21 17:02:25 +0100162}
163
164genrule {
Anton Hansson0d6eae62021-02-12 16:47:18 +0000165 name: "frameworks-base-api-system-current-compat",
166 srcs: [
167 ":android.api.system.latest",
168 ":android-incompatibilities.api.system.latest",
169 ":frameworks-base-api-current.txt",
170 ":frameworks-base-api-system-current.txt",
171 ],
172 out: ["stdout.txt"],
173 tools: ["metalava"],
174 cmd: "$(location metalava) --no-banner --format=v2 " +
175 "--check-compatibility:api:released $(location :android.api.system.latest) " +
176 "--check-compatibility:base $(location :frameworks-base-api-current.txt) " +
177 "--baseline:compatibility:released $(location :android-incompatibilities.api.system.latest) " +
178 "$(location :frameworks-base-api-system-current.txt) " +
179 "> $(genDir)/stdout.txt",
180}
181
182genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000183 name: "frameworks-base-api-system-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100184 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -0800185 ":android.net.ipsec.ike{.system.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100186 ":framework-media{.system.removed-api.txt}",
187 ":framework-mediaprovider{.system.removed-api.txt}",
188 ":framework-permission{.system.removed-api.txt}",
189 ":framework-sdkextensions{.system.removed-api.txt}",
190 ":framework-statsd{.system.removed-api.txt}",
191 ":framework-tethering{.system.removed-api.txt}",
192 ":framework-wifi{.system.removed-api.txt}",
193 ":non-updatable-system-removed.txt",
194 ],
195 out: ["system-removed.txt"],
196 tools: ["metalava"],
197 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100198 dists: [
199 {
200 targets: ["droidcore"],
201 dir: "api",
202 dest: "system-removed.txt",
203 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000204 {
205 targets: ["sdk", "win_sdk"],
206 dir: "apistubs/android/system/api",
207 dest: "removed.txt",
208 },
Anton Hanssona9ced802020-10-20 19:26:18 +0100209 ],
Anton Hansson1c4fab42020-11-02 11:57:33 +0000210 visibility: ["//visibility:public"],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100211}
212
213genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000214 name: "frameworks-base-api-module-lib-current.txt",
Anton Hansson85359f62020-09-21 17:02:25 +0100215 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -0800216 ":android.net.ipsec.ike{.module-lib.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +0100217 ":framework-media{.module-lib.api.txt}",
218 ":framework-mediaprovider{.module-lib.api.txt}",
219 ":framework-permission{.module-lib.api.txt}",
220 ":framework-sdkextensions{.module-lib.api.txt}",
221 ":framework-statsd{.module-lib.api.txt}",
222 ":framework-tethering{.module-lib.api.txt}",
223 ":framework-wifi{.module-lib.api.txt}",
224 ":non-updatable-module-lib-current.txt",
225 ],
226 out: ["module-lib-current.txt"],
227 tools: ["metalava"],
228 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100229 dists: [
230 {
231 targets: ["droidcore"],
232 dir: "api",
233 dest: "module-lib-current.txt",
234 },
235 {
Anton Hansson85785fe2021-01-20 20:23:34 +0000236 targets: ["sdk", "win_sdk"],
Anton Hanssona9ced802020-10-20 19:26:18 +0100237 dir: "apistubs/android/module-lib/api",
238 dest: "android.txt",
239 },
240 ],
Anton Hansson85359f62020-09-21 17:02:25 +0100241}
Anton Hansson3c1aa112020-09-25 09:13:47 +0100242
243genrule {
Anton Hansson0d6eae62021-02-12 16:47:18 +0000244 name: "frameworks-base-api-module-lib-current-compat",
245 srcs: [
246 ":android.api.module-lib.latest",
247 ":android-incompatibilities.api.module-lib.latest",
248 ":frameworks-base-api-current.txt",
249 ":frameworks-base-api-module-lib-current.txt",
250 ],
251 out: ["stdout.txt"],
252 tools: ["metalava"],
253 cmd: "$(location metalava) --no-banner --format=v2 " +
254 "--check-compatibility:api:released $(location :android.api.module-lib.latest) " +
255 // Note: having "public" be the base of module-lib is not perfect -- it should
256 // ideally be a merged public+system), but this will help when migrating from
257 // MODULE_LIBS -> public.
258 "--check-compatibility:base $(location :frameworks-base-api-current.txt) " +
259 "--baseline:compatibility:released $(location :android-incompatibilities.api.module-lib.latest) " +
260 "$(location :frameworks-base-api-module-lib-current.txt) " +
261 "> $(genDir)/stdout.txt",
262}
263
264genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000265 name: "frameworks-base-api-module-lib-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100266 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -0800267 ":android.net.ipsec.ike{.module-lib.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100268 ":framework-media{.module-lib.removed-api.txt}",
269 ":framework-mediaprovider{.module-lib.removed-api.txt}",
270 ":framework-permission{.module-lib.removed-api.txt}",
271 ":framework-sdkextensions{.module-lib.removed-api.txt}",
272 ":framework-statsd{.module-lib.removed-api.txt}",
273 ":framework-tethering{.module-lib.removed-api.txt}",
274 ":framework-wifi{.module-lib.removed-api.txt}",
275 ":non-updatable-module-lib-removed.txt",
276 ],
277 out: ["module-lib-removed.txt"],
278 tools: ["metalava"],
279 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100280 dists: [
281 {
282 targets: ["droidcore"],
283 dir: "api",
284 dest: "module-lib-removed.txt",
285 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000286 {
287 targets: ["sdk", "win_sdk"],
288 dir: "apistubs/android/module-lib/api",
289 dest: "removed.txt",
290 },
Anton Hanssona9ced802020-10-20 19:26:18 +0100291 ],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100292}
Anton Hanssona15427a2020-10-02 18:21:14 +0100293
294genrule {
295 name: "combined-removed-dex",
296 srcs: [
Anton Hansson1c4fab42020-11-02 11:57:33 +0000297 ":frameworks-base-api-removed.txt",
298 ":frameworks-base-api-system-removed.txt",
Anton Hanssona15427a2020-10-02 18:21:14 +0100299 ":android.car-stubs-docs{.removed-api.txt}",
300 ":android.car-system-stubs-docs{.removed-api.txt}",
301 ],
302 tool_files: ["gen_combined_removed_dex.sh"],
303 tools: ["metalava"],
304 out: ["combined-removed-dex.txt"],
305 cmd: "$(location gen_combined_removed_dex.sh) $(location metalava) $(genDir) $(in) > $(out)",
306}