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