Spandan Das | 4f771f1 | 2023-03-29 22:25:59 +0000 | [diff] [blame] | 1 | // Copyright (C) 2023 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 | // This file contains java_system_modules provided by the SDK. |
| 16 | // These system modules transitively depend on core stub libraries generated from .txt files. |
| 17 | |
| 18 | // Same as core-public-stubs-system-modules, but the stubs are generated from .txt files |
| 19 | java_system_modules { |
| 20 | name: "core-public-stubs-system-modules.from-text", |
| 21 | visibility: ["//visibility:public"], |
| 22 | libs: [ |
| 23 | "core-current-stubs-for-system-modules-no-annotations.from-text", |
| 24 | ], |
Spandan Das | 4f771f1 | 2023-03-29 22:25:59 +0000 | [diff] [blame] | 25 | } |
| 26 | |
| 27 | java_library { |
| 28 | name: "core-current-stubs-for-system-modules-no-annotations.from-text", |
| 29 | visibility: ["//visibility:private"], |
| 30 | defaults: [ |
| 31 | "system-modules-no-annotations", |
| 32 | ], |
| 33 | static_libs: [ |
Spandan Das | 0cb803a | 2023-04-03 23:20:28 +0000 | [diff] [blame] | 34 | "core.current.stubs.from-text", |
Spandan Das | 760f880 | 2023-04-03 23:27:25 +0000 | [diff] [blame] | 35 | "core-lambda-stubs.from-text", |
Spandan Das | 4f771f1 | 2023-03-29 22:25:59 +0000 | [diff] [blame] | 36 | ], |
Spandan Das | 4f771f1 | 2023-03-29 22:25:59 +0000 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | // Same as core-module-lib-stubs-system-modules, but the stubs are generated from .txt files |
| 40 | java_system_modules { |
| 41 | name: "core-module-lib-stubs-system-modules.from-text", |
| 42 | visibility: ["//visibility:public"], |
| 43 | libs: [ |
| 44 | "core-module-lib-stubs-for-system-modules-no-annotations.from-text", |
| 45 | ], |
Spandan Das | 4f771f1 | 2023-03-29 22:25:59 +0000 | [diff] [blame] | 46 | } |
| 47 | |
| 48 | java_library { |
| 49 | name: "core-module-lib-stubs-for-system-modules-no-annotations.from-text", |
| 50 | visibility: ["//visibility:private"], |
| 51 | defaults: [ |
| 52 | "system-modules-no-annotations", |
| 53 | ], |
| 54 | static_libs: [ |
Spandan Das | 0cb803a | 2023-04-03 23:20:28 +0000 | [diff] [blame] | 55 | "core.module_lib.stubs.from-text", |
Spandan Das | 760f880 | 2023-04-03 23:27:25 +0000 | [diff] [blame] | 56 | "core-lambda-stubs.from-text", |
Spandan Das | 4f771f1 | 2023-03-29 22:25:59 +0000 | [diff] [blame] | 57 | ], |
Spandan Das | 4f771f1 | 2023-03-29 22:25:59 +0000 | [diff] [blame] | 58 | } |
| 59 | |
Romain Jobredeaux | 9d54fda | 2023-07-28 10:32:50 -0400 | [diff] [blame^] | 60 | java_api_library { |
Spandan Das | 4f771f1 | 2023-03-29 22:25:59 +0000 | [diff] [blame] | 61 | name: "core.module_lib.stubs.from-text", |
Romain Jobredeaux | 9d54fda | 2023-07-28 10:32:50 -0400 | [diff] [blame^] | 62 | api_surface: "module-lib", |
| 63 | api_contributions: [ |
| 64 | "art.module.public.api.stubs.source.api.contribution", |
| 65 | "art.module.public.api.stubs.source.system.api.contribution", |
| 66 | "art.module.public.api.stubs.source.module_lib.api.contribution", |
Spandan Das | 4f771f1 | 2023-03-29 22:25:59 +0000 | [diff] [blame] | 67 | |
Romain Jobredeaux | 9d54fda | 2023-07-28 10:32:50 -0400 | [diff] [blame^] | 68 | // Add the module-lib correspondence when Conscrypt or i18N module |
Spandan Das | 4f771f1 | 2023-03-29 22:25:59 +0000 | [diff] [blame] | 69 | // provides @SystemApi(MODULE_LIBRARIES). Currently, assume that only ART module provides |
| 70 | // @SystemApi(MODULE_LIBRARIES). |
Romain Jobredeaux | 9d54fda | 2023-07-28 10:32:50 -0400 | [diff] [blame^] | 71 | "conscrypt.module.public.api.stubs.source.api.contribution", |
| 72 | "i18n.module.public.api.stubs.source.api.contribution", |
Spandan Das | 4f771f1 | 2023-03-29 22:25:59 +0000 | [diff] [blame] | 73 | ], |
Romain Jobredeaux | 9d54fda | 2023-07-28 10:32:50 -0400 | [diff] [blame^] | 74 | libs: [ |
| 75 | "stub-annotations", |
| 76 | ], |
Spandan Das | 4f771f1 | 2023-03-29 22:25:59 +0000 | [diff] [blame] | 77 | visibility: ["//visibility:private"], |
Spandan Das | 4f771f1 | 2023-03-29 22:25:59 +0000 | [diff] [blame] | 78 | } |
Spandan Das | a032c35 | 2023-03-29 23:44:06 +0000 | [diff] [blame] | 79 | |
| 80 | // Same as legacy-core-platform-api-stubs-system-modules, but the stubs are generated from .txt files |
| 81 | java_system_modules { |
| 82 | name: "legacy-core-platform-api-stubs-system-modules.from-text", |
| 83 | visibility: core_platform_visibility, |
| 84 | libs: [ |
| 85 | "legacy.core.platform.api.no.annotations.stubs.from-text", |
Spandan Das | 760f880 | 2023-04-03 23:27:25 +0000 | [diff] [blame] | 86 | "core-lambda-stubs.from-text", |
Spandan Das | a032c35 | 2023-03-29 23:44:06 +0000 | [diff] [blame] | 87 | ], |
Spandan Das | a032c35 | 2023-03-29 23:44:06 +0000 | [diff] [blame] | 88 | } |
| 89 | |
| 90 | java_library { |
| 91 | name: "legacy.core.platform.api.no.annotations.stubs.from-text", |
| 92 | visibility: core_platform_visibility, |
| 93 | defaults: [ |
| 94 | "system-modules-no-annotations", |
| 95 | ], |
| 96 | hostdex: true, |
| 97 | compile_dex: true, |
| 98 | |
| 99 | static_libs: [ |
| 100 | "legacy.core.platform.api.stubs.from-text", |
| 101 | ], |
| 102 | patch_module: "java.base", |
Spandan Das | a032c35 | 2023-03-29 23:44:06 +0000 | [diff] [blame] | 103 | } |
| 104 | |
| 105 | // Same as stable-core-platform-api-stubs-system-modules, but the stubs are generated from .txt files |
| 106 | java_system_modules { |
| 107 | name: "stable-core-platform-api-stubs-system-modules.from-text", |
| 108 | visibility: core_platform_visibility, |
| 109 | libs: [ |
| 110 | "stable.core.platform.api.no.annotations.stubs.from-text", |
Spandan Das | 760f880 | 2023-04-03 23:27:25 +0000 | [diff] [blame] | 111 | "core-lambda-stubs.from-text", |
Spandan Das | a032c35 | 2023-03-29 23:44:06 +0000 | [diff] [blame] | 112 | ], |
Spandan Das | a032c35 | 2023-03-29 23:44:06 +0000 | [diff] [blame] | 113 | } |
| 114 | |
| 115 | java_library { |
| 116 | name: "stable.core.platform.api.no.annotations.stubs.from-text", |
| 117 | visibility: core_platform_visibility, |
| 118 | defaults: [ |
| 119 | "system-modules-no-annotations", |
| 120 | ], |
| 121 | hostdex: true, |
| 122 | compile_dex: true, |
| 123 | |
| 124 | static_libs: [ |
| 125 | "stable.core.platform.api.stubs.from-text", |
| 126 | ], |
| 127 | patch_module: "java.base", |
Spandan Das | a032c35 | 2023-03-29 23:44:06 +0000 | [diff] [blame] | 128 | } |
Spandan Das | 760f880 | 2023-04-03 23:27:25 +0000 | [diff] [blame] | 129 | |
| 130 | java_api_library { |
| 131 | name: "core-lambda-stubs.from-text", |
| 132 | api_surface: "toolchain", |
| 133 | api_contributions: [ |
| 134 | "art.module.toolchain.api.api.contribution", |
| 135 | ], |
| 136 | libs: [ |
| 137 | // LambdaMetaFactory depends on CallSite etc. which is part of the Core API surface |
| 138 | "core.current.stubs.from-text", |
| 139 | ], |
Spandan Das | 760f880 | 2023-04-03 23:27:25 +0000 | [diff] [blame] | 140 | } |