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 15package { 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 26soong_config_module_type { 27 name: "custom_platform_bootclasspath", 28 module_type: "platform_bootclasspath", 29 config_namespace: "bootclasspath", 30 bool_variables: [ 31 "car_bootclasspath_fragment", 32 "nfc_apex_bootclasspath_fragment", 33 "release_crashrecovery_module", 34 "release_ondevice_intelligence_module", 35 "release_package_profiling_module", 36 ], 37 properties: [ 38 "fragments", 39 ], 40} 41 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. 60custom_platform_bootclasspath { 61 name: "platform-bootclasspath", 62 63 // The bootclasspath_fragments that contribute to the platform 64 // bootclasspath. 65 fragments: [ 66 { 67 apex: "com.android.adservices", 68 module: "com.android.adservices-bootclasspath-fragment", 69 }, 70 { 71 apex: "com.android.appsearch", 72 module: "com.android.appsearch-bootclasspath-fragment", 73 }, 74 { 75 apex: "com.android.art", 76 module: "art-bootclasspath-fragment", 77 }, 78 { 79 apex: "com.android.btservices", 80 module: "com.android.btservices-bootclasspath-fragment", 81 }, 82 { 83 apex: "com.android.configinfrastructure", 84 module: "com.android.configinfrastructure-bootclasspath-fragment", 85 }, 86 { 87 apex: "com.android.conscrypt", 88 module: "com.android.conscrypt-bootclasspath-fragment", 89 }, 90 { 91 apex: "com.android.devicelock", 92 module: "com.android.devicelock-bootclasspath-fragment", 93 }, 94 { 95 apex: "com.android.healthfitness", 96 module: "com.android.healthfitness-bootclasspath-fragment", 97 }, 98 { 99 apex: "com.android.i18n", 100 module: "i18n-bootclasspath-fragment", 101 }, 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 { 115 apex: "com.android.ondevicepersonalization", 116 module: "com.android.ondevicepersonalization-bootclasspath-fragment", 117 }, 118 { 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 { 139 apex: "com.android.uwb", 140 module: "com.android.uwb-bootclasspath-fragment", 141 }, 142 { 143 apex: "com.android.wifi", 144 module: "com.android.wifi-bootclasspath-fragment", 145 }, 146 { 147 apex: "com.android.virt", 148 module: "com.android.virt-bootclasspath-fragment", 149 }, 150 ], 151 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 }, 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 }, 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 }, 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 }, 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 }, 198 }, 199 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 ], 220 unsupported_packages: [ 221 "hiddenapi/hiddenapi-unsupported-packages.txt", 222 ], 223 }, 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 ], 241 242 required: [ 243 "platform-systemserverclasspath", 244 ], 245} 246 247java_genrule { // This module exists to make the srcjar output available to Make. 248 name: "platform-bootclasspath.srcjar", 249 srcs: [":platform-bootclasspath{.srcjar}"], 250 out: ["platform-bootclasspath.srcjar"], 251 cmd: "cp $(in) $(out)", 252} 253 254platform_systemserverclasspath { 255 name: "platform-systemserverclasspath", 256} 257