blob: 74e0211085774ce34286f29f2770f83dd3596bf1 [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 Hanssond75144f2020-11-05 20:21:08 +000063 name: "frameworks-base-api-current.srcjar",
64 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -080065 ":android.net.ipsec.ike{.public.stubs.source}",
Anton Hanssond75144f2020-11-05 20:21:08 +000066 ":api-stubs-docs-non-updatable",
Anton Hanssonfc948d862020-12-17 16:57:35 +000067 ":art.module.public.api{.public.stubs.source}",
Anton Hanssond75144f2020-11-05 20:21:08 +000068 ":conscrypt.module.public.api{.public.stubs.source}",
69 ":framework-media{.public.stubs.source}",
70 ":framework-mediaprovider{.public.stubs.source}",
71 ":framework-permission{.public.stubs.source}",
72 ":framework-sdkextensions{.public.stubs.source}",
73 ":framework-statsd{.public.stubs.source}",
74 ":framework-tethering{.public.stubs.source}",
75 ":framework-wifi{.public.stubs.source}",
Paul Duffin5a4e8f22020-11-25 15:45:43 +000076 ":i18n.module.public.api{.public.stubs.source}",
Anton Hanssond75144f2020-11-05 20:21:08 +000077 ],
78 out: ["current.srcjar"],
79 tools: ["merge_zips"],
80 cmd: "$(location merge_zips) $(out) $(in)",
81 visibility: ["//visibility:private"], // Used by make module in //development, mind.
82}
83
84genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +000085 name: "frameworks-base-api-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +010086 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -080087 ":android.net.ipsec.ike{.public.removed-api.txt}",
Anton Hanssonfc948d862020-12-17 16:57:35 +000088 ":art.module.public.api{.public.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +010089 ":conscrypt.module.public.api{.public.removed-api.txt}",
90 ":framework-media{.public.removed-api.txt}",
91 ":framework-mediaprovider{.public.removed-api.txt}",
92 ":framework-permission{.public.removed-api.txt}",
93 ":framework-sdkextensions{.public.removed-api.txt}",
94 ":framework-statsd{.public.removed-api.txt}",
95 ":framework-tethering{.public.removed-api.txt}",
96 ":framework-wifi{.public.removed-api.txt}",
Paul Duffin5a4e8f22020-11-25 15:45:43 +000097 ":i18n.module.public.api{.public.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +010098 ":non-updatable-removed.txt",
99 ],
100 out: ["removed.txt"],
101 tools: ["metalava"],
102 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100103 dists: [
104 {
105 targets: ["droidcore"],
106 dir: "api",
107 dest: "removed.txt",
108 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000109 {
110 targets: ["sdk", "win_sdk"],
111 dir: "apistubs/android/public/api",
112 dest: "removed.txt",
113 },
Anton Hanssona9ced802020-10-20 19:26:18 +0100114 ],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100115}
116
117genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000118 name: "frameworks-base-api-system-current.txt",
Anton Hansson85359f62020-09-21 17:02:25 +0100119 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -0800120 ":android.net.ipsec.ike{.system.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +0100121 ":framework-media{.system.api.txt}",
122 ":framework-mediaprovider{.system.api.txt}",
123 ":framework-permission{.system.api.txt}",
124 ":framework-sdkextensions{.system.api.txt}",
125 ":framework-statsd{.system.api.txt}",
126 ":framework-tethering{.system.api.txt}",
127 ":framework-wifi{.system.api.txt}",
128 ":non-updatable-system-current.txt",
129 ],
130 out: ["system-current.txt"],
131 tools: ["metalava"],
132 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100133 dists: [
134 {
135 targets: ["droidcore"],
136 dir: "api",
137 dest: "system-current.txt",
138 },
139 {
Anton Hansson85785fe2021-01-20 20:23:34 +0000140 targets: ["sdk", "win_sdk"],
Anton Hanssona9ced802020-10-20 19:26:18 +0100141 dir: "apistubs/android/system/api",
142 dest: "android.txt",
143 },
144 ],
Anton Hansson1c4fab42020-11-02 11:57:33 +0000145 visibility: ["//visibility:public"],
Anton Hansson85359f62020-09-21 17:02:25 +0100146}
147
148genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000149 name: "frameworks-base-api-system-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100150 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -0800151 ":android.net.ipsec.ike{.system.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100152 ":framework-media{.system.removed-api.txt}",
153 ":framework-mediaprovider{.system.removed-api.txt}",
154 ":framework-permission{.system.removed-api.txt}",
155 ":framework-sdkextensions{.system.removed-api.txt}",
156 ":framework-statsd{.system.removed-api.txt}",
157 ":framework-tethering{.system.removed-api.txt}",
158 ":framework-wifi{.system.removed-api.txt}",
159 ":non-updatable-system-removed.txt",
160 ],
161 out: ["system-removed.txt"],
162 tools: ["metalava"],
163 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100164 dists: [
165 {
166 targets: ["droidcore"],
167 dir: "api",
168 dest: "system-removed.txt",
169 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000170 {
171 targets: ["sdk", "win_sdk"],
172 dir: "apistubs/android/system/api",
173 dest: "removed.txt",
174 },
Anton Hanssona9ced802020-10-20 19:26:18 +0100175 ],
Anton Hansson1c4fab42020-11-02 11:57:33 +0000176 visibility: ["//visibility:public"],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100177}
178
179genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000180 name: "frameworks-base-api-module-lib-current.txt",
Anton Hansson85359f62020-09-21 17:02:25 +0100181 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -0800182 ":android.net.ipsec.ike{.module-lib.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +0100183 ":framework-media{.module-lib.api.txt}",
184 ":framework-mediaprovider{.module-lib.api.txt}",
185 ":framework-permission{.module-lib.api.txt}",
186 ":framework-sdkextensions{.module-lib.api.txt}",
187 ":framework-statsd{.module-lib.api.txt}",
188 ":framework-tethering{.module-lib.api.txt}",
189 ":framework-wifi{.module-lib.api.txt}",
190 ":non-updatable-module-lib-current.txt",
191 ],
192 out: ["module-lib-current.txt"],
193 tools: ["metalava"],
194 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100195 dists: [
196 {
197 targets: ["droidcore"],
198 dir: "api",
199 dest: "module-lib-current.txt",
200 },
201 {
Anton Hansson85785fe2021-01-20 20:23:34 +0000202 targets: ["sdk", "win_sdk"],
Anton Hanssona9ced802020-10-20 19:26:18 +0100203 dir: "apistubs/android/module-lib/api",
204 dest: "android.txt",
205 },
206 ],
Anton Hansson85359f62020-09-21 17:02:25 +0100207}
Anton Hansson3c1aa112020-09-25 09:13:47 +0100208
209genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000210 name: "frameworks-base-api-module-lib-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100211 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -0800212 ":android.net.ipsec.ike{.module-lib.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100213 ":framework-media{.module-lib.removed-api.txt}",
214 ":framework-mediaprovider{.module-lib.removed-api.txt}",
215 ":framework-permission{.module-lib.removed-api.txt}",
216 ":framework-sdkextensions{.module-lib.removed-api.txt}",
217 ":framework-statsd{.module-lib.removed-api.txt}",
218 ":framework-tethering{.module-lib.removed-api.txt}",
219 ":framework-wifi{.module-lib.removed-api.txt}",
220 ":non-updatable-module-lib-removed.txt",
221 ],
222 out: ["module-lib-removed.txt"],
223 tools: ["metalava"],
224 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100225 dists: [
226 {
227 targets: ["droidcore"],
228 dir: "api",
229 dest: "module-lib-removed.txt",
230 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000231 {
232 targets: ["sdk", "win_sdk"],
233 dir: "apistubs/android/module-lib/api",
234 dest: "removed.txt",
235 },
Anton Hanssona9ced802020-10-20 19:26:18 +0100236 ],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100237}
Anton Hanssona15427a2020-10-02 18:21:14 +0100238
239genrule {
240 name: "combined-removed-dex",
241 srcs: [
Anton Hansson1c4fab42020-11-02 11:57:33 +0000242 ":frameworks-base-api-removed.txt",
243 ":frameworks-base-api-system-removed.txt",
Anton Hanssona15427a2020-10-02 18:21:14 +0100244 ":android.car-stubs-docs{.removed-api.txt}",
245 ":android.car-system-stubs-docs{.removed-api.txt}",
246 ],
247 tool_files: ["gen_combined_removed_dex.sh"],
248 tools: ["metalava"],
249 out: ["combined-removed-dex.txt"],
250 cmd: "$(location gen_combined_removed_dex.sh) $(location metalava) $(genDir) $(in) > $(out)",
251}