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