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