Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 1 | // Copyright (C) 2021 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 | // |
| 16 | // Definitions for building the Android core libraries, i.e. ART, I18n and |
| 17 | // Conscrypt. |
| 18 | // |
| 19 | // These are here as the definitions are used by the build itself and include |
| 20 | // parts from all three of those modules. |
| 21 | // |
| 22 | |
| 23 | // A stubs target containing the parts of the public SDK API provided by the |
| 24 | // core libraries. |
| 25 | // |
| 26 | // Don't use this directly, use "sdk_version: core_current". |
Bob Badour | 36dc7c6 | 2021-08-27 13:30:35 -0700 | [diff] [blame] | 27 | package { |
| 28 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 29 | } |
| 30 | |
Paul Duffin | bce9f08 | 2021-10-28 12:34:41 +0100 | [diff] [blame] | 31 | dist_targets = [ |
| 32 | "sdk", |
| 33 | "win_sdk", |
| 34 | ] |
| 35 | |
Jihoon Kang | 67b6443 | 2023-05-31 22:25:21 +0000 | [diff] [blame] | 36 | java_defaults { |
| 37 | name: "core.current.stubs.defaults", |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 38 | visibility: ["//visibility:public"], |
Jihoon Kang | 67b6443 | 2023-05-31 22:25:21 +0000 | [diff] [blame] | 39 | sdk_version: "none", |
| 40 | system_modules: "none", |
Jihoon Kang | 85bc193 | 2024-07-01 17:04:46 +0000 | [diff] [blame^] | 41 | is_stubs_module: true, |
Jihoon Kang | 67b6443 | 2023-05-31 22:25:21 +0000 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | java_library { |
Jihoon Kang | b0f4c02 | 2024-08-06 00:15:25 +0000 | [diff] [blame] | 45 | name: "core.current.stubs", |
Jihoon Kang | 67b6443 | 2023-05-31 22:25:21 +0000 | [diff] [blame] | 46 | defaults: [ |
| 47 | "core.current.stubs.defaults", |
| 48 | ], |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 49 | static_libs: [ |
| 50 | "art.module.public.api.stubs", |
| 51 | "conscrypt.module.public.api.stubs", |
| 52 | "i18n.module.public.api.stubs", |
| 53 | ], |
Jihoon Kang | 67b6443 | 2023-05-31 22:25:21 +0000 | [diff] [blame] | 54 | } |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 55 | |
Jihoon Kang | b0f4c02 | 2024-08-06 00:15:25 +0000 | [diff] [blame] | 56 | // Used for bootstrapping ART system modules |
Jihoon Kang | b281ddc | 2023-08-17 18:14:35 +0000 | [diff] [blame] | 57 | java_api_library { |
| 58 | name: "core.current.stubs.from-text", |
Jihoon Kang | b0f4c02 | 2024-08-06 00:15:25 +0000 | [diff] [blame] | 59 | defaults: [ |
| 60 | "core.current.stubs.defaults", |
| 61 | ], |
Jihoon Kang | b281ddc | 2023-08-17 18:14:35 +0000 | [diff] [blame] | 62 | api_surface: "core", |
| 63 | api_contributions: [ |
| 64 | "art.module.public.api.stubs.source.api.contribution", |
| 65 | "conscrypt.module.public.api.stubs.source.api.contribution", |
| 66 | "i18n.module.public.api.stubs.source.api.contribution", |
| 67 | ], |
| 68 | libs: [ |
| 69 | "stub-annotations", |
| 70 | ], |
Jihoon Kang | 063ec00 | 2023-06-28 01:16:23 +0000 | [diff] [blame] | 71 | enable_validation: false, |
Jihoon Kang | 5d70127 | 2024-02-15 21:53:49 +0000 | [diff] [blame] | 72 | stubs_type: "everything", |
Jihoon Kang | b281ddc | 2023-08-17 18:14:35 +0000 | [diff] [blame] | 73 | } |
| 74 | |
Jihoon Kang | 67b6443 | 2023-05-31 22:25:21 +0000 | [diff] [blame] | 75 | java_library { |
Jihoon Kang | b0f4c02 | 2024-08-06 00:15:25 +0000 | [diff] [blame] | 76 | name: "core.current.stubs.exportable", |
Jihoon Kang | bd09345 | 2023-12-26 19:08:01 +0000 | [diff] [blame] | 77 | defaults: [ |
| 78 | "core.current.stubs.defaults", |
| 79 | ], |
| 80 | static_libs: [ |
| 81 | "art.module.public.api.stubs.exportable", |
| 82 | "conscrypt.module.public.api.stubs.exportable", |
| 83 | "i18n.module.public.api.stubs.exportable", |
| 84 | ], |
| 85 | dist: { |
| 86 | targets: dist_targets, |
| 87 | dest: "core.current.stubs.jar", |
| 88 | }, |
| 89 | } |
| 90 | |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 91 | // Distributed with the SDK for turning into system modules to compile apps |
| 92 | // against. |
Paul Duffin | bce9f08 | 2021-10-28 12:34:41 +0100 | [diff] [blame] | 93 | // |
| 94 | // Also, produces dist files that are used by the |
| 95 | // prebuilts/sdk/update_prebuilts.py script to update the prebuilts/sdk |
| 96 | // directory. |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 97 | java_library { |
| 98 | name: "core-current-stubs-for-system-modules", |
| 99 | visibility: ["//development/sdk"], |
| 100 | static_libs: [ |
| 101 | "core.current.stubs", |
| 102 | // This one is not on device but it's needed when javac compiles code |
| 103 | // containing lambdas. |
| 104 | "core-lambda-stubs-for-system-modules", |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 105 | ], |
| 106 | sdk_version: "none", |
| 107 | system_modules: "none", |
Paul Duffin | bce9f08 | 2021-10-28 12:34:41 +0100 | [diff] [blame] | 108 | dists: [ |
| 109 | { |
| 110 | // Legacy dist location for the public file. |
| 111 | dest: "core-for-system-modules.jar", |
| 112 | targets: dist_targets, |
| 113 | }, |
| 114 | { |
| 115 | dest: "system-modules/public/core-for-system-modules.jar", |
| 116 | targets: dist_targets, |
| 117 | }, |
| 118 | ], |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 119 | } |
| 120 | |
Spandan Das | b0f3d42 | 2023-03-29 20:59:47 +0000 | [diff] [blame] | 121 | // Defaults module to strip out android annotations |
| 122 | java_defaults { |
| 123 | name: "system-modules-no-annotations", |
| 124 | sdk_version: "none", |
| 125 | system_modules: "none", |
| 126 | jarjar_rules: "jarjar-strip-annotations-rules.txt", |
| 127 | } |
| 128 | |
Sorin Basca | bdbae60 | 2022-07-26 15:24:15 +0100 | [diff] [blame] | 129 | // Same as core-current-stubs-for-system-modules, but android annotations are |
| 130 | // stripped. |
| 131 | java_library { |
| 132 | name: "core-current-stubs-for-system-modules-no-annotations", |
| 133 | visibility: ["//development/sdk"], |
Spandan Das | b0f3d42 | 2023-03-29 20:59:47 +0000 | [diff] [blame] | 134 | defaults: [ |
| 135 | "system-modules-no-annotations", |
| 136 | ], |
Sorin Basca | bdbae60 | 2022-07-26 15:24:15 +0100 | [diff] [blame] | 137 | static_libs: [ |
| 138 | "core-current-stubs-for-system-modules", |
| 139 | ], |
Sorin Basca | bdbae60 | 2022-07-26 15:24:15 +0100 | [diff] [blame] | 140 | dists: [ |
| 141 | { |
| 142 | // Legacy dist location for the public file. |
| 143 | dest: "core-for-system-modules-no-annotations.jar", |
| 144 | targets: dist_targets, |
| 145 | }, |
| 146 | { |
| 147 | dest: "system-modules/public/core-for-system-modules-no-annotations.jar", |
| 148 | targets: dist_targets, |
| 149 | }, |
| 150 | ], |
Sorin Basca | bdbae60 | 2022-07-26 15:24:15 +0100 | [diff] [blame] | 151 | } |
| 152 | |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 153 | // Used when compiling higher-level code against core.current.stubs. |
| 154 | java_system_modules { |
Paul Duffin | 10fb76f | 2021-11-03 16:53:31 +0000 | [diff] [blame] | 155 | name: "core-public-stubs-system-modules", |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 156 | visibility: ["//visibility:public"], |
| 157 | libs: [ |
Sorin Basca | bdbae60 | 2022-07-26 15:24:15 +0100 | [diff] [blame] | 158 | "core-current-stubs-for-system-modules-no-annotations", |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 159 | ], |
| 160 | } |
| 161 | |
Romain Jobredeaux | 9d54fda | 2023-07-28 10:32:50 -0400 | [diff] [blame] | 162 | java_defaults { |
| 163 | name: "core.module_lib.stubs.defaults", |
| 164 | visibility: ["//visibility:private"], |
| 165 | sdk_version: "none", |
| 166 | system_modules: "none", |
| 167 | } |
| 168 | |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 169 | // A stubs target containing the parts of the public SDK & @SystemApi(MODULE_LIBRARIES) API |
| 170 | // provided by the core libraries. |
| 171 | // |
| 172 | // Don't use this directly, use "sdk_version: module_current". |
| 173 | java_library { |
| 174 | name: "core.module_lib.stubs", |
Romain Jobredeaux | 9d54fda | 2023-07-28 10:32:50 -0400 | [diff] [blame] | 175 | defaults: [ |
| 176 | "core.module_lib.stubs.defaults", |
| 177 | ], |
| 178 | static_libs: [ |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 179 | "art.module.public.api.stubs.module_lib", |
| 180 | |
| 181 | // Replace the following with the module-lib correspondence when Conscrypt or i18N module |
| 182 | // provides @SystemApi(MODULE_LIBRARIES). Currently, assume that only ART module provides |
| 183 | // @SystemApi(MODULE_LIBRARIES). |
| 184 | "conscrypt.module.public.api.stubs", |
| 185 | "i18n.module.public.api.stubs", |
| 186 | ], |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 187 | } |
| 188 | |
Paul Duffin | bce9f08 | 2021-10-28 12:34:41 +0100 | [diff] [blame] | 189 | // Produces a dist file that is used by the |
| 190 | // prebuilts/sdk/update_prebuilts.py script to update the prebuilts/sdk |
| 191 | // directory. |
| 192 | java_library { |
| 193 | name: "core-module-lib-stubs-for-system-modules", |
| 194 | visibility: ["//visibility:private"], |
| 195 | static_libs: [ |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 196 | "core.module_lib.stubs", |
| 197 | // This one is not on device but it's needed when javac compiles code |
| 198 | // containing lambdas. |
| 199 | "core-lambda-stubs-for-system-modules", |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 200 | ], |
Paul Duffin | bce9f08 | 2021-10-28 12:34:41 +0100 | [diff] [blame] | 201 | sdk_version: "none", |
| 202 | system_modules: "none", |
| 203 | dist: { |
| 204 | dest: "system-modules/module-lib/core-for-system-modules.jar", |
| 205 | targets: dist_targets, |
| 206 | }, |
| 207 | } |
| 208 | |
Sorin Basca | 69f4b08 | 2022-05-09 13:55:11 +0100 | [diff] [blame] | 209 | // Same as core-module-lib-stubs-for-system-modules, but android annotations are |
| 210 | // stripped. This is used by the Java toolchain, while the annotated stub is to |
| 211 | // be used by Kotlin one. |
| 212 | java_library { |
| 213 | name: "core-module-lib-stubs-for-system-modules-no-annotations", |
| 214 | visibility: ["//visibility:private"], |
Spandan Das | b0f3d42 | 2023-03-29 20:59:47 +0000 | [diff] [blame] | 215 | defaults: [ |
| 216 | "system-modules-no-annotations", |
| 217 | ], |
Sorin Basca | 69f4b08 | 2022-05-09 13:55:11 +0100 | [diff] [blame] | 218 | static_libs: [ |
| 219 | "core-module-lib-stubs-for-system-modules", |
| 220 | ], |
Sorin Basca | 69f4b08 | 2022-05-09 13:55:11 +0100 | [diff] [blame] | 221 | dist: { |
| 222 | dest: "system-modules/module-lib/core-for-system-modules-no-annotations.jar", |
| 223 | targets: dist_targets, |
| 224 | }, |
Sorin Basca | 69f4b08 | 2022-05-09 13:55:11 +0100 | [diff] [blame] | 225 | } |
| 226 | |
Paul Duffin | bce9f08 | 2021-10-28 12:34:41 +0100 | [diff] [blame] | 227 | // Used when compiling higher-level code with sdk_version "module_current" |
| 228 | java_system_modules { |
| 229 | name: "core-module-lib-stubs-system-modules", |
| 230 | libs: [ |
Sorin Basca | 69f4b08 | 2022-05-09 13:55:11 +0100 | [diff] [blame] | 231 | "core-module-lib-stubs-for-system-modules-no-annotations", |
Paul Duffin | bce9f08 | 2021-10-28 12:34:41 +0100 | [diff] [blame] | 232 | ], |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 233 | visibility: ["//visibility:public"], |
| 234 | } |
| 235 | |
| 236 | // Ideally this should be a restricted allowlist but there are hundreds of modules that depend on |
| 237 | // this. |
| 238 | // TODO(http://b/134561230) - limit the number of dependents on this. |
| 239 | core_platform_visibility = ["//visibility:public"] |
| 240 | |
| 241 | // Libraries containing the core platform API stubs for the core libraries. |
| 242 | // |
| 243 | // Although this stubs library is primarily used by the Java compiler / build to indicate |
| 244 | // the core platform API surface area, compile_dex: true is used so that the Core Platform |
| 245 | // API annotations are available to the dex tools that enable enforcement of runtime |
| 246 | // accessibility. b/119068555 |
| 247 | java_library { |
Jihoon Kang | b0f4c02 | 2024-08-06 00:15:25 +0000 | [diff] [blame] | 248 | name: "legacy.core.platform.api.stubs", |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 249 | visibility: core_platform_visibility, |
Jihoon Kang | 67b6443 | 2023-05-31 22:25:21 +0000 | [diff] [blame] | 250 | defaults: [ |
| 251 | "core.platform.api.stubs.defaults", |
| 252 | ], |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 253 | static_libs: [ |
| 254 | "art.module.public.api.stubs.module_lib", |
| 255 | "conscrypt.module.platform.api.stubs", |
| 256 | "legacy.i18n.module.platform.api.stubs", |
| 257 | ], |
Jihoon Kang | 67b6443 | 2023-05-31 22:25:21 +0000 | [diff] [blame] | 258 | } |
| 259 | |
Jihoon Kang | bd09345 | 2023-12-26 19:08:01 +0000 | [diff] [blame] | 260 | java_library { |
Jihoon Kang | b0f4c02 | 2024-08-06 00:15:25 +0000 | [diff] [blame] | 261 | name: "legacy.core.platform.api.stubs.exportable", |
Jihoon Kang | bd09345 | 2023-12-26 19:08:01 +0000 | [diff] [blame] | 262 | visibility: core_platform_visibility, |
| 263 | defaults: [ |
| 264 | "core.platform.api.stubs.defaults", |
| 265 | ], |
| 266 | static_libs: [ |
| 267 | "art.module.public.api.stubs.exportable.module_lib", |
| 268 | "conscrypt.module.platform.api.stubs.exportable", |
| 269 | "legacy.i18n.module.platform.api.stubs.exportable", |
| 270 | ], |
| 271 | } |
| 272 | |
Jihoon Kang | b281ddc | 2023-08-17 18:14:35 +0000 | [diff] [blame] | 273 | java_defaults { |
| 274 | name: "android_core_platform_stubs_current_contributions", |
| 275 | api_surface: "core_platform", |
| 276 | api_contributions: [ |
| 277 | "art.module.public.api.stubs.source.api.contribution", |
| 278 | "art.module.public.api.stubs.source.system.api.contribution", |
| 279 | "art.module.public.api.stubs.source.module_lib.api.contribution", |
| 280 | "conscrypt.module.platform.api.stubs.source.api.contribution", |
| 281 | "i18n.module.public.api.stubs.source.api.contribution", |
| 282 | ], |
| 283 | } |
| 284 | |
Jihoon Kang | 67b6443 | 2023-05-31 22:25:21 +0000 | [diff] [blame] | 285 | java_defaults { |
| 286 | name: "core.platform.api.stubs.defaults", |
| 287 | hostdex: true, |
| 288 | compile_dex: true, |
| 289 | |
| 290 | sdk_version: "none", |
| 291 | system_modules: "none", |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 292 | patch_module: "java.base", |
Jihoon Kang | 85bc193 | 2024-07-01 17:04:46 +0000 | [diff] [blame^] | 293 | is_stubs_module: true, |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 294 | } |
| 295 | |
Sorin Basca | 69f4b08 | 2022-05-09 13:55:11 +0100 | [diff] [blame] | 296 | // Same as legacy.core.platform.api.stubs, but android annotations are |
| 297 | // stripped. This is used by the Java toolchain, while the annotated stub is to |
| 298 | // be used by Kotlin one. |
| 299 | java_library { |
| 300 | name: "legacy.core.platform.api.no.annotations.stubs", |
| 301 | visibility: core_platform_visibility, |
Spandan Das | b0f3d42 | 2023-03-29 20:59:47 +0000 | [diff] [blame] | 302 | defaults: [ |
| 303 | "system-modules-no-annotations", |
| 304 | ], |
Sorin Basca | 69f4b08 | 2022-05-09 13:55:11 +0100 | [diff] [blame] | 305 | hostdex: true, |
| 306 | compile_dex: true, |
| 307 | |
Sorin Basca | 69f4b08 | 2022-05-09 13:55:11 +0100 | [diff] [blame] | 308 | static_libs: [ |
| 309 | "legacy.core.platform.api.stubs", |
| 310 | ], |
| 311 | patch_module: "java.base", |
Jihoon Kang | 85bc193 | 2024-07-01 17:04:46 +0000 | [diff] [blame^] | 312 | is_stubs_module: true, |
Sorin Basca | 69f4b08 | 2022-05-09 13:55:11 +0100 | [diff] [blame] | 313 | } |
| 314 | |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 315 | java_library { |
Jihoon Kang | b0f4c02 | 2024-08-06 00:15:25 +0000 | [diff] [blame] | 316 | name: "stable.core.platform.api.stubs", |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 317 | visibility: core_platform_visibility, |
Jihoon Kang | 67b6443 | 2023-05-31 22:25:21 +0000 | [diff] [blame] | 318 | defaults: [ |
| 319 | "core.platform.api.stubs.defaults", |
| 320 | ], |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 321 | static_libs: [ |
| 322 | "art.module.public.api.stubs.module_lib", |
| 323 | // conscrypt only has a stable version, so it is okay to depend on it here: |
| 324 | "conscrypt.module.platform.api.stubs", |
| 325 | "stable.i18n.module.platform.api.stubs", |
| 326 | ], |
Jihoon Kang | 67b6443 | 2023-05-31 22:25:21 +0000 | [diff] [blame] | 327 | } |
| 328 | |
Sorin Basca | 69f4b08 | 2022-05-09 13:55:11 +0100 | [diff] [blame] | 329 | // Same as stable.core.platform.api.stubs, but android annotations are |
| 330 | // stripped. This is used by the Java toolchain, while the annotated stub is to |
| 331 | // be used by Kotlin one. |
| 332 | java_library { |
| 333 | name: "stable.core.platform.api.no.annotations.stubs", |
| 334 | visibility: core_platform_visibility, |
Spandan Das | b0f3d42 | 2023-03-29 20:59:47 +0000 | [diff] [blame] | 335 | defaults: [ |
| 336 | "system-modules-no-annotations", |
| 337 | ], |
Sorin Basca | 69f4b08 | 2022-05-09 13:55:11 +0100 | [diff] [blame] | 338 | hostdex: true, |
| 339 | compile_dex: true, |
| 340 | |
Sorin Basca | 69f4b08 | 2022-05-09 13:55:11 +0100 | [diff] [blame] | 341 | static_libs: [ |
| 342 | "stable.core.platform.api.stubs", |
| 343 | ], |
| 344 | patch_module: "java.base", |
Jihoon Kang | 85bc193 | 2024-07-01 17:04:46 +0000 | [diff] [blame^] | 345 | is_stubs_module: true, |
Sorin Basca | 69f4b08 | 2022-05-09 13:55:11 +0100 | [diff] [blame] | 346 | } |
| 347 | |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 348 | // Used when compiling higher-level code against *.core.platform.api.stubs. |
| 349 | java_system_modules { |
| 350 | name: "legacy-core-platform-api-stubs-system-modules", |
| 351 | visibility: core_platform_visibility, |
| 352 | libs: [ |
Sorin Basca | 69f4b08 | 2022-05-09 13:55:11 +0100 | [diff] [blame] | 353 | "legacy.core.platform.api.no.annotations.stubs", |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 354 | // This one is not on device but it's needed when javac compiles code |
| 355 | // containing lambdas. |
| 356 | "core-lambda-stubs-for-system-modules", |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 357 | ], |
| 358 | } |
| 359 | |
| 360 | java_system_modules { |
| 361 | name: "stable-core-platform-api-stubs-system-modules", |
| 362 | visibility: core_platform_visibility, |
| 363 | libs: [ |
Sorin Basca | 69f4b08 | 2022-05-09 13:55:11 +0100 | [diff] [blame] | 364 | "stable.core.platform.api.no.annotations.stubs", |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 365 | // This one is not on device but it's needed when javac compiles code |
| 366 | // containing lambdas. |
| 367 | "core-lambda-stubs-for-system-modules", |
Paul Duffin | bb360c3 | 2021-07-10 23:31:50 +0100 | [diff] [blame] | 368 | ], |
| 369 | } |
Spandan Das | fe85ca2 | 2022-12-08 02:42:25 +0000 | [diff] [blame] | 370 | |
| 371 | // Used when compiling higher-level code against art.module.public.api.stubs. |
| 372 | // This abstraction should come from the inner tree linking against the stubs |
| 373 | // and not from an "sdk", since parts of this abstraction do not belong to an |
| 374 | // official API (e.g. stub-annotations). |
| 375 | // |
| 376 | // This is only intended for use within core libraries and must not be used |
| 377 | // from outside. |
| 378 | java_system_modules { |
| 379 | name: "art-module-public-api-stubs-system-modules", |
| 380 | visibility: [ |
| 381 | "//art/build/sdk", |
| 382 | "//external/conscrypt", |
| 383 | "//external/icu/android_icu4j", |
| 384 | "//external/wycheproof", |
| 385 | ], |
| 386 | libs: [ |
| 387 | "art.module.public.api.stubs", |
| 388 | // This one is not on device but it's needed when javac compiles code |
| 389 | // containing lambdas. |
| 390 | "core-lambda-stubs-for-system-modules", |
Spandan Das | fe85ca2 | 2022-12-08 02:42:25 +0000 | [diff] [blame] | 391 | |
| 392 | // Ensure that core libraries that depend on the public API can access |
| 393 | // the UnsupportedAppUsage, CorePlatformApi and IntraCoreApi |
| 394 | // annotations. |
| 395 | "art.module.api.annotations.for.system.modules", |
Spandan Das | fe85ca2 | 2022-12-08 02:42:25 +0000 | [diff] [blame] | 396 | ], |
| 397 | } |
| 398 | |
| 399 | // Used when compiling higher-level code against art.module.public.api.stubs.module_lib. |
| 400 | // |
| 401 | // This is only intended for use within core libraries and must not be used |
| 402 | // from outside. |
| 403 | java_system_modules { |
| 404 | name: "art-module-lib-api-stubs-system-modules", |
| 405 | visibility: [ |
| 406 | "//art/build/sdk", |
| 407 | "//external/conscrypt", |
| 408 | "//external/icu/android_icu4j", |
| 409 | ], |
| 410 | libs: [ |
| 411 | "art.module.public.api.stubs.module_lib", |
| 412 | ], |
| 413 | } |
| 414 | |
| 415 | // Used when compiling against art.module.intra.core.api.stubs. |
| 416 | java_system_modules { |
| 417 | name: "art-module-intra-core-api-stubs-system-modules", |
| 418 | visibility: [ |
| 419 | "//art/build/sdk", |
| 420 | "//external/bouncycastle", |
| 421 | "//external/conscrypt", |
| 422 | "//external/icu/android_icu4j", |
| 423 | ], |
| 424 | libs: [ |
| 425 | // The intra core API stubs library. |
| 426 | "art.module.intra.core.api.stubs", |
| 427 | |
| 428 | // Additional classes needed by javac but which are not present in the stubs. |
| 429 | "art-module-intra-core-api-stubs-system-modules-lib", |
| 430 | ], |
| 431 | } |