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