• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_package_profiling_module",
35    ],
36    properties: [
37        "fragments",
38    ],
39}
40
41// This module provides access to information Soong has related to the
42// whole platform bootclasspath. Currently, that information is provided solely
43// through configuration but additional information will be added here.
44//
45// This will provide support for the following:
46// * Hidden API processing for those parts of the bootclasspath that are not
47//   part of an APEX.
48// * Compatibility checking to ensure that the hidden API bits encoded into the
49//   dex files by the modularized hidden API processing is compatible with the
50//   runtimes of earlier releases which expect the bits to have been computed
51//   over the entirety of the bootclasspath in one go not separately.
52// * Dexpreopting apps and other libraries not on the platform bootclasspath.
53// * Generating and installing the appropriate files to the device which will
54//   allow it to generate the bootclasspath related environment variables
55//   dynamically.
56//
57// This module needs to be present in the build for the above processing to be
58// done correctly.
59custom_platform_bootclasspath {
60    name: "platform-bootclasspath",
61
62    // The bootclasspath_fragments that contribute to the platform
63    // bootclasspath.
64    fragments: [
65        {
66            apex: "com.android.adservices",
67            module: "com.android.adservices-bootclasspath-fragment",
68        },
69        {
70            apex: "com.android.appsearch",
71            module: "com.android.appsearch-bootclasspath-fragment",
72        },
73        {
74            apex: "com.android.art",
75            module: "art-bootclasspath-fragment",
76        },
77        {
78            apex: "com.android.btservices",
79            module: "com.android.btservices-bootclasspath-fragment",
80        },
81        {
82            apex: "com.android.configinfrastructure",
83            module: "com.android.configinfrastructure-bootclasspath-fragment",
84        },
85        {
86            apex: "com.android.conscrypt",
87            module: "com.android.conscrypt-bootclasspath-fragment",
88        },
89        {
90            apex: "com.android.devicelock",
91            module: "com.android.devicelock-bootclasspath-fragment",
92        },
93        {
94            apex: "com.android.healthfitness",
95            module: "com.android.healthfitness-bootclasspath-fragment",
96        },
97        {
98            apex: "com.android.i18n",
99            module: "i18n-bootclasspath-fragment",
100        },
101        {
102            apex: "com.android.ipsec",
103            module: "com.android.ipsec-bootclasspath-fragment",
104        },
105        {
106            apex: "com.android.media",
107            module: "com.android.media-bootclasspath-fragment",
108        },
109        {
110            apex: "com.android.mediaprovider",
111            module: "com.android.mediaprovider-bootclasspath-fragment",
112        },
113        {
114            apex: "com.android.ondevicepersonalization",
115            module: "com.android.ondevicepersonalization-bootclasspath-fragment",
116        },
117        {
118            apex: "com.android.os.statsd",
119            module: "com.android.os.statsd-bootclasspath-fragment",
120        },
121        {
122            apex: "com.android.permission",
123            module: "com.android.permission-bootclasspath-fragment",
124        },
125        {
126            apex: "com.android.scheduling",
127            module: "com.android.scheduling-bootclasspath-fragment",
128        },
129        {
130            apex: "com.android.sdkext",
131            module: "com.android.sdkext-bootclasspath-fragment",
132        },
133        {
134            apex: "com.android.tethering",
135            module: "com.android.tethering-bootclasspath-fragment",
136        },
137        {
138            apex: "com.android.uwb",
139            module: "com.android.uwb-bootclasspath-fragment",
140        },
141        {
142            apex: "com.android.wifi",
143            module: "com.android.wifi-bootclasspath-fragment",
144        },
145        {
146            apex: "com.android.virt",
147            module: "com.android.virt-bootclasspath-fragment",
148        },
149    ],
150
151    soong_config_variables: {
152        car_bootclasspath_fragment: {
153            fragments: [
154                // only used for auto
155                {
156                    apex: "com.android.car.framework",
157                    module: "com.android.car.framework-bootclasspath-fragment",
158                },
159            ],
160        },
161        nfc_apex_bootclasspath_fragment: {
162            fragments: [
163                // only used if NFC mainline is enabled.
164                {
165                    apex: "com.android.nfcservices",
166                    module: "com.android.nfcservices-bootclasspath-fragment",
167                },
168            ],
169        },
170        release_crashrecovery_module: {
171            fragments: [
172                // only used when crashrecovery is enabled
173                {
174                    apex: "com.android.crashrecovery",
175                    module: "com.android.crashrecovery-bootclasspath-fragment",
176                },
177            ],
178        },
179        release_package_profiling_module: {
180            fragments: [
181                // only used if profiling is enabled.
182                {
183                    apex: "com.android.profiling",
184                    module: "com.android.profiling-bootclasspath-fragment",
185                },
186            ],
187        },
188    },
189
190    // Additional information needed by hidden api processing.
191    hidden_api: {
192        unsupported: [
193            "hiddenapi/hiddenapi-unsupported.txt",
194        ],
195        removed: [
196            ":combined-removed-dex",
197        ],
198        max_target_r_low_priority: [
199            "hiddenapi/hiddenapi-max-target-r-loprio.txt",
200        ],
201        max_target_q: [
202            "hiddenapi/hiddenapi-max-target-q.txt",
203        ],
204        max_target_p: [
205            "hiddenapi/hiddenapi-max-target-p.txt",
206        ],
207        max_target_o_low_priority: [
208            "hiddenapi/hiddenapi-max-target-o.txt",
209        ],
210        unsupported_packages: [
211            "hiddenapi/hiddenapi-unsupported-packages.txt",
212        ],
213    },
214
215    dists: [
216        {
217            targets: ["droidcore"],
218            tag: "hiddenapi-flags.csv",
219        },
220        {
221            targets: ["droidcore"],
222            tag: "hiddenapi-index.csv",
223        },
224        {
225            targets: ["droidcore"],
226            tag: "hiddenapi-metadata.csv",
227            // Legacy name
228            dest: "hiddenapi-unsupported.csv",
229        },
230    ],
231
232    required: [
233        "platform-systemserverclasspath",
234    ],
235}
236
237genrule { // This module exists to make the srcjar output available to Make.
238    name: "platform-bootclasspath.srcjar",
239    srcs: [":platform-bootclasspath{.srcjar}"],
240    out: ["platform-bootclasspath.srcjar"],
241    cmd: "cp $(in) $(out)",
242}
243
244platform_systemserverclasspath {
245    name: "platform-systemserverclasspath",
246}
247