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