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