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