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.ondevicepersonalization.key",
21    public_key: "com.android.ondevicepersonalization.avbpubkey",
22    private_key: "com.android.ondevicepersonalization.pem",
23}
24
25android_app_certificate {
26    name: "com.android.ondevicepersonalization.certificate",
27    certificate: "com.android.ondevicepersonalization",
28}
29
30sdk {
31    name: "ondevicepersonalization-module-sdk",
32    apexes: [
33        // Adds exportable dependencies of the APEX to the sdk,
34        // e.g. *classpath_fragments.
35        "com.android.ondevicepersonalization",
36    ],
37}
38
39bootclasspath_fragment {
40    name: "com.android.ondevicepersonalization-bootclasspath-fragment",
41    contents: ["framework-ondevicepersonalization"],
42    apex_available: ["com.android.ondevicepersonalization"],
43
44    // The bootclasspath_fragments that provide APIs on which this depends.
45    fragments: [
46        {
47            apex: "com.android.art",
48            module: "art-bootclasspath-fragment",
49        },
50    ],
51
52    // Additional stubs libraries that this fragment's contents use which are
53    // not provided by another bootclasspath_fragment.
54    additional_stubs: [
55        "android-non-updatable",
56    ],
57
58    hidden_api: {
59
60        // This module does not contain any split packages.
61        split_packages: [],
62
63        // The following packages and all their subpackages currently only
64        // contain classes from this bootclasspath_fragment. Listing a package
65        // here won't prevent other bootclasspath modules from adding classes in
66        // any of those packages but it will prevent them from adding those
67        // classes into an API surface, e.g. public, system, etc.. Doing so will
68        // result in a build failure due to inconsistent flags.
69        package_prefixes: [
70            "android.adservices.ondevicepersonalization",
71            "android.ondevicepersonalization",
72            "com.android.adservices.ondevicepersonalization",
73            "com.android.ondevicepersonalization.internal",
74            "android.federatedcompute",
75            "com.android.federatedcompute.internal",
76        ],
77    },
78}
79
80systemserverclasspath_fragment {
81    name: "com.android.ondevicepersonalization-systemserverclasspath-fragment",
82    contents: [
83        "service-ondevicepersonalization",
84    ],
85    apex_available: ["com.android.ondevicepersonalization"],
86}
87
88apex {
89    name: "com.android.ondevicepersonalization",
90    androidManifest: ":com.android.ondevicepersonalization-androidManifest",
91    manifest: "manifest.json",
92    apps: ["OnDevicePersonalization", "FederatedCompute"],
93    file_contexts: ":com.android.ondevicepersonalization-file_contexts",
94    key: "com.android.ondevicepersonalization.key",
95    bootclasspath_fragments: ["com.android.ondevicepersonalization-bootclasspath-fragment"],
96    systemserverclasspath_fragments: ["com.android.ondevicepersonalization-systemserverclasspath-fragment"],
97    defaults: ["t-launched-apex-module"],
98    prebuilts: ["current_sdkinfo"],
99    jni_libs: ["libfcp_cpp_dep_jni", "libfcp_hpke_jni"],
100    visibility: ["//packages/modules/common/build"],
101}
102
103filegroup {
104    name: "com.android.ondevicepersonalization-androidManifest",
105    srcs: ["AndroidManifest.xml"],
106}
107