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 | 1357a42 | 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}", |
Anton Hansson | d74139e | 2020-10-08 14:59:17 +0100 | [diff] [blame] | 34 | ":framework-appsearch{.public.api.txt}", |
Anton Hansson | 0eccccb | 2020-09-24 12:09:25 +0100 | [diff] [blame] | 35 | ":framework-graphics{.public.api.txt}", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 36 | ":framework-media{.public.api.txt}", |
| 37 | ":framework-mediaprovider{.public.api.txt}", |
| 38 | ":framework-permission{.public.api.txt}", |
Hai Zhang | 591e121 | 2021-01-21 12:48:43 -0800 | [diff] [blame] | 39 | ":framework-permission-s{.public.api.txt}", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 40 | ":framework-sdkextensions{.public.api.txt}", |
| 41 | ":framework-statsd{.public.api.txt}", |
| 42 | ":framework-tethering{.public.api.txt}", |
| 43 | ":framework-wifi{.public.api.txt}", |
Paul Duffin | 5a4e8f2 | 2020-11-25 15:45:43 +0000 | [diff] [blame] | 44 | ":i18n.module.public.api{.public.api.txt}", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 45 | ":non-updatable-current.txt", |
| 46 | ], |
| 47 | out: ["current.txt"], |
| 48 | tools: ["metalava"], |
| 49 | cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)", |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 50 | dists: [ |
| 51 | { |
| 52 | targets: ["droidcore"], |
| 53 | dir: "api", |
| 54 | dest: "current.txt", |
| 55 | }, |
| 56 | { |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 57 | targets: ["sdk", "win_sdk"], |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 58 | dir: "apistubs/android/public/api", |
| 59 | dest: "android.txt", |
| 60 | }, |
| 61 | ], |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 62 | visibility: ["//visibility:public"], |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 63 | } |
| 64 | |
| 65 | genrule { |
Anton Hansson | 89c74dc | 2020-11-05 20:21:08 +0000 | [diff] [blame] | 66 | name: "frameworks-base-api-current.srcjar", |
| 67 | srcs: [ |
Yan Yan | 1357a42 | 2021-02-03 16:07:30 -0800 | [diff] [blame^] | 68 | ":android.net.ipsec.ike{.public.stubs.source}", |
Anton Hansson | 89c74dc | 2020-11-05 20:21:08 +0000 | [diff] [blame] | 69 | ":api-stubs-docs-non-updatable", |
Anton Hansson | fc948d86 | 2020-12-17 16:57:35 +0000 | [diff] [blame] | 70 | ":art.module.public.api{.public.stubs.source}", |
Anton Hansson | 89c74dc | 2020-11-05 20:21:08 +0000 | [diff] [blame] | 71 | ":conscrypt.module.public.api{.public.stubs.source}", |
| 72 | ":framework-appsearch{.public.stubs.source}", |
| 73 | ":framework-graphics{.public.stubs.source}", |
| 74 | ":framework-media{.public.stubs.source}", |
| 75 | ":framework-mediaprovider{.public.stubs.source}", |
| 76 | ":framework-permission{.public.stubs.source}", |
Hai Zhang | 591e121 | 2021-01-21 12:48:43 -0800 | [diff] [blame] | 77 | ":framework-permission-s{.public.stubs.source}", |
Anton Hansson | 89c74dc | 2020-11-05 20:21:08 +0000 | [diff] [blame] | 78 | ":framework-sdkextensions{.public.stubs.source}", |
| 79 | ":framework-statsd{.public.stubs.source}", |
| 80 | ":framework-tethering{.public.stubs.source}", |
| 81 | ":framework-wifi{.public.stubs.source}", |
Paul Duffin | 5a4e8f2 | 2020-11-25 15:45:43 +0000 | [diff] [blame] | 82 | ":i18n.module.public.api{.public.stubs.source}", |
Anton Hansson | 89c74dc | 2020-11-05 20:21:08 +0000 | [diff] [blame] | 83 | ], |
| 84 | out: ["current.srcjar"], |
| 85 | tools: ["merge_zips"], |
| 86 | cmd: "$(location merge_zips) $(out) $(in)", |
| 87 | visibility: ["//visibility:private"], // Used by make module in //development, mind. |
| 88 | } |
| 89 | |
| 90 | genrule { |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 91 | name: "frameworks-base-api-removed.txt", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 92 | srcs: [ |
Yan Yan | 1357a42 | 2021-02-03 16:07:30 -0800 | [diff] [blame^] | 93 | ":android.net.ipsec.ike{.public.removed-api.txt}", |
Anton Hansson | fc948d86 | 2020-12-17 16:57:35 +0000 | [diff] [blame] | 94 | ":art.module.public.api{.public.removed-api.txt}", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 95 | ":conscrypt.module.public.api{.public.removed-api.txt}", |
Anton Hansson | d74139e | 2020-10-08 14:59:17 +0100 | [diff] [blame] | 96 | ":framework-appsearch{.public.removed-api.txt}", |
| 97 | ":framework-graphics{.public.removed-api.txt}", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 98 | ":framework-media{.public.removed-api.txt}", |
| 99 | ":framework-mediaprovider{.public.removed-api.txt}", |
| 100 | ":framework-permission{.public.removed-api.txt}", |
Hai Zhang | 591e121 | 2021-01-21 12:48:43 -0800 | [diff] [blame] | 101 | ":framework-permission-s{.public.removed-api.txt}", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 102 | ":framework-sdkextensions{.public.removed-api.txt}", |
| 103 | ":framework-statsd{.public.removed-api.txt}", |
| 104 | ":framework-tethering{.public.removed-api.txt}", |
| 105 | ":framework-wifi{.public.removed-api.txt}", |
Paul Duffin | 5a4e8f2 | 2020-11-25 15:45:43 +0000 | [diff] [blame] | 106 | ":i18n.module.public.api{.public.removed-api.txt}", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 107 | ":non-updatable-removed.txt", |
| 108 | ], |
| 109 | out: ["removed.txt"], |
| 110 | tools: ["metalava"], |
| 111 | cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)", |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 112 | dists: [ |
| 113 | { |
| 114 | targets: ["droidcore"], |
| 115 | dir: "api", |
| 116 | dest: "removed.txt", |
| 117 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 118 | { |
| 119 | targets: ["sdk", "win_sdk"], |
| 120 | dir: "apistubs/android/public/api", |
| 121 | dest: "removed.txt", |
| 122 | }, |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 123 | ], |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 124 | } |
| 125 | |
| 126 | genrule { |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 127 | name: "frameworks-base-api-system-current.txt", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 128 | srcs: [ |
Yan Yan | 1357a42 | 2021-02-03 16:07:30 -0800 | [diff] [blame^] | 129 | ":android.net.ipsec.ike{.system.api.txt}", |
Anton Hansson | d74139e | 2020-10-08 14:59:17 +0100 | [diff] [blame] | 130 | ":framework-appsearch{.system.api.txt}", |
Anton Hansson | 0eccccb | 2020-09-24 12:09:25 +0100 | [diff] [blame] | 131 | ":framework-graphics{.system.api.txt}", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 132 | ":framework-media{.system.api.txt}", |
| 133 | ":framework-mediaprovider{.system.api.txt}", |
| 134 | ":framework-permission{.system.api.txt}", |
Hai Zhang | 591e121 | 2021-01-21 12:48:43 -0800 | [diff] [blame] | 135 | ":framework-permission-s{.system.api.txt}", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 136 | ":framework-sdkextensions{.system.api.txt}", |
| 137 | ":framework-statsd{.system.api.txt}", |
| 138 | ":framework-tethering{.system.api.txt}", |
| 139 | ":framework-wifi{.system.api.txt}", |
| 140 | ":non-updatable-system-current.txt", |
| 141 | ], |
| 142 | out: ["system-current.txt"], |
| 143 | tools: ["metalava"], |
| 144 | cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)", |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 145 | dists: [ |
| 146 | { |
| 147 | targets: ["droidcore"], |
| 148 | dir: "api", |
| 149 | dest: "system-current.txt", |
| 150 | }, |
| 151 | { |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 152 | targets: ["sdk", "win_sdk"], |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 153 | dir: "apistubs/android/system/api", |
| 154 | dest: "android.txt", |
| 155 | }, |
| 156 | ], |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 157 | visibility: ["//visibility:public"], |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 158 | } |
| 159 | |
| 160 | genrule { |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 161 | name: "frameworks-base-api-system-removed.txt", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 162 | srcs: [ |
Yan Yan | 1357a42 | 2021-02-03 16:07:30 -0800 | [diff] [blame^] | 163 | ":android.net.ipsec.ike{.system.removed-api.txt}", |
Anton Hansson | d74139e | 2020-10-08 14:59:17 +0100 | [diff] [blame] | 164 | ":framework-appsearch{.system.removed-api.txt}", |
| 165 | ":framework-graphics{.system.removed-api.txt}", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 166 | ":framework-media{.system.removed-api.txt}", |
| 167 | ":framework-mediaprovider{.system.removed-api.txt}", |
| 168 | ":framework-permission{.system.removed-api.txt}", |
Hai Zhang | 591e121 | 2021-01-21 12:48:43 -0800 | [diff] [blame] | 169 | ":framework-permission-s{.system.removed-api.txt}", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 170 | ":framework-sdkextensions{.system.removed-api.txt}", |
| 171 | ":framework-statsd{.system.removed-api.txt}", |
| 172 | ":framework-tethering{.system.removed-api.txt}", |
| 173 | ":framework-wifi{.system.removed-api.txt}", |
| 174 | ":non-updatable-system-removed.txt", |
| 175 | ], |
| 176 | out: ["system-removed.txt"], |
| 177 | tools: ["metalava"], |
| 178 | cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)", |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 179 | dists: [ |
| 180 | { |
| 181 | targets: ["droidcore"], |
| 182 | dir: "api", |
| 183 | dest: "system-removed.txt", |
| 184 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 185 | { |
| 186 | targets: ["sdk", "win_sdk"], |
| 187 | dir: "apistubs/android/system/api", |
| 188 | dest: "removed.txt", |
| 189 | }, |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 190 | ], |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 191 | visibility: ["//visibility:public"], |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 192 | } |
| 193 | |
| 194 | genrule { |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 195 | name: "frameworks-base-api-module-lib-current.txt", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 196 | srcs: [ |
Yan Yan | 1357a42 | 2021-02-03 16:07:30 -0800 | [diff] [blame^] | 197 | ":android.net.ipsec.ike{.module-lib.api.txt}", |
Anton Hansson | d74139e | 2020-10-08 14:59:17 +0100 | [diff] [blame] | 198 | ":framework-appsearch{.module-lib.api.txt}", |
Anton Hansson | 0eccccb | 2020-09-24 12:09:25 +0100 | [diff] [blame] | 199 | ":framework-graphics{.module-lib.api.txt}", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 200 | ":framework-media{.module-lib.api.txt}", |
| 201 | ":framework-mediaprovider{.module-lib.api.txt}", |
| 202 | ":framework-permission{.module-lib.api.txt}", |
Hai Zhang | 591e121 | 2021-01-21 12:48:43 -0800 | [diff] [blame] | 203 | ":framework-permission-s{.module-lib.api.txt}", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 204 | ":framework-sdkextensions{.module-lib.api.txt}", |
| 205 | ":framework-statsd{.module-lib.api.txt}", |
| 206 | ":framework-tethering{.module-lib.api.txt}", |
| 207 | ":framework-wifi{.module-lib.api.txt}", |
| 208 | ":non-updatable-module-lib-current.txt", |
| 209 | ], |
| 210 | out: ["module-lib-current.txt"], |
| 211 | tools: ["metalava"], |
| 212 | cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)", |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 213 | dists: [ |
| 214 | { |
| 215 | targets: ["droidcore"], |
| 216 | dir: "api", |
| 217 | dest: "module-lib-current.txt", |
| 218 | }, |
| 219 | { |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 220 | targets: ["sdk", "win_sdk"], |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 221 | dir: "apistubs/android/module-lib/api", |
| 222 | dest: "android.txt", |
| 223 | }, |
| 224 | ], |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 225 | } |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 226 | |
| 227 | genrule { |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 228 | name: "frameworks-base-api-module-lib-removed.txt", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 229 | srcs: [ |
Yan Yan | 1357a42 | 2021-02-03 16:07:30 -0800 | [diff] [blame^] | 230 | ":android.net.ipsec.ike{.module-lib.removed-api.txt}", |
Anton Hansson | d74139e | 2020-10-08 14:59:17 +0100 | [diff] [blame] | 231 | ":framework-appsearch{.module-lib.removed-api.txt}", |
| 232 | ":framework-graphics{.module-lib.removed-api.txt}", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 233 | ":framework-media{.module-lib.removed-api.txt}", |
| 234 | ":framework-mediaprovider{.module-lib.removed-api.txt}", |
| 235 | ":framework-permission{.module-lib.removed-api.txt}", |
Hai Zhang | 591e121 | 2021-01-21 12:48:43 -0800 | [diff] [blame] | 236 | ":framework-permission-s{.module-lib.removed-api.txt}", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 237 | ":framework-sdkextensions{.module-lib.removed-api.txt}", |
| 238 | ":framework-statsd{.module-lib.removed-api.txt}", |
| 239 | ":framework-tethering{.module-lib.removed-api.txt}", |
| 240 | ":framework-wifi{.module-lib.removed-api.txt}", |
| 241 | ":non-updatable-module-lib-removed.txt", |
| 242 | ], |
| 243 | out: ["module-lib-removed.txt"], |
| 244 | tools: ["metalava"], |
| 245 | cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)", |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 246 | dists: [ |
| 247 | { |
| 248 | targets: ["droidcore"], |
| 249 | dir: "api", |
| 250 | dest: "module-lib-removed.txt", |
| 251 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 252 | { |
| 253 | targets: ["sdk", "win_sdk"], |
| 254 | dir: "apistubs/android/module-lib/api", |
| 255 | dest: "removed.txt", |
| 256 | }, |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 257 | ], |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 258 | } |
Anton Hansson | a15427a | 2020-10-02 18:21:14 +0100 | [diff] [blame] | 259 | |
| 260 | genrule { |
| 261 | name: "combined-removed-dex", |
| 262 | srcs: [ |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 263 | ":frameworks-base-api-removed.txt", |
| 264 | ":frameworks-base-api-system-removed.txt", |
Anton Hansson | a15427a | 2020-10-02 18:21:14 +0100 | [diff] [blame] | 265 | ":android.car-stubs-docs{.removed-api.txt}", |
| 266 | ":android.car-system-stubs-docs{.removed-api.txt}", |
| 267 | ], |
| 268 | tool_files: ["gen_combined_removed_dex.sh"], |
| 269 | tools: ["metalava"], |
| 270 | out: ["combined-removed-dex.txt"], |
| 271 | cmd: "$(location gen_combined_removed_dex.sh) $(location metalava) $(genDir) $(in) > $(out)", |
| 272 | } |