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