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