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
26// This module provides access to information Soong has related to the
27// whole platform bootclasspath. Currently, that information is provided solely
28// through configuration but additional information will be added here.
29//
30// This will provide support for the following:
31// * Hidden API processing for those parts of the bootclasspath that are not
32//   part of an APEX.
33// * Compatibility checking to ensure that the hidden API bits encoded into the
34//   dex files by the modularized hidden API processing is compatible with the
35//   runtimes of earlier releases which expect the bits to have been computed
36//   over the entirety of the bootclasspath in one go not separately.
37// * Dexpreopting apps and other libraries not on the platform bootclasspath.
38// * Generating and installing the appropriate files to the device which will
39//   allow it to generate the bootclasspath related environment variables
40//   dynamically.
41//
42// This module needs to be present in the build for the above processing to be
43// done correctly.
44platform_bootclasspath {
45    name: "platform-bootclasspath",
46
47    // The bootclasspath_fragments that contribute to the platform
48    // bootclasspath.
49    fragments: [
50        {
51            apex: "com.android.appsearch",
52            module: "com.android.appsearch-bootclasspath-fragment",
53        },
54        {
55            apex: "com.android.art",
56            module: "art-bootclasspath-fragment",
57        },
58        {
59            apex: "com.android.conscrypt",
60            module: "com.android.conscrypt-bootclasspath-fragment",
61        },
62        {
63            apex: "com.android.i18n",
64            module: "i18n-bootclasspath-fragment",
65        },
66        {
67            apex: "com.android.ipsec",
68            module: "com.android.ipsec-bootclasspath-fragment",
69        },
70        {
71            apex: "com.android.media",
72            module: "com.android.media-bootclasspath-fragment",
73        },
74        {
75            apex: "com.android.mediaprovider",
76            module: "com.android.mediaprovider-bootclasspath-fragment",
77        },
78        {
79            apex: "com.android.os.statsd",
80            module: "com.android.os.statsd-bootclasspath-fragment",
81        },
82        {
83            apex: "com.android.permission",
84            module: "com.android.permission-bootclasspath-fragment",
85        },
86        {
87            apex: "com.android.scheduling",
88            module: "com.android.scheduling-bootclasspath-fragment",
89        },
90        {
91            apex: "com.android.sdkext",
92            module: "com.android.sdkext-bootclasspath-fragment",
93        },
94        {
95            apex: "com.android.tethering",
96            module: "com.android.tethering-bootclasspath-fragment",
97        },
98        {
99            apex: "com.android.wifi",
100            module: "com.android.wifi-bootclasspath-fragment",
101        },
102    ],
103
104    // Additional information needed by hidden api processing.
105    hidden_api: {
106        unsupported: [
107            "hiddenapi/hiddenapi-unsupported.txt",
108        ],
109        removed: [
110            ":combined-removed-dex",
111        ],
112        max_target_r_low_priority: [
113            "hiddenapi/hiddenapi-max-target-r-loprio.txt",
114        ],
115        max_target_q: [
116            "hiddenapi/hiddenapi-max-target-q.txt",
117        ],
118        max_target_p: [
119            "hiddenapi/hiddenapi-max-target-p.txt",
120        ],
121        max_target_o_low_priority: [
122            "hiddenapi/hiddenapi-max-target-o.txt",
123        ],
124        unsupported_packages: [
125            "hiddenapi/hiddenapi-unsupported-packages.txt",
126        ],
127    },
128
129    dists: [
130        {
131            targets: ["droidcore"],
132            tag: "hiddenapi-flags.csv",
133        },
134        {
135            targets: ["droidcore"],
136            tag: "hiddenapi-index.csv",
137        },
138        {
139            targets: ["droidcore"],
140            tag: "hiddenapi-metadata.csv",
141            // Legacy name
142            dest: "hiddenapi-unsupported.csv",
143        },
144    ],
145
146    required: [
147        "platform-systemserverclasspath",
148    ],
149}
150
151platform_systemserverclasspath {
152    name: "platform-systemserverclasspath",
153}
154