blob: 471b9930eddb787b11d13556dbb8888f2af7637b [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: [
31 ":conscrypt.module.public.api{.public.api.txt}",
32 ":framework-media{.public.api.txt}",
33 ":framework-mediaprovider{.public.api.txt}",
34 ":framework-permission{.public.api.txt}",
35 ":framework-sdkextensions{.public.api.txt}",
36 ":framework-statsd{.public.api.txt}",
37 ":framework-tethering{.public.api.txt}",
38 ":framework-wifi{.public.api.txt}",
39 ":non-updatable-current.txt",
40 ],
41 out: ["current.txt"],
42 tools: ["metalava"],
43 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +010044 dists: [
45 {
46 targets: ["droidcore"],
47 dir: "api",
48 dest: "current.txt",
49 },
50 {
51 targets: ["sdk", "win_sdk"],
52 dir: "apistubs/android/public/api",
53 dest: "android.txt",
54 },
55 ],
Anton Hansson1c4fab42020-11-02 11:57:33 +000056 visibility: ["//visibility:public"],
Anton Hansson85359f62020-09-21 17:02:25 +010057}
58
59genrule {
Anton Hanssond75144f2020-11-05 20:21:08 +000060 name: "frameworks-base-api-current.srcjar",
61 srcs: [
62 ":api-stubs-docs-non-updatable",
63 ":conscrypt.module.public.api{.public.stubs.source}",
64 ":framework-media{.public.stubs.source}",
65 ":framework-mediaprovider{.public.stubs.source}",
66 ":framework-permission{.public.stubs.source}",
67 ":framework-sdkextensions{.public.stubs.source}",
68 ":framework-statsd{.public.stubs.source}",
69 ":framework-tethering{.public.stubs.source}",
70 ":framework-wifi{.public.stubs.source}",
71 ],
72 out: ["current.srcjar"],
73 tools: ["merge_zips"],
74 cmd: "$(location merge_zips) $(out) $(in)",
75 visibility: ["//visibility:private"], // Used by make module in //development, mind.
76}
77
78genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +000079 name: "frameworks-base-api-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +010080 srcs: [
81 ":conscrypt.module.public.api{.public.removed-api.txt}",
82 ":framework-media{.public.removed-api.txt}",
83 ":framework-mediaprovider{.public.removed-api.txt}",
84 ":framework-permission{.public.removed-api.txt}",
85 ":framework-sdkextensions{.public.removed-api.txt}",
86 ":framework-statsd{.public.removed-api.txt}",
87 ":framework-tethering{.public.removed-api.txt}",
88 ":framework-wifi{.public.removed-api.txt}",
89 ":non-updatable-removed.txt",
90 ],
91 out: ["removed.txt"],
92 tools: ["metalava"],
93 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +010094 dists: [
95 {
96 targets: ["droidcore"],
97 dir: "api",
98 dest: "removed.txt",
99 },
100 ],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100101}
102
103genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000104 name: "frameworks-base-api-system-current.txt",
Anton Hansson85359f62020-09-21 17:02:25 +0100105 srcs: [
106 ":framework-media{.system.api.txt}",
107 ":framework-mediaprovider{.system.api.txt}",
108 ":framework-permission{.system.api.txt}",
109 ":framework-sdkextensions{.system.api.txt}",
110 ":framework-statsd{.system.api.txt}",
111 ":framework-tethering{.system.api.txt}",
112 ":framework-wifi{.system.api.txt}",
113 ":non-updatable-system-current.txt",
114 ],
115 out: ["system-current.txt"],
116 tools: ["metalava"],
117 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100118 dists: [
119 {
120 targets: ["droidcore"],
121 dir: "api",
122 dest: "system-current.txt",
123 },
124 {
125 targets: ["sdk", "win_sdk"],
126 dir: "apistubs/android/system/api",
127 dest: "android.txt",
128 },
129 ],
Anton Hansson1c4fab42020-11-02 11:57:33 +0000130 visibility: ["//visibility:public"],
Anton Hansson85359f62020-09-21 17:02:25 +0100131}
132
133genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000134 name: "frameworks-base-api-system-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100135 srcs: [
136 ":framework-media{.system.removed-api.txt}",
137 ":framework-mediaprovider{.system.removed-api.txt}",
138 ":framework-permission{.system.removed-api.txt}",
139 ":framework-sdkextensions{.system.removed-api.txt}",
140 ":framework-statsd{.system.removed-api.txt}",
141 ":framework-tethering{.system.removed-api.txt}",
142 ":framework-wifi{.system.removed-api.txt}",
143 ":non-updatable-system-removed.txt",
144 ],
145 out: ["system-removed.txt"],
146 tools: ["metalava"],
147 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100148 dists: [
149 {
150 targets: ["droidcore"],
151 dir: "api",
152 dest: "system-removed.txt",
153 },
154 ],
Anton Hansson1c4fab42020-11-02 11:57:33 +0000155 visibility: ["//visibility:public"],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100156}
157
158genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000159 name: "frameworks-base-api-module-lib-current.txt",
Anton Hansson85359f62020-09-21 17:02:25 +0100160 srcs: [
161 ":framework-media{.module-lib.api.txt}",
162 ":framework-mediaprovider{.module-lib.api.txt}",
163 ":framework-permission{.module-lib.api.txt}",
164 ":framework-sdkextensions{.module-lib.api.txt}",
165 ":framework-statsd{.module-lib.api.txt}",
166 ":framework-tethering{.module-lib.api.txt}",
167 ":framework-wifi{.module-lib.api.txt}",
168 ":non-updatable-module-lib-current.txt",
169 ],
170 out: ["module-lib-current.txt"],
171 tools: ["metalava"],
172 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100173 dists: [
174 {
175 targets: ["droidcore"],
176 dir: "api",
177 dest: "module-lib-current.txt",
178 },
179 {
180 targets: ["sdk", "win_sdk"],
181 dir: "apistubs/android/module-lib/api",
182 dest: "android.txt",
183 },
184 ],
Anton Hansson85359f62020-09-21 17:02:25 +0100185}
Anton Hansson3c1aa112020-09-25 09:13:47 +0100186
187genrule {
Anton Hansson1c4fab42020-11-02 11:57:33 +0000188 name: "frameworks-base-api-module-lib-removed.txt",
Anton Hansson3c1aa112020-09-25 09:13:47 +0100189 srcs: [
190 ":framework-media{.module-lib.removed-api.txt}",
191 ":framework-mediaprovider{.module-lib.removed-api.txt}",
192 ":framework-permission{.module-lib.removed-api.txt}",
193 ":framework-sdkextensions{.module-lib.removed-api.txt}",
194 ":framework-statsd{.module-lib.removed-api.txt}",
195 ":framework-tethering{.module-lib.removed-api.txt}",
196 ":framework-wifi{.module-lib.removed-api.txt}",
197 ":non-updatable-module-lib-removed.txt",
198 ],
199 out: ["module-lib-removed.txt"],
200 tools: ["metalava"],
201 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100202 dists: [
203 {
204 targets: ["droidcore"],
205 dir: "api",
206 dest: "module-lib-removed.txt",
207 },
208 ],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100209}
Anton Hanssona15427a2020-10-02 18:21:14 +0100210
211genrule {
212 name: "combined-removed-dex",
213 srcs: [
Anton Hansson1c4fab42020-11-02 11:57:33 +0000214 ":frameworks-base-api-removed.txt",
215 ":frameworks-base-api-system-removed.txt",
Anton Hanssona15427a2020-10-02 18:21:14 +0100216 ":android.car-stubs-docs{.removed-api.txt}",
217 ":android.car-system-stubs-docs{.removed-api.txt}",
218 ],
219 tool_files: ["gen_combined_removed_dex.sh"],
220 tools: ["metalava"],
221 out: ["combined-removed-dex.txt"],
222 cmd: "$(location gen_combined_removed_dex.sh) $(location metalava) $(genDir) $(in) > $(out)",
223}