blob: 9f99b78c11c4825267a07302e2ca9b6cf419d8a6 [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
19// *-current.txt files for use by modules in other directories like cts
20filegroup {
21 name: "frameworks-base-api-current.txt",
22 srcs: ["current.txt"],
23 visibility: ["//visibility:public"],
24}
25
26filegroup {
27 name: "frameworks-base-api-system-current.txt",
28 srcs: ["system-current.txt"],
29 visibility: ["//visibility:public"],
30}
31
32filegroup {
33 name: "frameworks-base-api-system-removed.txt",
34 srcs: ["system-removed.txt"],
35 visibility: ["//visibility:public"],
36}
37
Sasha Smundak02cbff442019-08-15 08:27:51 -070038genrule {
39 name: "current-api-xml",
40 tools: ["metalava"],
41 srcs: ["current.txt"],
42 out: ["current.api"],
43 cmd: "$(location metalava) --no-banner -convert2xmlnostrip $(in) $(out)",
Anton Hanssonfcb91d42020-09-21 16:32:14 +010044 visibility: ["//visibility:public"],
Sasha Smundak02cbff442019-08-15 08:27:51 -070045}
Anton Hansson85359f62020-09-21 17:02:25 +010046
47genrule {
48 name: "frameworks-base-api-current-merged.txt",
49 srcs: [
50 ":conscrypt.module.public.api{.public.api.txt}",
51 ":framework-media{.public.api.txt}",
52 ":framework-mediaprovider{.public.api.txt}",
53 ":framework-permission{.public.api.txt}",
54 ":framework-sdkextensions{.public.api.txt}",
55 ":framework-statsd{.public.api.txt}",
56 ":framework-tethering{.public.api.txt}",
57 ":framework-wifi{.public.api.txt}",
58 ":non-updatable-current.txt",
59 ],
60 out: ["current.txt"],
61 tools: ["metalava"],
62 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +010063 dists: [
64 {
65 targets: ["droidcore"],
66 dir: "api",
67 dest: "current.txt",
68 },
69 {
70 targets: ["sdk", "win_sdk"],
71 dir: "apistubs/android/public/api",
72 dest: "android.txt",
73 },
74 ],
Anton Hansson85359f62020-09-21 17:02:25 +010075}
76
77genrule {
Anton Hansson3c1aa112020-09-25 09:13:47 +010078 name: "frameworks-base-api-removed-merged.txt",
79 srcs: [
80 ":conscrypt.module.public.api{.public.removed-api.txt}",
81 ":framework-media{.public.removed-api.txt}",
82 ":framework-mediaprovider{.public.removed-api.txt}",
83 ":framework-permission{.public.removed-api.txt}",
84 ":framework-sdkextensions{.public.removed-api.txt}",
85 ":framework-statsd{.public.removed-api.txt}",
86 ":framework-tethering{.public.removed-api.txt}",
87 ":framework-wifi{.public.removed-api.txt}",
88 ":non-updatable-removed.txt",
89 ],
90 out: ["removed.txt"],
91 tools: ["metalava"],
92 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +010093 dists: [
94 {
95 targets: ["droidcore"],
96 dir: "api",
97 dest: "removed.txt",
98 },
99 ],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100100}
101
102genrule {
Anton Hansson85359f62020-09-21 17:02:25 +0100103 name: "frameworks-base-api-system-current-merged.txt",
104 srcs: [
105 ":framework-media{.system.api.txt}",
106 ":framework-mediaprovider{.system.api.txt}",
107 ":framework-permission{.system.api.txt}",
108 ":framework-sdkextensions{.system.api.txt}",
109 ":framework-statsd{.system.api.txt}",
110 ":framework-tethering{.system.api.txt}",
111 ":framework-wifi{.system.api.txt}",
112 ":non-updatable-system-current.txt",
113 ],
114 out: ["system-current.txt"],
115 tools: ["metalava"],
116 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100117 dists: [
118 {
119 targets: ["droidcore"],
120 dir: "api",
121 dest: "system-current.txt",
122 },
123 {
124 targets: ["sdk", "win_sdk"],
125 dir: "apistubs/android/system/api",
126 dest: "android.txt",
127 },
128 ],
Anton Hansson85359f62020-09-21 17:02:25 +0100129}
130
131genrule {
Anton Hansson3c1aa112020-09-25 09:13:47 +0100132 name: "frameworks-base-api-system-removed-merged.txt",
133 srcs: [
134 ":framework-media{.system.removed-api.txt}",
135 ":framework-mediaprovider{.system.removed-api.txt}",
136 ":framework-permission{.system.removed-api.txt}",
137 ":framework-sdkextensions{.system.removed-api.txt}",
138 ":framework-statsd{.system.removed-api.txt}",
139 ":framework-tethering{.system.removed-api.txt}",
140 ":framework-wifi{.system.removed-api.txt}",
141 ":non-updatable-system-removed.txt",
142 ],
143 out: ["system-removed.txt"],
144 tools: ["metalava"],
145 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100146 dists: [
147 {
148 targets: ["droidcore"],
149 dir: "api",
150 dest: "system-removed.txt",
151 },
152 ],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100153}
154
155genrule {
Anton Hansson85359f62020-09-21 17:02:25 +0100156 name: "frameworks-base-api-module-lib-current-merged.txt",
157 srcs: [
158 ":framework-media{.module-lib.api.txt}",
159 ":framework-mediaprovider{.module-lib.api.txt}",
160 ":framework-permission{.module-lib.api.txt}",
161 ":framework-sdkextensions{.module-lib.api.txt}",
162 ":framework-statsd{.module-lib.api.txt}",
163 ":framework-tethering{.module-lib.api.txt}",
164 ":framework-wifi{.module-lib.api.txt}",
165 ":non-updatable-module-lib-current.txt",
166 ],
167 out: ["module-lib-current.txt"],
168 tools: ["metalava"],
169 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100170 dists: [
171 {
172 targets: ["droidcore"],
173 dir: "api",
174 dest: "module-lib-current.txt",
175 },
176 {
177 targets: ["sdk", "win_sdk"],
178 dir: "apistubs/android/module-lib/api",
179 dest: "android.txt",
180 },
181 ],
Anton Hansson85359f62020-09-21 17:02:25 +0100182}
Anton Hansson3c1aa112020-09-25 09:13:47 +0100183
184genrule {
185 name: "frameworks-base-api-module-lib-removed-merged.txt",
186 srcs: [
187 ":framework-media{.module-lib.removed-api.txt}",
188 ":framework-mediaprovider{.module-lib.removed-api.txt}",
189 ":framework-permission{.module-lib.removed-api.txt}",
190 ":framework-sdkextensions{.module-lib.removed-api.txt}",
191 ":framework-statsd{.module-lib.removed-api.txt}",
192 ":framework-tethering{.module-lib.removed-api.txt}",
193 ":framework-wifi{.module-lib.removed-api.txt}",
194 ":non-updatable-module-lib-removed.txt",
195 ],
196 out: ["module-lib-removed.txt"],
197 tools: ["metalava"],
198 cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)",
Anton Hanssona9ced802020-10-20 19:26:18 +0100199 dists: [
200 {
201 targets: ["droidcore"],
202 dir: "api",
203 dest: "module-lib-removed.txt",
204 },
205 ],
Anton Hansson3c1aa112020-09-25 09:13:47 +0100206}
Anton Hanssona15427a2020-10-02 18:21:14 +0100207
208genrule {
209 name: "combined-removed-dex",
210 srcs: [
211 ":frameworks-base-api-removed-merged.txt",
212 ":frameworks-base-api-system-removed-merged.txt",
213 ":android.car-stubs-docs{.removed-api.txt}",
214 ":android.car-system-stubs-docs{.removed-api.txt}",
215 ],
216 tool_files: ["gen_combined_removed_dex.sh"],
217 tools: ["metalava"],
218 out: ["combined-removed-dex.txt"],
219 cmd: "$(location gen_combined_removed_dex.sh) $(location metalava) $(genDir) $(in) > $(out)",
220}