blob: 543627fd0bd38f1e813deb50cc1ca0ca58a2ba99 [file] [log] [blame]
Muhammad Qureshi564b3642019-08-16 16:32:29 -07001// Copyright (C) 2019 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
Bob Badour21c8a122021-02-03 18:34:19 -080015package {
16 default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
Muhammad Qureshi564b3642019-08-16 16:32:29 -070019apex {
20 name: "com.android.os.statsd",
Howard Ro92e1c6e2019-12-10 19:04:44 -080021 defaults: ["com.android.os.statsd-defaults"],
Muhammad Qureshi564b3642019-08-16 16:32:29 -070022 manifest: "apex_manifest.json",
Howard Ro92e1c6e2019-12-10 19:04:44 -080023}
24
25apex_defaults {
satayev521de582021-05-12 15:45:35 +010026 bootclasspath_fragments: ["com.android.os.statsd-bootclasspath-fragment"],
Jiakai Zhang5cd57cb2021-12-20 16:51:17 +000027 systemserverclasspath_fragments: ["com.android.os.statsd-systemserverclasspath-fragment"],
Jooyung Han67c9ee92020-08-28 16:58:36 +090028 jni_libs: [
Tej Singh0ff1bb32020-01-29 19:07:38 -080029 "libstats_jni",
Jooyung Han67c9ee92020-08-28 16:58:36 +090030 ],
31 native_shared_libs: [
Muhammad Qureshi788d2392020-02-18 16:45:06 -080032 "libstatspull",
33 "libstatssocket",
Tej Singh0ff1bb32020-01-29 19:07:38 -080034 ],
Howard Robb6cd0b2020-02-20 04:57:00 +000035 binaries: ["statsd"],
Muhammad Qureshi1b89df12020-02-18 11:30:17 -080036 compile_multilib: "both",
Anton Hanssond6511e82021-05-20 17:58:25 +010037 prebuilts: [
38 "com.android.os.statsd.init.rc",
39 "current_sdkinfo",
40 ],
Howard Ro92e1c6e2019-12-10 19:04:44 -080041 name: "com.android.os.statsd-defaults",
Gurpreet Singh4425dcf2022-03-04 15:24:04 +000042 defaults: ["r-launched-apex-module"],
Muhammad Qureshi564b3642019-08-16 16:32:29 -070043 key: "com.android.os.statsd.key",
44 certificate: ":com.android.os.statsd.certificate",
45}
46
47apex_key {
48 name: "com.android.os.statsd.key",
49 public_key: "com.android.os.statsd.avbpubkey",
50 private_key: "com.android.os.statsd.pem",
51}
52
53android_app_certificate {
54 name: "com.android.os.statsd.certificate",
55 // This will use com.android.os.statsd.x509.pem (the cert) and
56 // com.android.os.statsd.pk8 (the private key)
57 certificate: "com.android.os.statsd",
58}
Tej Singh0ff1bb32020-01-29 19:07:38 -080059
Howard Robb6cd0b2020-02-20 04:57:00 +000060prebuilt_etc {
61 name: "com.android.os.statsd.init.rc",
62 src: "statsd.rc",
63 filename: "init.rc",
64 installable: false,
65}
Tej Singh0ff1bb32020-01-29 19:07:38 -080066
Eric Holkcabc5702021-02-04 00:25:50 +000067// ==========================================================
Eric Holk513a4c12021-03-18 20:38:12 +000068// Make libstatssocket available to unbundled modules
Eric Holkcabc5702021-02-04 00:25:50 +000069// ==========================================================
Martin Stjernholmb92215b2021-01-26 19:14:28 +000070sdk {
71 name: "statsd-module-sdk",
Paul Duffine618a312022-07-13 11:18:50 +000072 apexes: [
73 // Adds exportable dependencies of the APEX to the sdk,
74 // e.g. *classpath_fragments.
75 "com.android.os.statsd",
76 ],
Martin Stjernholmb92215b2021-01-26 19:14:28 +000077 native_shared_libs: [
78 "libstatssocket",
79 ],
80}
Eric Holkce80cd92021-02-22 13:20:56 -080081
satayev521de582021-05-12 15:45:35 +010082// Encapsulate the contributions made by the com.android.os.statsd to the bootclasspath.
83bootclasspath_fragment {
84 name: "com.android.os.statsd-bootclasspath-fragment",
85 contents: ["framework-statsd"],
86 apex_available: ["com.android.os.statsd"],
Paul Duffin442a2f32021-05-25 10:53:39 +010087
88 // The bootclasspath_fragments that provide APIs on which this depends.
89 fragments: [
90 {
91 apex: "com.android.art",
92 module: "art-bootclasspath-fragment",
93 },
94 ],
95
96 // Additional stubs libraries that this fragment's contents use which are
97 // not provided by another bootclasspath_fragment.
98 additional_stubs: [
99 "android-non-updatable",
100 ],
101
102 hidden_api: {
103 max_target_o_low_priority: ["hiddenapi/hiddenapi-max-target-o-low-priority.txt"],
Paul Duffin65716892022-03-30 13:54:02 +0100104
105 // The following packages contain classes from other modules on the
106 // bootclasspath. That means that the hidden API flags for this module
107 // has to explicitly list every single class this module provides in
108 // that package to differentiate them from the classes provided by other
109 // modules. That can include private classes that are not part of the
110 // API.
111 split_packages: [
112 "android.app",
113 "android.os",
114 "android.util",
115 ],
116
117 // The following packages and all their subpackages currently only
118 // contain classes from this bootclasspath_fragment. Listing a package
119 // here won't prevent other bootclasspath modules from adding classes in
120 // any of those packages but it will prevent them from adding those
121 // classes into an API surface, e.g. public, system, etc.. Doing so will
122 // result in a build failure due to inconsistent flags.
123 package_prefixes: [
124 "com.android.internal.statsd",
125 ],
Paul Duffin442a2f32021-05-25 10:53:39 +0100126 },
satayev521de582021-05-12 15:45:35 +0100127}
Jiakai Zhang5cd57cb2021-12-20 16:51:17 +0000128
129systemserverclasspath_fragment {
130 name: "com.android.os.statsd-systemserverclasspath-fragment",
131 standalone_contents: ["service-statsd"],
132 apex_available: ["com.android.os.statsd"],
133}