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