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