• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2022 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    default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
19apex_key {
20    name: "com.android.adservices.key",
21    public_key: "com.android.adservices.avbpubkey",
22    private_key: "com.android.adservices.pem",
23}
24
25android_app_certificate {
26    name: "com.android.adservices.certificate",
27    certificate: "com.android.adservices",
28}
29
30apex {
31    name: "com.android.adservices",
32    manifest: "manifest.json",
33    apps: [
34        "AdServicesApk",
35        "SdkSandbox",
36    ],
37    file_contexts: ":com.android.adservices-file_contexts",
38    key: "com.android.adservices.key",
39    bootclasspath_fragments: ["com.android.adservices-bootclasspath-fragment"],
40    systemserverclasspath_fragments: ["com.android.adservices-systemserverclasspath-fragment"],
41    prebuilts: ["current_sdkinfo"],
42    certificate: ":com.android.adservices.certificate",
43    defaults: ["t-launched-apex-module"],
44    jni_libs: [
45        "libtflite_support_classifiers_native",
46        "libhpke_jni",
47    ],
48}
49
50sdk {
51    name: "adservices-module-sdk",
52    apexes: [
53        // Adds exportable dependencies of the APEX to the sdk,
54        // e.g. *classpath_fragments.
55        "com.android.adservices",
56    ],
57}
58
59systemserverclasspath_fragment {
60    name: "com.android.adservices-systemserverclasspath-fragment",
61    contents: [
62        "service-adservices",
63        "service-sdksandbox",
64    ],
65    apex_available: ["com.android.adservices"],
66}
67
68// Encapsulate the contributions made by com.android.adservices to the bootclasspath.
69bootclasspath_fragment {
70    name: "com.android.adservices-bootclasspath-fragment",
71    contents: [
72        "framework-adservices",
73        "framework-sdksandbox",
74    ],
75    apex_available: ["com.android.adservices"],
76
77    // The bootclasspath_fragments that provide APIs on which this depends.
78    fragments: [
79        {
80            apex: "com.android.art",
81            module: "art-bootclasspath-fragment",
82        },
83    ],
84
85    // Additional stubs libraries that this fragment's contents use which are
86    // not provided by another bootclasspath_fragment.
87    additional_stubs: [
88        "android-non-updatable",
89    ],
90
91    hidden_api: {
92        // The following packages contain classes from other modules on the
93        // bootclasspath. That means that the hidden API flags for this module
94        // has to explicitly list every single class this module provides in
95        // that package to differentiate them from the classes provided by other
96        // modules. That can include private classes that are not part of the
97        // API.
98        split_packages: [
99            "android.adservices",
100        ],
101
102        // The following packages and all their subpackages currently only
103        // contain classes from this bootclasspath_fragment. Listing a package
104        // here won't prevent other bootclasspath modules from adding classes in
105        // any of those packages but it will prevent them from adding those
106        // classes into an API surface, e.g. public, system, etc.. Doing so will
107        // result in a build failure due to inconsistent flags.
108        package_prefixes: [
109            "android.adservices.adid",
110            "android.adservices.adselection",
111            "android.adservices.appsetid",
112            "android.adservices.cobalt",
113            "android.adservices.common",
114            "android.adservices.customaudience",
115            "android.adservices.exceptions",
116            "android.adservices.extdata",
117            "android.adservices.measurement",
118            "android.adservices.shell",
119            "android.adservices.signals",
120            "android.adservices.topics",
121            "android.app.adservices",
122            "android.app.sdksandbox",
123            "com.android.adservices",
124        ],
125    },
126}
127