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 | |
Anton Hansson | e673784 | 2021-09-27 12:18:20 +0100 | [diff] [blame^] | 27 | python_defaults { |
| 28 | name: "python3_version_defaults", |
Pedro Loureiro | dea35e1 | 2021-05-26 15:50:07 +0000 | [diff] [blame] | 29 | version: { |
| 30 | py2: { |
| 31 | enabled: false, |
| 32 | }, |
| 33 | py3: { |
| 34 | enabled: true, |
| 35 | embedded_launcher: false, |
| 36 | }, |
| 37 | }, |
| 38 | } |
| 39 | |
Anton Hansson | e673784 | 2021-09-27 12:18:20 +0100 | [diff] [blame^] | 40 | python_binary_host { |
| 41 | name: "api_versions_trimmer", |
| 42 | srcs: ["api_versions_trimmer.py"], |
| 43 | defaults: ["python3_version_defaults"], |
| 44 | } |
| 45 | |
Pedro Loureiro | dea35e1 | 2021-05-26 15:50:07 +0000 | [diff] [blame] | 46 | python_test_host { |
| 47 | name: "api_versions_trimmer_unittests", |
| 48 | main: "api_versions_trimmer_unittests.py", |
| 49 | srcs: [ |
| 50 | "api_versions_trimmer_unittests.py", |
| 51 | "api_versions_trimmer.py", |
| 52 | ], |
Anton Hansson | e673784 | 2021-09-27 12:18:20 +0100 | [diff] [blame^] | 53 | defaults: ["python3_version_defaults"], |
Pedro Loureiro | dea35e1 | 2021-05-26 15:50:07 +0000 | [diff] [blame] | 54 | test_options: { |
| 55 | unit_test: true, |
| 56 | }, |
Anton Hansson | e673784 | 2021-09-27 12:18:20 +0100 | [diff] [blame^] | 57 | } |
| 58 | |
| 59 | python_binary_host { |
| 60 | name: "merge_annotation_zips", |
| 61 | srcs: ["merge_annotation_zips.py"], |
| 62 | defaults: ["python3_version_defaults"], |
| 63 | } |
| 64 | |
| 65 | python_test_host { |
| 66 | name: "merge_annotation_zips_test", |
| 67 | main: "merge_annotation_zips_test.py", |
| 68 | srcs: [ |
| 69 | "merge_annotation_zips.py", |
| 70 | "merge_annotation_zips_test.py", |
| 71 | ], |
| 72 | defaults: ["python3_version_defaults"], |
| 73 | test_options: { |
| 74 | unit_test: true, |
Pedro Loureiro | dea35e1 | 2021-05-26 15:50:07 +0000 | [diff] [blame] | 75 | }, |
| 76 | } |
| 77 | |
Anton Hansson | aa26cc1 | 2021-02-15 10:52:33 +0000 | [diff] [blame] | 78 | metalava_cmd = "$(location metalava)" |
| 79 | // Silence reflection warnings. See b/168689341 |
| 80 | metalava_cmd += " -J--add-opens=java.base/java.util=ALL-UNNAMED " |
Anton Hansson | b8ce081 | 2021-08-24 12:08:39 +0100 | [diff] [blame] | 81 | metalava_cmd += " --quiet --no-banner --format=v2 " |
Anton Hansson | aa26cc1 | 2021-02-15 10:52:33 +0000 | [diff] [blame] | 82 | |
Sasha Smundak | 02cbff44 | 2019-08-15 08:27:51 -0700 | [diff] [blame] | 83 | genrule { |
| 84 | name: "current-api-xml", |
| 85 | tools: ["metalava"], |
Anton Hansson | 00febe2 | 2020-11-05 10:30:59 +0000 | [diff] [blame] | 86 | srcs: [":frameworks-base-api-current.txt"], |
Sasha Smundak | 02cbff44 | 2019-08-15 08:27:51 -0700 | [diff] [blame] | 87 | out: ["current.api"], |
Anton Hansson | aa26cc1 | 2021-02-15 10:52:33 +0000 | [diff] [blame] | 88 | cmd: metalava_cmd + "-convert2xmlnostrip $(in) $(out)", |
Anton Hansson | fcb91d4 | 2020-09-21 16:32:14 +0100 | [diff] [blame] | 89 | visibility: ["//visibility:public"], |
Sasha Smundak | 02cbff44 | 2019-08-15 08:27:51 -0700 | [diff] [blame] | 90 | } |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 91 | |
| 92 | genrule { |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 93 | name: "frameworks-base-api-current.txt", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 94 | srcs: [ |
Yan Yan | f8b973c | 2021-02-03 16:07:30 -0800 | [diff] [blame] | 95 | ":android.net.ipsec.ike{.public.api.txt}", |
Anton Hansson | fc948d86 | 2020-12-17 16:57:35 +0000 | [diff] [blame] | 96 | ":art.module.public.api{.public.api.txt}", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 97 | ":conscrypt.module.public.api{.public.api.txt}", |
Remi NGUYEN VAN | c15d99e | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 98 | ":framework-connectivity{.public.api.txt}", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 99 | ":framework-media{.public.api.txt}", |
| 100 | ":framework-mediaprovider{.public.api.txt}", |
| 101 | ":framework-permission{.public.api.txt}", |
| 102 | ":framework-sdkextensions{.public.api.txt}", |
| 103 | ":framework-statsd{.public.api.txt}", |
| 104 | ":framework-tethering{.public.api.txt}", |
| 105 | ":framework-wifi{.public.api.txt}", |
Paul Duffin | 5a4e8f2 | 2020-11-25 15:45:43 +0000 | [diff] [blame] | 106 | ":i18n.module.public.api{.public.api.txt}", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 107 | ":non-updatable-current.txt", |
| 108 | ], |
| 109 | out: ["current.txt"], |
| 110 | tools: ["metalava"], |
Anton Hansson | aa26cc1 | 2021-02-15 10:52:33 +0000 | [diff] [blame] | 111 | cmd: metalava_cmd + "$(in) --api $(out)", |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 112 | dists: [ |
| 113 | { |
| 114 | targets: ["droidcore"], |
| 115 | dir: "api", |
| 116 | dest: "current.txt", |
| 117 | }, |
| 118 | { |
Pedro Loureiro | 4f09b85 | 2021-06-09 10:59:32 +0000 | [diff] [blame] | 119 | targets: [ |
| 120 | "sdk", |
| 121 | "win_sdk", |
| 122 | ], |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 123 | dir: "apistubs/android/public/api", |
| 124 | dest: "android.txt", |
| 125 | }, |
| 126 | ], |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 127 | visibility: ["//visibility:public"], |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 128 | } |
| 129 | |
| 130 | genrule { |
Anton Hansson | 0d6eae6 | 2021-02-12 16:47:18 +0000 | [diff] [blame] | 131 | name: "frameworks-base-api-current-compat", |
| 132 | srcs: [ |
| 133 | ":android.api.public.latest", |
| 134 | ":android-incompatibilities.api.public.latest", |
| 135 | ":frameworks-base-api-current.txt", |
| 136 | ], |
Anton Hansson | b8ce081 | 2021-08-24 12:08:39 +0100 | [diff] [blame] | 137 | out: ["updated-baseline.txt"], |
Anton Hansson | 0d6eae6 | 2021-02-12 16:47:18 +0000 | [diff] [blame] | 138 | tools: ["metalava"], |
Anton Hansson | aa26cc1 | 2021-02-15 10:52:33 +0000 | [diff] [blame] | 139 | cmd: metalava_cmd + |
Anton Hansson | 0d6eae6 | 2021-02-12 16:47:18 +0000 | [diff] [blame] | 140 | "--check-compatibility:api:released $(location :android.api.public.latest) " + |
| 141 | "--baseline:compatibility:released $(location :android-incompatibilities.api.public.latest) " + |
Anton Hansson | b8ce081 | 2021-08-24 12:08:39 +0100 | [diff] [blame] | 142 | "--update-baseline:compatibility:released $(genDir)/updated-baseline.txt " + |
| 143 | "$(location :frameworks-base-api-current.txt)", |
Anton Hansson | 0d6eae6 | 2021-02-12 16:47:18 +0000 | [diff] [blame] | 144 | } |
| 145 | |
| 146 | genrule { |
Anton Hansson | d75144f | 2020-11-05 20:21:08 +0000 | [diff] [blame] | 147 | name: "frameworks-base-api-current.srcjar", |
| 148 | srcs: [ |
Yan Yan | f8b973c | 2021-02-03 16:07:30 -0800 | [diff] [blame] | 149 | ":android.net.ipsec.ike{.public.stubs.source}", |
Anton Hansson | d75144f | 2020-11-05 20:21:08 +0000 | [diff] [blame] | 150 | ":api-stubs-docs-non-updatable", |
Anton Hansson | fc948d86 | 2020-12-17 16:57:35 +0000 | [diff] [blame] | 151 | ":art.module.public.api{.public.stubs.source}", |
Anton Hansson | d75144f | 2020-11-05 20:21:08 +0000 | [diff] [blame] | 152 | ":conscrypt.module.public.api{.public.stubs.source}", |
Remi NGUYEN VAN | c15d99e | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 153 | ":framework-connectivity{.public.stubs.source}", |
Anton Hansson | d75144f | 2020-11-05 20:21:08 +0000 | [diff] [blame] | 154 | ":framework-media{.public.stubs.source}", |
| 155 | ":framework-mediaprovider{.public.stubs.source}", |
| 156 | ":framework-permission{.public.stubs.source}", |
| 157 | ":framework-sdkextensions{.public.stubs.source}", |
| 158 | ":framework-statsd{.public.stubs.source}", |
| 159 | ":framework-tethering{.public.stubs.source}", |
| 160 | ":framework-wifi{.public.stubs.source}", |
Paul Duffin | 5a4e8f2 | 2020-11-25 15:45:43 +0000 | [diff] [blame] | 161 | ":i18n.module.public.api{.public.stubs.source}", |
Anton Hansson | d75144f | 2020-11-05 20:21:08 +0000 | [diff] [blame] | 162 | ], |
| 163 | out: ["current.srcjar"], |
| 164 | tools: ["merge_zips"], |
| 165 | cmd: "$(location merge_zips) $(out) $(in)", |
| 166 | visibility: ["//visibility:private"], // Used by make module in //development, mind. |
| 167 | } |
| 168 | |
| 169 | genrule { |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 170 | name: "frameworks-base-api-removed.txt", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 171 | srcs: [ |
Yan Yan | f8b973c | 2021-02-03 16:07:30 -0800 | [diff] [blame] | 172 | ":android.net.ipsec.ike{.public.removed-api.txt}", |
Anton Hansson | fc948d86 | 2020-12-17 16:57:35 +0000 | [diff] [blame] | 173 | ":art.module.public.api{.public.removed-api.txt}", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 174 | ":conscrypt.module.public.api{.public.removed-api.txt}", |
Remi NGUYEN VAN | c15d99e | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 175 | ":framework-connectivity{.public.removed-api.txt}", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 176 | ":framework-media{.public.removed-api.txt}", |
| 177 | ":framework-mediaprovider{.public.removed-api.txt}", |
| 178 | ":framework-permission{.public.removed-api.txt}", |
| 179 | ":framework-sdkextensions{.public.removed-api.txt}", |
| 180 | ":framework-statsd{.public.removed-api.txt}", |
| 181 | ":framework-tethering{.public.removed-api.txt}", |
| 182 | ":framework-wifi{.public.removed-api.txt}", |
Paul Duffin | 5a4e8f2 | 2020-11-25 15:45:43 +0000 | [diff] [blame] | 183 | ":i18n.module.public.api{.public.removed-api.txt}", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 184 | ":non-updatable-removed.txt", |
| 185 | ], |
| 186 | out: ["removed.txt"], |
| 187 | tools: ["metalava"], |
Anton Hansson | aa26cc1 | 2021-02-15 10:52:33 +0000 | [diff] [blame] | 188 | cmd: metalava_cmd + "$(in) --api $(out)", |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 189 | dists: [ |
| 190 | { |
| 191 | targets: ["droidcore"], |
| 192 | dir: "api", |
| 193 | dest: "removed.txt", |
| 194 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 195 | { |
Pedro Loureiro | 4f09b85 | 2021-06-09 10:59:32 +0000 | [diff] [blame] | 196 | targets: [ |
| 197 | "sdk", |
| 198 | "win_sdk", |
| 199 | ], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 200 | dir: "apistubs/android/public/api", |
| 201 | dest: "removed.txt", |
| 202 | }, |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 203 | ], |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 204 | } |
| 205 | |
| 206 | genrule { |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 207 | name: "frameworks-base-api-system-current.txt", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 208 | srcs: [ |
Victor Chang | d21107a | 2021-05-12 10:47:16 +0100 | [diff] [blame] | 209 | ":art.module.public.api{.system.api.txt}", |
Yan Yan | f8b973c | 2021-02-03 16:07:30 -0800 | [diff] [blame] | 210 | ":android.net.ipsec.ike{.system.api.txt}", |
Remi NGUYEN VAN | c15d99e | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 211 | ":framework-connectivity{.system.api.txt}", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 212 | ":framework-media{.system.api.txt}", |
| 213 | ":framework-mediaprovider{.system.api.txt}", |
| 214 | ":framework-permission{.system.api.txt}", |
| 215 | ":framework-sdkextensions{.system.api.txt}", |
| 216 | ":framework-statsd{.system.api.txt}", |
| 217 | ":framework-tethering{.system.api.txt}", |
| 218 | ":framework-wifi{.system.api.txt}", |
| 219 | ":non-updatable-system-current.txt", |
| 220 | ], |
| 221 | out: ["system-current.txt"], |
| 222 | tools: ["metalava"], |
Anton Hansson | aa26cc1 | 2021-02-15 10:52:33 +0000 | [diff] [blame] | 223 | cmd: metalava_cmd + "$(in) --api $(out)", |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 224 | dists: [ |
| 225 | { |
| 226 | targets: ["droidcore"], |
| 227 | dir: "api", |
| 228 | dest: "system-current.txt", |
| 229 | }, |
| 230 | { |
Pedro Loureiro | 4f09b85 | 2021-06-09 10:59:32 +0000 | [diff] [blame] | 231 | targets: [ |
| 232 | "sdk", |
| 233 | "win_sdk", |
| 234 | ], |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 235 | dir: "apistubs/android/system/api", |
| 236 | dest: "android.txt", |
| 237 | }, |
| 238 | ], |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 239 | visibility: ["//visibility:public"], |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 240 | } |
| 241 | |
| 242 | genrule { |
Anton Hansson | 0d6eae6 | 2021-02-12 16:47:18 +0000 | [diff] [blame] | 243 | name: "frameworks-base-api-system-current-compat", |
| 244 | srcs: [ |
| 245 | ":android.api.system.latest", |
| 246 | ":android-incompatibilities.api.system.latest", |
| 247 | ":frameworks-base-api-current.txt", |
| 248 | ":frameworks-base-api-system-current.txt", |
| 249 | ], |
Anton Hansson | b8ce081 | 2021-08-24 12:08:39 +0100 | [diff] [blame] | 250 | out: ["updated-baseline.txt"], |
Anton Hansson | 0d6eae6 | 2021-02-12 16:47:18 +0000 | [diff] [blame] | 251 | tools: ["metalava"], |
Anton Hansson | aa26cc1 | 2021-02-15 10:52:33 +0000 | [diff] [blame] | 252 | cmd: metalava_cmd + |
Anton Hansson | 0d6eae6 | 2021-02-12 16:47:18 +0000 | [diff] [blame] | 253 | "--check-compatibility:api:released $(location :android.api.system.latest) " + |
| 254 | "--check-compatibility:base $(location :frameworks-base-api-current.txt) " + |
| 255 | "--baseline:compatibility:released $(location :android-incompatibilities.api.system.latest) " + |
Anton Hansson | b8ce081 | 2021-08-24 12:08:39 +0100 | [diff] [blame] | 256 | "--update-baseline:compatibility:released $(genDir)/updated-baseline.txt " + |
| 257 | "$(location :frameworks-base-api-system-current.txt)", |
Anton Hansson | 0d6eae6 | 2021-02-12 16:47:18 +0000 | [diff] [blame] | 258 | } |
| 259 | |
| 260 | genrule { |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 261 | name: "frameworks-base-api-system-removed.txt", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 262 | srcs: [ |
Victor Chang | d21107a | 2021-05-12 10:47:16 +0100 | [diff] [blame] | 263 | ":art.module.public.api{.system.removed-api.txt}", |
Yan Yan | f8b973c | 2021-02-03 16:07:30 -0800 | [diff] [blame] | 264 | ":android.net.ipsec.ike{.system.removed-api.txt}", |
Remi NGUYEN VAN | c15d99e | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 265 | ":framework-connectivity{.system.removed-api.txt}", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 266 | ":framework-media{.system.removed-api.txt}", |
| 267 | ":framework-mediaprovider{.system.removed-api.txt}", |
| 268 | ":framework-permission{.system.removed-api.txt}", |
| 269 | ":framework-sdkextensions{.system.removed-api.txt}", |
| 270 | ":framework-statsd{.system.removed-api.txt}", |
| 271 | ":framework-tethering{.system.removed-api.txt}", |
| 272 | ":framework-wifi{.system.removed-api.txt}", |
| 273 | ":non-updatable-system-removed.txt", |
| 274 | ], |
| 275 | out: ["system-removed.txt"], |
| 276 | tools: ["metalava"], |
Anton Hansson | aa26cc1 | 2021-02-15 10:52:33 +0000 | [diff] [blame] | 277 | cmd: metalava_cmd + "$(in) --api $(out)", |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 278 | dists: [ |
| 279 | { |
| 280 | targets: ["droidcore"], |
| 281 | dir: "api", |
| 282 | dest: "system-removed.txt", |
| 283 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 284 | { |
Pedro Loureiro | 4f09b85 | 2021-06-09 10:59:32 +0000 | [diff] [blame] | 285 | targets: [ |
| 286 | "sdk", |
| 287 | "win_sdk", |
| 288 | ], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 289 | dir: "apistubs/android/system/api", |
| 290 | dest: "removed.txt", |
| 291 | }, |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 292 | ], |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 293 | visibility: ["//visibility:public"], |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 294 | } |
| 295 | |
| 296 | genrule { |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 297 | name: "frameworks-base-api-module-lib-current.txt", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 298 | srcs: [ |
Victor Chang | d21107a | 2021-05-12 10:47:16 +0100 | [diff] [blame] | 299 | ":art.module.public.api{.module-lib.api.txt}", |
Yan Yan | f8b973c | 2021-02-03 16:07:30 -0800 | [diff] [blame] | 300 | ":android.net.ipsec.ike{.module-lib.api.txt}", |
Remi NGUYEN VAN | c15d99e | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 301 | ":framework-connectivity{.module-lib.api.txt}", |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 302 | ":framework-media{.module-lib.api.txt}", |
| 303 | ":framework-mediaprovider{.module-lib.api.txt}", |
| 304 | ":framework-permission{.module-lib.api.txt}", |
| 305 | ":framework-sdkextensions{.module-lib.api.txt}", |
| 306 | ":framework-statsd{.module-lib.api.txt}", |
| 307 | ":framework-tethering{.module-lib.api.txt}", |
| 308 | ":framework-wifi{.module-lib.api.txt}", |
| 309 | ":non-updatable-module-lib-current.txt", |
| 310 | ], |
| 311 | out: ["module-lib-current.txt"], |
| 312 | tools: ["metalava"], |
Anton Hansson | aa26cc1 | 2021-02-15 10:52:33 +0000 | [diff] [blame] | 313 | cmd: metalava_cmd + "$(in) --api $(out)", |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 314 | dists: [ |
| 315 | { |
| 316 | targets: ["droidcore"], |
| 317 | dir: "api", |
| 318 | dest: "module-lib-current.txt", |
| 319 | }, |
| 320 | { |
Pedro Loureiro | 4f09b85 | 2021-06-09 10:59:32 +0000 | [diff] [blame] | 321 | targets: [ |
| 322 | "sdk", |
| 323 | "win_sdk", |
| 324 | ], |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 325 | dir: "apistubs/android/module-lib/api", |
| 326 | dest: "android.txt", |
| 327 | }, |
| 328 | ], |
Anton Hansson | 85359f6 | 2020-09-21 17:02:25 +0100 | [diff] [blame] | 329 | } |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 330 | |
| 331 | genrule { |
Anton Hansson | 0d6eae6 | 2021-02-12 16:47:18 +0000 | [diff] [blame] | 332 | name: "frameworks-base-api-module-lib-current-compat", |
| 333 | srcs: [ |
| 334 | ":android.api.module-lib.latest", |
| 335 | ":android-incompatibilities.api.module-lib.latest", |
| 336 | ":frameworks-base-api-current.txt", |
| 337 | ":frameworks-base-api-module-lib-current.txt", |
| 338 | ], |
Anton Hansson | b8ce081 | 2021-08-24 12:08:39 +0100 | [diff] [blame] | 339 | out: ["updated-baseline.txt"], |
Anton Hansson | 0d6eae6 | 2021-02-12 16:47:18 +0000 | [diff] [blame] | 340 | tools: ["metalava"], |
Anton Hansson | aa26cc1 | 2021-02-15 10:52:33 +0000 | [diff] [blame] | 341 | cmd: metalava_cmd + |
Anton Hansson | 0d6eae6 | 2021-02-12 16:47:18 +0000 | [diff] [blame] | 342 | "--check-compatibility:api:released $(location :android.api.module-lib.latest) " + |
| 343 | // Note: having "public" be the base of module-lib is not perfect -- it should |
| 344 | // ideally be a merged public+system), but this will help when migrating from |
| 345 | // MODULE_LIBS -> public. |
| 346 | "--check-compatibility:base $(location :frameworks-base-api-current.txt) " + |
| 347 | "--baseline:compatibility:released $(location :android-incompatibilities.api.module-lib.latest) " + |
Anton Hansson | b8ce081 | 2021-08-24 12:08:39 +0100 | [diff] [blame] | 348 | "--update-baseline:compatibility:released $(genDir)/updated-baseline.txt " + |
| 349 | "$(location :frameworks-base-api-module-lib-current.txt)", |
Anton Hansson | 0d6eae6 | 2021-02-12 16:47:18 +0000 | [diff] [blame] | 350 | } |
| 351 | |
| 352 | genrule { |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 353 | name: "frameworks-base-api-module-lib-removed.txt", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 354 | srcs: [ |
Victor Chang | d21107a | 2021-05-12 10:47:16 +0100 | [diff] [blame] | 355 | ":art.module.public.api{.module-lib.removed-api.txt}", |
Yan Yan | f8b973c | 2021-02-03 16:07:30 -0800 | [diff] [blame] | 356 | ":android.net.ipsec.ike{.module-lib.removed-api.txt}", |
Remi NGUYEN VAN | c15d99e | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 357 | ":framework-connectivity{.module-lib.removed-api.txt}", |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 358 | ":framework-media{.module-lib.removed-api.txt}", |
| 359 | ":framework-mediaprovider{.module-lib.removed-api.txt}", |
| 360 | ":framework-permission{.module-lib.removed-api.txt}", |
| 361 | ":framework-sdkextensions{.module-lib.removed-api.txt}", |
| 362 | ":framework-statsd{.module-lib.removed-api.txt}", |
| 363 | ":framework-tethering{.module-lib.removed-api.txt}", |
| 364 | ":framework-wifi{.module-lib.removed-api.txt}", |
| 365 | ":non-updatable-module-lib-removed.txt", |
| 366 | ], |
| 367 | out: ["module-lib-removed.txt"], |
| 368 | tools: ["metalava"], |
Anton Hansson | aa26cc1 | 2021-02-15 10:52:33 +0000 | [diff] [blame] | 369 | cmd: metalava_cmd + "$(in) --api $(out)", |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 370 | dists: [ |
| 371 | { |
| 372 | targets: ["droidcore"], |
| 373 | dir: "api", |
| 374 | dest: "module-lib-removed.txt", |
| 375 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 376 | { |
Pedro Loureiro | 4f09b85 | 2021-06-09 10:59:32 +0000 | [diff] [blame] | 377 | targets: [ |
| 378 | "sdk", |
| 379 | "win_sdk", |
| 380 | ], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 381 | dir: "apistubs/android/module-lib/api", |
| 382 | dest: "removed.txt", |
| 383 | }, |
Anton Hansson | a9ced80 | 2020-10-20 19:26:18 +0100 | [diff] [blame] | 384 | ], |
Anton Hansson | 3c1aa11 | 2020-09-25 09:13:47 +0100 | [diff] [blame] | 385 | } |
Anton Hansson | a15427a | 2020-10-02 18:21:14 +0100 | [diff] [blame] | 386 | |
| 387 | genrule { |
| 388 | name: "combined-removed-dex", |
Paul Duffin | 81af1f5 | 2021-04-08 19:22:50 +0100 | [diff] [blame] | 389 | visibility: [ |
| 390 | "//frameworks/base/boot", |
| 391 | ], |
Anton Hansson | a15427a | 2020-10-02 18:21:14 +0100 | [diff] [blame] | 392 | srcs: [ |
Anton Hansson | 1c4fab4 | 2020-11-02 11:57:33 +0000 | [diff] [blame] | 393 | ":frameworks-base-api-removed.txt", |
| 394 | ":frameworks-base-api-system-removed.txt", |
Anton Hansson | a15427a | 2020-10-02 18:21:14 +0100 | [diff] [blame] | 395 | ":android.car-stubs-docs{.removed-api.txt}", |
| 396 | ":android.car-system-stubs-docs{.removed-api.txt}", |
| 397 | ], |
| 398 | tool_files: ["gen_combined_removed_dex.sh"], |
| 399 | tools: ["metalava"], |
| 400 | out: ["combined-removed-dex.txt"], |
| 401 | cmd: "$(location gen_combined_removed_dex.sh) $(location metalava) $(genDir) $(in) > $(out)", |
| 402 | } |
Andrei Onea | b2cf181 | 2021-02-19 16:28:30 +0000 | [diff] [blame] | 403 | |
| 404 | genrule { |
| 405 | name: "services-system-server-current.txt", |
| 406 | srcs: [ |
| 407 | ":service-permission{.system-server.api.txt}", |
| 408 | ":non-updatable-system-server-current.txt", |
| 409 | ], |
| 410 | out: ["system-server-current.txt"], |
| 411 | tools: ["metalava"], |
Anton Hansson | aa26cc1 | 2021-02-15 10:52:33 +0000 | [diff] [blame] | 412 | cmd: metalava_cmd + "$(in) --api $(out)", |
Andrei Onea | b2cf181 | 2021-02-19 16:28:30 +0000 | [diff] [blame] | 413 | dists: [ |
| 414 | { |
| 415 | targets: ["droidcore"], |
| 416 | dir: "api", |
| 417 | dest: "system-server-current.txt", |
| 418 | }, |
| 419 | { |
Pedro Loureiro | 4f09b85 | 2021-06-09 10:59:32 +0000 | [diff] [blame] | 420 | targets: [ |
| 421 | "sdk", |
| 422 | "win_sdk", |
| 423 | ], |
Andrei Onea | b2cf181 | 2021-02-19 16:28:30 +0000 | [diff] [blame] | 424 | dir: "apistubs/android/system-server/api", |
Andrei Onea | faa271a | 2021-03-17 13:32:51 +0000 | [diff] [blame] | 425 | dest: "android.txt", |
Andrei Onea | b2cf181 | 2021-02-19 16:28:30 +0000 | [diff] [blame] | 426 | }, |
| 427 | ], |
| 428 | } |
| 429 | |
| 430 | genrule { |
| 431 | name: "services-system-server-removed.txt", |
| 432 | srcs: [ |
| 433 | ":service-permission{.system-server.removed-api.txt}", |
| 434 | ":non-updatable-system-server-removed.txt", |
| 435 | ], |
| 436 | out: ["system-server-removed.txt"], |
| 437 | tools: ["metalava"], |
Anton Hansson | aa26cc1 | 2021-02-15 10:52:33 +0000 | [diff] [blame] | 438 | cmd: metalava_cmd + "$(in) --api $(out)", |
Andrei Onea | b2cf181 | 2021-02-19 16:28:30 +0000 | [diff] [blame] | 439 | dists: [ |
| 440 | { |
| 441 | targets: ["droidcore"], |
| 442 | dir: "api", |
| 443 | dest: "system-server-removed.txt", |
| 444 | }, |
| 445 | { |
Pedro Loureiro | 4f09b85 | 2021-06-09 10:59:32 +0000 | [diff] [blame] | 446 | targets: [ |
| 447 | "sdk", |
| 448 | "win_sdk", |
| 449 | ], |
Andrei Onea | b2cf181 | 2021-02-19 16:28:30 +0000 | [diff] [blame] | 450 | dir: "apistubs/android/system-server/api", |
Andrei Onea | faa271a | 2021-03-17 13:32:51 +0000 | [diff] [blame] | 451 | dest: "removed.txt", |
Andrei Onea | b2cf181 | 2021-02-19 16:28:30 +0000 | [diff] [blame] | 452 | }, |
| 453 | ], |
| 454 | } |
Pedro Loureiro | dea35e1 | 2021-05-26 15:50:07 +0000 | [diff] [blame] | 455 | |
| 456 | // This rule will filter classes present in the jar files of mainline modules |
| 457 | // from the lint database in api-versions.xml. |
| 458 | // This is done to reduce the number of false positive NewApi findings in |
| 459 | // java libraries that compile against the module SDK |
| 460 | genrule { |
| 461 | name: "api-versions-xml-public-filtered", |
| 462 | srcs: [ |
| 463 | // Note: order matters: first parameter is the full api-versions.xml |
| 464 | // after that the stubs files in any order |
| 465 | // stubs files are all modules that export API surfaces EXCEPT ART |
| 466 | ":framework-doc-stubs{.api_versions.xml}", |
| 467 | ":android.net.ipsec.ike.stubs{.jar}", |
| 468 | ":conscrypt.module.public.api.stubs{.jar}", |
| 469 | ":framework-connectivity.stubs{.jar}", |
| 470 | ":framework-media.stubs{.jar}", |
| 471 | ":framework-mediaprovider.stubs{.jar}", |
| 472 | ":framework-permission.stubs{.jar}", |
| 473 | ":framework-sdkextensions.stubs{.jar}", |
| 474 | ":framework-statsd.stubs{.jar}", |
| 475 | ":framework-tethering.stubs{.jar}", |
| 476 | ":framework-wifi.stubs{.jar}", |
| 477 | ":i18n.module.public.api.stubs{.jar}", |
| 478 | ], |
| 479 | out: ["api-versions-public-filtered.xml"], |
| 480 | tools: ["api_versions_trimmer"], |
| 481 | cmd: "$(location api_versions_trimmer) $(out) $(in)", |
| 482 | dist: { |
| 483 | targets: [ |
| 484 | "sdk", |
| 485 | "win_sdk", |
| 486 | ], |
| 487 | }, |
| 488 | } |