blob: 823b1dee7cc9914d2bc14384e8e9508dcc32eb8a [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}",
42 ":framework-media{.public.api.txt}",
43 ":framework-mediaprovider{.public.api.txt}",
44 ":framework-permission{.public.api.txt}",
45 ":framework-sdkextensions{.public.api.txt}",
46 ":framework-statsd{.public.api.txt}",
47 ":framework-tethering{.public.api.txt}",
48 ":framework-wifi{.public.api.txt}",
Paul Duffin5a4e8f22020-11-25 15:45:43 +000049 ":i18n.module.public.api{.public.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +010050 ":non-updatable-current.txt",
51 ],
52 out: ["current.txt"],
53 tools: ["metalava"],
54 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +010055 dists: [
56 {
57 targets: ["droidcore"],
58 dir: "api",
59 dest: "current.txt",
60 },
61 {
Anton Hansson85785fe2021-01-20 20:23:34 +000062 targets: ["sdk", "win_sdk"],
Anton Hanssona9ced802020-10-20 19:26:18 +010063 dir: "apistubs/android/public/api",
64 dest: "android.txt",
65 },
66 ],
Anton Hansson1c4fab42020-11-02 11:57:33 +000067 visibility: ["//visibility:public"],
Anton Hansson85359f62020-09-21 17:02:25 +010068}
69
70genrule {
Anton Hanssond75144f2020-11-05 20:21:08 +000071 name: "frameworks-base-api-current.srcjar",
72 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -080073 ":android.net.ipsec.ike{.public.stubs.source}",
Anton Hanssond75144f2020-11-05 20:21:08 +000074 ":api-stubs-docs-non-updatable",
Anton Hanssonfc948d862020-12-17 16:57:35 +000075 ":art.module.public.api{.public.stubs.source}",
Anton Hanssond75144f2020-11-05 20:21:08 +000076 ":conscrypt.module.public.api{.public.stubs.source}",
77 ":framework-media{.public.stubs.source}",
78 ":framework-mediaprovider{.public.stubs.source}",
79 ":framework-permission{.public.stubs.source}",
80 ":framework-sdkextensions{.public.stubs.source}",
81 ":framework-statsd{.public.stubs.source}",
82 ":framework-tethering{.public.stubs.source}",
83 ":framework-wifi{.public.stubs.source}",
Paul Duffin5a4e8f22020-11-25 15:45:43 +000084 ":i18n.module.public.api{.public.stubs.source}",
Anton Hanssond75144f2020-11-05 20:21:08 +000085 ],
86 out: ["current.srcjar"],
87 tools: ["merge_zips"],
88 cmd: "$(location merge_zips) $(out) $(in)",
89 visibility: ["//visibility:private"], // Used by make module in //development, mind.
90}
91
92genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +000093 name: "frameworks-base-api-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +010094 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -080095 ":android.net.ipsec.ike{.public.removed-api.txt}",
Anton Hanssonfc948d862020-12-17 16:57:35 +000096 ":art.module.public.api{.public.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +010097 ":conscrypt.module.public.api{.public.removed-api.txt}",
98 ":framework-media{.public.removed-api.txt}",
99 ":framework-mediaprovider{.public.removed-api.txt}",
100 ":framework-permission{.public.removed-api.txt}",
101 ":framework-sdkextensions{.public.removed-api.txt}",
102 ":framework-statsd{.public.removed-api.txt}",
103 ":framework-tethering{.public.removed-api.txt}",
104 ":framework-wifi{.public.removed-api.txt}",
Paul Duffin5a4e8f22020-11-25 15:45:43 +0000105 ":i18n.module.public.api{.public.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100106 ":non-updatable-removed.txt",
107 ],
108 out: ["removed.txt"],
109 tools: ["metalava"],
110 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100111 dists: [
112 {
113 targets: ["droidcore"],
114 dir: "api",
115 dest: "removed.txt",
116 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000117 {
118 targets: ["sdk", "win_sdk"],
119 dir: "apistubs/android/public/api",
120 dest: "removed.txt",
121 },
Anton Hanssona9ced802020-10-20 19:26:18 +0100122 ],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100123}
124
125genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000126 name: "frameworks-base-api-system-current.txt",
Anton Hansson85359f62020-09-21 17:02:25 +0100127 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -0800128 ":android.net.ipsec.ike{.system.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +0100129 ":framework-media{.system.api.txt}",
130 ":framework-mediaprovider{.system.api.txt}",
131 ":framework-permission{.system.api.txt}",
132 ":framework-sdkextensions{.system.api.txt}",
133 ":framework-statsd{.system.api.txt}",
134 ":framework-tethering{.system.api.txt}",
135 ":framework-wifi{.system.api.txt}",
136 ":non-updatable-system-current.txt",
137 ],
138 out: ["system-current.txt"],
139 tools: ["metalava"],
140 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100141 dists: [
142 {
143 targets: ["droidcore"],
144 dir: "api",
145 dest: "system-current.txt",
146 },
147 {
Anton Hansson85785fe2021-01-20 20:23:34 +0000148 targets: ["sdk", "win_sdk"],
Anton Hanssona9ced802020-10-20 19:26:18 +0100149 dir: "apistubs/android/system/api",
150 dest: "android.txt",
151 },
152 ],
Anton Hansson1c4fab42020-11-02 11:57:33 +0000153 visibility: ["//visibility:public"],
Anton Hansson85359f62020-09-21 17:02:25 +0100154}
155
156genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000157 name: "frameworks-base-api-system-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100158 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -0800159 ":android.net.ipsec.ike{.system.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100160 ":framework-media{.system.removed-api.txt}",
161 ":framework-mediaprovider{.system.removed-api.txt}",
162 ":framework-permission{.system.removed-api.txt}",
163 ":framework-sdkextensions{.system.removed-api.txt}",
164 ":framework-statsd{.system.removed-api.txt}",
165 ":framework-tethering{.system.removed-api.txt}",
166 ":framework-wifi{.system.removed-api.txt}",
167 ":non-updatable-system-removed.txt",
168 ],
169 out: ["system-removed.txt"],
170 tools: ["metalava"],
171 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100172 dists: [
173 {
174 targets: ["droidcore"],
175 dir: "api",
176 dest: "system-removed.txt",
177 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000178 {
179 targets: ["sdk", "win_sdk"],
180 dir: "apistubs/android/system/api",
181 dest: "removed.txt",
182 },
Anton Hanssona9ced802020-10-20 19:26:18 +0100183 ],
Anton Hansson1c4fab42020-11-02 11:57:33 +0000184 visibility: ["//visibility:public"],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100185}
186
187genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000188 name: "frameworks-base-api-module-lib-current.txt",
Anton Hansson85359f62020-09-21 17:02:25 +0100189 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -0800190 ":android.net.ipsec.ike{.module-lib.api.txt}",
Anton Hansson85359f62020-09-21 17:02:25 +0100191 ":framework-media{.module-lib.api.txt}",
192 ":framework-mediaprovider{.module-lib.api.txt}",
193 ":framework-permission{.module-lib.api.txt}",
194 ":framework-sdkextensions{.module-lib.api.txt}",
195 ":framework-statsd{.module-lib.api.txt}",
196 ":framework-tethering{.module-lib.api.txt}",
197 ":framework-wifi{.module-lib.api.txt}",
198 ":non-updatable-module-lib-current.txt",
199 ],
200 out: ["module-lib-current.txt"],
201 tools: ["metalava"],
202 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100203 dists: [
204 {
205 targets: ["droidcore"],
206 dir: "api",
207 dest: "module-lib-current.txt",
208 },
209 {
Anton Hansson85785fe2021-01-20 20:23:34 +0000210 targets: ["sdk", "win_sdk"],
Anton Hanssona9ced802020-10-20 19:26:18 +0100211 dir: "apistubs/android/module-lib/api",
212 dest: "android.txt",
213 },
214 ],
Anton Hansson85359f62020-09-21 17:02:25 +0100215}
Anton Hansson3c1aa112020-09-25 09:13:47 +0100216
217genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000218 name: "frameworks-base-api-module-lib-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100219 srcs: [
Yan Yanf8b973c2021-02-03 16:07:30 -0800220 ":android.net.ipsec.ike{.module-lib.removed-api.txt}",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100221 ":framework-media{.module-lib.removed-api.txt}",
222 ":framework-mediaprovider{.module-lib.removed-api.txt}",
223 ":framework-permission{.module-lib.removed-api.txt}",
224 ":framework-sdkextensions{.module-lib.removed-api.txt}",
225 ":framework-statsd{.module-lib.removed-api.txt}",
226 ":framework-tethering{.module-lib.removed-api.txt}",
227 ":framework-wifi{.module-lib.removed-api.txt}",
228 ":non-updatable-module-lib-removed.txt",
229 ],
230 out: ["module-lib-removed.txt"],
231 tools: ["metalava"],
232 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100233 dists: [
234 {
235 targets: ["droidcore"],
236 dir: "api",
237 dest: "module-lib-removed.txt",
238 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000239 {
240 targets: ["sdk", "win_sdk"],
241 dir: "apistubs/android/module-lib/api",
242 dest: "removed.txt",
243 },
Anton Hanssona9ced802020-10-20 19:26:18 +0100244 ],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100245}
Anton Hanssona15427a2020-10-02 18:21:14 +0100246
247genrule {
248 name: "combined-removed-dex",
249 srcs: [
Anton Hansson1c4fab42020-11-02 11:57:33 +0000250 ":frameworks-base-api-removed.txt",
251 ":frameworks-base-api-system-removed.txt",
Anton Hanssona15427a2020-10-02 18:21:14 +0100252 ":android.car-stubs-docs{.removed-api.txt}",
253 ":android.car-system-stubs-docs{.removed-api.txt}",
254 ],
255 tool_files: ["gen_combined_removed_dex.sh"],
256 tools: ["metalava"],
257 out: ["combined-removed-dex.txt"],
258 cmd: "$(location gen_combined_removed_dex.sh) $(location metalava) $(genDir) $(in) > $(out)",
259}