Paul Duffin | 1128114 | 2021-01-25 18:31:26 +0000 | [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 | |
Bob Badour | 051ef78 | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 15 | package { |
| 16 | // See: http://go/android-license-faq |
| 17 | // A large-scale-change added 'default_applicable_licenses' to import |
| 18 | // all of the 'license_kinds' from "frameworks_base_license" |
| 19 | // to get the below license kinds: |
| 20 | // SPDX-license-identifier-Apache-2.0 |
| 21 | // SPDX-license-identifier-MIT |
| 22 | // SPDX-license-identifier-Unicode-DFS |
| 23 | default_applicable_licenses: ["frameworks_base_license"], |
| 24 | } |
| 25 | |
Paul Duffin | c67e1df | 2023-01-09 12:03:59 +0000 | [diff] [blame] | 26 | soong_config_module_type { |
| 27 | name: "custom_platform_bootclasspath", |
| 28 | module_type: "platform_bootclasspath", |
Roshan Pius | 9667b04 | 2024-01-12 14:16:10 -0800 | [diff] [blame] | 29 | config_namespace: "bootclasspath", |
Paul Duffin | c67e1df | 2023-01-09 12:03:59 +0000 | [diff] [blame] | 30 | bool_variables: [ |
| 31 | "car_bootclasspath_fragment", |
Roshan Pius | 9667b04 | 2024-01-12 14:16:10 -0800 | [diff] [blame] | 32 | "nfc_apex_bootclasspath_fragment", |
Harshit Mahajan | 919593c | 2024-01-17 15:52:22 +0000 | [diff] [blame] | 33 | "release_crashrecovery_module", |
Paul Duffin | c67e1df | 2023-01-09 12:03:59 +0000 | [diff] [blame] | 34 | ], |
| 35 | properties: [ |
| 36 | "fragments", |
| 37 | ], |
| 38 | } |
| 39 | |
Paul Duffin | 3e4ec3b | 2021-04-01 11:53:32 +0100 | [diff] [blame] | 40 | // This module provides access to information Soong has related to the |
| 41 | // whole platform bootclasspath. Currently, that information is provided solely |
| 42 | // through configuration but additional information will be added here. |
| 43 | // |
| 44 | // This will provide support for the following: |
| 45 | // * Hidden API processing for those parts of the bootclasspath that are not |
| 46 | // part of an APEX. |
| 47 | // * Compatibility checking to ensure that the hidden API bits encoded into the |
| 48 | // dex files by the modularized hidden API processing is compatible with the |
| 49 | // runtimes of earlier releases which expect the bits to have been computed |
| 50 | // over the entirety of the bootclasspath in one go not separately. |
| 51 | // * Dexpreopting apps and other libraries not on the platform bootclasspath. |
| 52 | // * Generating and installing the appropriate files to the device which will |
| 53 | // allow it to generate the bootclasspath related environment variables |
| 54 | // dynamically. |
| 55 | // |
| 56 | // This module needs to be present in the build for the above processing to be |
| 57 | // done correctly. |
Paul Duffin | c67e1df | 2023-01-09 12:03:59 +0000 | [diff] [blame] | 58 | custom_platform_bootclasspath { |
Paul Duffin | 3e4ec3b | 2021-04-01 11:53:32 +0100 | [diff] [blame] | 59 | name: "platform-bootclasspath", |
Paul Duffin | 81af1f5 | 2021-04-08 19:22:50 +0100 | [diff] [blame] | 60 | |
Paul Duffin | b2d391d | 2021-04-08 09:05:39 +0100 | [diff] [blame] | 61 | // The bootclasspath_fragments that contribute to the platform |
| 62 | // bootclasspath. |
| 63 | fragments: [ |
| 64 | { |
Neha Pattan | fa46dd2 | 2022-02-18 19:46:09 +0000 | [diff] [blame] | 65 | apex: "com.android.adservices", |
| 66 | module: "com.android.adservices-bootclasspath-fragment", |
| 67 | }, |
| 68 | { |
Artur Satayev | e19115d | 2021-05-25 16:46:33 +0000 | [diff] [blame] | 69 | apex: "com.android.appsearch", |
| 70 | module: "com.android.appsearch-bootclasspath-fragment", |
| 71 | }, |
| 72 | { |
Paul Duffin | b2d391d | 2021-04-08 09:05:39 +0100 | [diff] [blame] | 73 | apex: "com.android.art", |
| 74 | module: "art-bootclasspath-fragment", |
| 75 | }, |
Paul Duffin | fc8fd10 | 2021-04-14 19:17:52 +0100 | [diff] [blame] | 76 | { |
William Escande | 7b012e9 | 2022-06-22 13:19:14 -0700 | [diff] [blame] | 77 | apex: "com.android.btservices", |
| 78 | module: "com.android.btservices-bootclasspath-fragment", |
Roopa Sattiraju | 293ed88 | 2022-02-03 09:07:17 -0800 | [diff] [blame] | 79 | }, |
| 80 | { |
Hassan Ali | 482f91c | 2022-10-05 13:16:23 +0000 | [diff] [blame] | 81 | apex: "com.android.configinfrastructure", |
| 82 | module: "com.android.configinfrastructure-bootclasspath-fragment", |
| 83 | }, |
| 84 | { |
Artur Satayev | e19115d | 2021-05-25 16:46:33 +0000 | [diff] [blame] | 85 | apex: "com.android.conscrypt", |
| 86 | module: "com.android.conscrypt-bootclasspath-fragment", |
| 87 | }, |
| 88 | { |
Amos Bianchi | 62e8cf3 | 2022-08-02 15:42:30 -0700 | [diff] [blame] | 89 | apex: "com.android.devicelock", |
| 90 | module: "com.android.devicelock-bootclasspath-fragment", |
| 91 | }, |
| 92 | { |
ronish | fc97db5 | 2023-02-07 17:57:48 +0000 | [diff] [blame] | 93 | apex: "com.android.healthfitness", |
| 94 | module: "com.android.healthfitness-bootclasspath-fragment", |
Anna Zhuravleva | bdc7f99 | 2022-09-06 10:47:37 +0000 | [diff] [blame] | 95 | }, |
| 96 | { |
Paul Duffin | fc8fd10 | 2021-04-14 19:17:52 +0100 | [diff] [blame] | 97 | apex: "com.android.i18n", |
| 98 | module: "i18n-bootclasspath-fragment", |
| 99 | }, |
Artur Satayev | e19115d | 2021-05-25 16:46:33 +0000 | [diff] [blame] | 100 | { |
| 101 | apex: "com.android.ipsec", |
| 102 | module: "com.android.ipsec-bootclasspath-fragment", |
| 103 | }, |
| 104 | { |
| 105 | apex: "com.android.media", |
| 106 | module: "com.android.media-bootclasspath-fragment", |
| 107 | }, |
| 108 | { |
| 109 | apex: "com.android.mediaprovider", |
| 110 | module: "com.android.mediaprovider-bootclasspath-fragment", |
| 111 | }, |
| 112 | { |
Frank Wang | e97ff9e | 2022-02-13 07:06:31 +0000 | [diff] [blame] | 113 | apex: "com.android.ondevicepersonalization", |
| 114 | module: "com.android.ondevicepersonalization-bootclasspath-fragment", |
| 115 | }, |
| 116 | { |
Artur Satayev | e19115d | 2021-05-25 16:46:33 +0000 | [diff] [blame] | 117 | apex: "com.android.os.statsd", |
| 118 | module: "com.android.os.statsd-bootclasspath-fragment", |
| 119 | }, |
| 120 | { |
| 121 | apex: "com.android.permission", |
| 122 | module: "com.android.permission-bootclasspath-fragment", |
| 123 | }, |
| 124 | { |
Yisroel Forta | b0540e8 | 2024-01-30 16:22:06 +0000 | [diff] [blame] | 125 | apex: "com.android.profiling", |
| 126 | module: "com.android.profiling-bootclasspath-fragment", |
| 127 | }, |
| 128 | { |
Artur Satayev | e19115d | 2021-05-25 16:46:33 +0000 | [diff] [blame] | 129 | apex: "com.android.scheduling", |
| 130 | module: "com.android.scheduling-bootclasspath-fragment", |
| 131 | }, |
| 132 | { |
| 133 | apex: "com.android.sdkext", |
| 134 | module: "com.android.sdkext-bootclasspath-fragment", |
| 135 | }, |
| 136 | { |
| 137 | apex: "com.android.tethering", |
| 138 | module: "com.android.tethering-bootclasspath-fragment", |
| 139 | }, |
| 140 | { |
Roshan Pius | 6c580dd | 2021-07-29 21:31:23 -0700 | [diff] [blame] | 141 | apex: "com.android.uwb", |
| 142 | module: "com.android.uwb-bootclasspath-fragment", |
| 143 | }, |
| 144 | { |
Artur Satayev | e19115d | 2021-05-25 16:46:33 +0000 | [diff] [blame] | 145 | apex: "com.android.wifi", |
| 146 | module: "com.android.wifi-bootclasspath-fragment", |
| 147 | }, |
Nikita Ioffe | ceff6b8 | 2022-10-18 23:14:22 +0100 | [diff] [blame] | 148 | { |
| 149 | apex: "com.android.virt", |
| 150 | module: "com.android.virt-bootclasspath-fragment", |
| 151 | }, |
Paul Duffin | b2d391d | 2021-04-08 09:05:39 +0100 | [diff] [blame] | 152 | ], |
| 153 | |
Paul Duffin | c67e1df | 2023-01-09 12:03:59 +0000 | [diff] [blame] | 154 | soong_config_variables: { |
| 155 | car_bootclasspath_fragment: { |
| 156 | fragments: [ |
| 157 | // only used for auto |
| 158 | { |
| 159 | apex: "com.android.car.framework", |
| 160 | module: "com.android.car.framework-bootclasspath-fragment", |
| 161 | }, |
| 162 | ], |
| 163 | }, |
Roshan Pius | 9667b04 | 2024-01-12 14:16:10 -0800 | [diff] [blame] | 164 | nfc_apex_bootclasspath_fragment: { |
| 165 | fragments: [ |
| 166 | // only used if NFC mainline is enabled. |
| 167 | { |
| 168 | apex: "com.android.nfcservices", |
| 169 | module: "com.android.nfcservices-bootclasspath-fragment", |
| 170 | }, |
| 171 | ], |
| 172 | }, |
Harshit Mahajan | 919593c | 2024-01-17 15:52:22 +0000 | [diff] [blame] | 173 | release_crashrecovery_module: { |
| 174 | fragments: [ |
| 175 | // only used when crashrecovery is enabled |
| 176 | { |
| 177 | apex: "com.android.crashrecovery", |
| 178 | module: "com.android.crashrecovery-bootclasspath-fragment", |
| 179 | }, |
| 180 | ], |
| 181 | }, |
Paul Duffin | c67e1df | 2023-01-09 12:03:59 +0000 | [diff] [blame] | 182 | }, |
| 183 | |
Paul Duffin | 81af1f5 | 2021-04-08 19:22:50 +0100 | [diff] [blame] | 184 | // Additional information needed by hidden api processing. |
| 185 | hidden_api: { |
| 186 | unsupported: [ |
| 187 | "hiddenapi/hiddenapi-unsupported.txt", |
| 188 | ], |
| 189 | removed: [ |
| 190 | ":combined-removed-dex", |
| 191 | ], |
| 192 | max_target_r_low_priority: [ |
| 193 | "hiddenapi/hiddenapi-max-target-r-loprio.txt", |
| 194 | ], |
| 195 | max_target_q: [ |
| 196 | "hiddenapi/hiddenapi-max-target-q.txt", |
| 197 | ], |
| 198 | max_target_p: [ |
| 199 | "hiddenapi/hiddenapi-max-target-p.txt", |
| 200 | ], |
| 201 | max_target_o_low_priority: [ |
| 202 | "hiddenapi/hiddenapi-max-target-o.txt", |
| 203 | ], |
Paul Duffin | 81af1f5 | 2021-04-08 19:22:50 +0100 | [diff] [blame] | 204 | unsupported_packages: [ |
| 205 | "hiddenapi/hiddenapi-unsupported-packages.txt", |
| 206 | ], |
| 207 | }, |
Paul Duffin | 3969fad | 2021-04-12 12:57:06 +0100 | [diff] [blame] | 208 | |
| 209 | dists: [ |
| 210 | { |
| 211 | targets: ["droidcore"], |
| 212 | tag: "hiddenapi-flags.csv", |
| 213 | }, |
| 214 | { |
| 215 | targets: ["droidcore"], |
| 216 | tag: "hiddenapi-index.csv", |
| 217 | }, |
| 218 | { |
| 219 | targets: ["droidcore"], |
| 220 | tag: "hiddenapi-metadata.csv", |
| 221 | // Legacy name |
| 222 | dest: "hiddenapi-unsupported.csv", |
| 223 | }, |
| 224 | ], |
satayev | 8e93d88 | 2021-04-29 11:54:02 +0100 | [diff] [blame] | 225 | |
| 226 | required: [ |
| 227 | "platform-systemserverclasspath", |
| 228 | ], |
| 229 | } |
| 230 | |
Anton Hansson | 26c63d2 | 2023-09-22 10:16:00 +0000 | [diff] [blame] | 231 | genrule { // This module exists to make the srcjar output available to Make. |
| 232 | name: "platform-bootclasspath.srcjar", |
| 233 | srcs: [":platform-bootclasspath{.srcjar}"], |
| 234 | out: ["platform-bootclasspath.srcjar"], |
| 235 | cmd: "cp $(in) $(out)", |
| 236 | } |
| 237 | |
satayev | 8e93d88 | 2021-04-29 11:54:02 +0100 | [diff] [blame] | 238 | platform_systemserverclasspath { |
| 239 | name: "platform-systemserverclasspath", |
Paul Duffin | 1128114 | 2021-01-25 18:31:26 +0000 | [diff] [blame] | 240 | } |