Anton Hansson | fcb91d4 | 2020-09-21 16:32:14 +0100 | [diff] [blame] | 1 | // 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 | |
| 15 | package { |
| 16 | default_visibility: ["//visibility:private"], |
| 17 | } |
| 18 | |
Sasha Smundak | 02cbff44 | 2019-08-15 08:27:51 -0700 | [diff] [blame] | 19 | genrule { |
| 20 | name: "current-api-xml", |
| 21 | tools: ["metalava"], |
Anton Hansson | 00febe2 | 2020-11-05 10:30:59 +0000 | [diff] [blame] | 22 | srcs: [":frameworks-base-api-current.txt"], |
Sasha Smundak | 02cbff44 | 2019-08-15 08:27:51 -0700 | [diff] [blame] | 23 | out: ["current.api"], |
| 24 | cmd: "$(location metalava) --no-banner -convert2xmlnostrip $(in) $(out)", |
Anton Hansson | fcb91d4 | 2020-09-21 16:32:14 +0100 | [diff] [blame] | 25 | visibility: ["//visibility:public"], |
Sasha Smundak | 02cbff44 | 2019-08-15 08:27:51 -0700 | [diff] [blame] | 26 | } |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 27 | |
| 28 | genrule { |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 29 | name: "frameworks-base-api-current.txt", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 30 | srcs: [ |
Yan Yan | f8b973c | 2021-02-03 16:07:30 -0800 | [diff] [blame] | 31 | ":android.net.ipsec.ike{.public.api.txt}", |
Anton Hansson | fc948d86 | 2020-12-17 16:57:35 +0000 | [diff] [blame] | 32 | ":art.module.public.api{.public.api.txt}", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 33 | ":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 Duffin | 5a4e8f2 | 2020-11-25 15:45:43 +0000 | [diff] [blame] | 41 | ":i18n.module.public.api{.public.api.txt}", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 42 | ":non-updatable-current.txt", |
| 43 | ], |
| 44 | out: ["current.txt"], |
| 45 | tools: ["metalava"], |
| 46 | cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)", |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 47 | dists: [ |
| 48 | { |
| 49 | targets: ["droidcore"], |
| 50 | dir: "api", |
| 51 | dest: "current.txt", |
| 52 | }, |
| 53 | { |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 54 | targets: ["sdk", "win_sdk"], |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 55 | dir: "apistubs/android/public/api", |
| 56 | dest: "android.txt", |
| 57 | }, |
| 58 | ], |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 59 | visibility: ["//visibility:public"], |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 60 | } |
| 61 | |
| 62 | genrule { |
Anton Hansson | 0d6eae6 | 2021-02-12 16:47:18 +0000 | [diff] [blame^] | 63 | 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 | |
| 78 | genrule { |
Anton Hansson | d75144f | 2020-11-05 20:21:08 +0000 | [diff] [blame] | 79 | name: "frameworks-base-api-current.srcjar", |
| 80 | srcs: [ |
Yan Yan | f8b973c | 2021-02-03 16:07:30 -0800 | [diff] [blame] | 81 | ":android.net.ipsec.ike{.public.stubs.source}", |
Anton Hansson | d75144f | 2020-11-05 20:21:08 +0000 | [diff] [blame] | 82 | ":api-stubs-docs-non-updatable", |
Anton Hansson | fc948d86 | 2020-12-17 16:57:35 +0000 | [diff] [blame] | 83 | ":art.module.public.api{.public.stubs.source}", |
Anton Hansson | d75144f | 2020-11-05 20:21:08 +0000 | [diff] [blame] | 84 | ":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 Duffin | 5a4e8f2 | 2020-11-25 15:45:43 +0000 | [diff] [blame] | 92 | ":i18n.module.public.api{.public.stubs.source}", |
Anton Hansson | d75144f | 2020-11-05 20:21:08 +0000 | [diff] [blame] | 93 | ], |
| 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 | |
| 100 | genrule { |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 101 | name: "frameworks-base-api-removed.txt", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 102 | srcs: [ |
Yan Yan | f8b973c | 2021-02-03 16:07:30 -0800 | [diff] [blame] | 103 | ":android.net.ipsec.ike{.public.removed-api.txt}", |
Anton Hansson | fc948d86 | 2020-12-17 16:57:35 +0000 | [diff] [blame] | 104 | ":art.module.public.api{.public.removed-api.txt}", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 105 | ":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 Duffin | 5a4e8f2 | 2020-11-25 15:45:43 +0000 | [diff] [blame] | 113 | ":i18n.module.public.api{.public.removed-api.txt}", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 114 | ":non-updatable-removed.txt", |
| 115 | ], |
| 116 | out: ["removed.txt"], |
| 117 | tools: ["metalava"], |
| 118 | cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)", |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 119 | dists: [ |
| 120 | { |
| 121 | targets: ["droidcore"], |
| 122 | dir: "api", |
| 123 | dest: "removed.txt", |
| 124 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 125 | { |
| 126 | targets: ["sdk", "win_sdk"], |
| 127 | dir: "apistubs/android/public/api", |
| 128 | dest: "removed.txt", |
| 129 | }, |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 130 | ], |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 131 | } |
| 132 | |
| 133 | genrule { |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 134 | name: "frameworks-base-api-system-current.txt", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 135 | srcs: [ |
Yan Yan | f8b973c | 2021-02-03 16:07:30 -0800 | [diff] [blame] | 136 | ":android.net.ipsec.ike{.system.api.txt}", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 137 | ":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 Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 149 | dists: [ |
| 150 | { |
| 151 | targets: ["droidcore"], |
| 152 | dir: "api", |
| 153 | dest: "system-current.txt", |
| 154 | }, |
| 155 | { |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 156 | targets: ["sdk", "win_sdk"], |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 157 | dir: "apistubs/android/system/api", |
| 158 | dest: "android.txt", |
| 159 | }, |
| 160 | ], |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 161 | visibility: ["//visibility:public"], |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 162 | } |
| 163 | |
| 164 | genrule { |
Anton Hansson | 0d6eae6 | 2021-02-12 16:47:18 +0000 | [diff] [blame^] | 165 | 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 | |
| 182 | genrule { |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 183 | name: "frameworks-base-api-system-removed.txt", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 184 | srcs: [ |
Yan Yan | f8b973c | 2021-02-03 16:07:30 -0800 | [diff] [blame] | 185 | ":android.net.ipsec.ike{.system.removed-api.txt}", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 186 | ":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 Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 198 | dists: [ |
| 199 | { |
| 200 | targets: ["droidcore"], |
| 201 | dir: "api", |
| 202 | dest: "system-removed.txt", |
| 203 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 204 | { |
| 205 | targets: ["sdk", "win_sdk"], |
| 206 | dir: "apistubs/android/system/api", |
| 207 | dest: "removed.txt", |
| 208 | }, |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 209 | ], |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 210 | visibility: ["//visibility:public"], |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 211 | } |
| 212 | |
| 213 | genrule { |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 214 | name: "frameworks-base-api-module-lib-current.txt", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 215 | srcs: [ |
Yan Yan | f8b973c | 2021-02-03 16:07:30 -0800 | [diff] [blame] | 216 | ":android.net.ipsec.ike{.module-lib.api.txt}", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 217 | ":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 Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 229 | dists: [ |
| 230 | { |
| 231 | targets: ["droidcore"], |
| 232 | dir: "api", |
| 233 | dest: "module-lib-current.txt", |
| 234 | }, |
| 235 | { |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 236 | targets: ["sdk", "win_sdk"], |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 237 | dir: "apistubs/android/module-lib/api", |
| 238 | dest: "android.txt", |
| 239 | }, |
| 240 | ], |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 241 | } |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 242 | |
| 243 | genrule { |
Anton Hansson | 0d6eae6 | 2021-02-12 16:47:18 +0000 | [diff] [blame^] | 244 | 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 | |
| 264 | genrule { |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 265 | name: "frameworks-base-api-module-lib-removed.txt", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 266 | srcs: [ |
Yan Yan | f8b973c | 2021-02-03 16:07:30 -0800 | [diff] [blame] | 267 | ":android.net.ipsec.ike{.module-lib.removed-api.txt}", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 268 | ":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 Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 280 | dists: [ |
| 281 | { |
| 282 | targets: ["droidcore"], |
| 283 | dir: "api", |
| 284 | dest: "module-lib-removed.txt", |
| 285 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 286 | { |
| 287 | targets: ["sdk", "win_sdk"], |
| 288 | dir: "apistubs/android/module-lib/api", |
| 289 | dest: "removed.txt", |
| 290 | }, |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 291 | ], |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 292 | } |
Anton Hansson | a15427a | 2020-10-02 18:21:14 +0100 | [diff] [blame] | 293 | |
| 294 | genrule { |
| 295 | name: "combined-removed-dex", |
| 296 | srcs: [ |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 297 | ":frameworks-base-api-removed.txt", |
| 298 | ":frameworks-base-api-system-removed.txt", |
Anton Hansson | a15427a | 2020-10-02 18:21:14 +0100 | [diff] [blame] | 299 | ":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 | } |