Muhammad Qureshi | 564b364 | 2019-08-16 16:32:29 -0700 | [diff] [blame] | 1 | // 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 Badour | 21c8a12 | 2021-02-03 18:34:19 -0800 | [diff] [blame] | 15 | package { |
| 16 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 17 | } |
| 18 | |
Muhammad Qureshi | 564b364 | 2019-08-16 16:32:29 -0700 | [diff] [blame] | 19 | apex { |
| 20 | name: "com.android.os.statsd", |
Howard Ro | 92e1c6e | 2019-12-10 19:04:44 -0800 | [diff] [blame] | 21 | defaults: ["com.android.os.statsd-defaults"], |
Muhammad Qureshi | 564b364 | 2019-08-16 16:32:29 -0700 | [diff] [blame] | 22 | manifest: "apex_manifest.json", |
Howard Ro | 92e1c6e | 2019-12-10 19:04:44 -0800 | [diff] [blame] | 23 | } |
| 24 | |
| 25 | apex_defaults { |
satayev | 521de58 | 2021-05-12 15:45:35 +0100 | [diff] [blame] | 26 | bootclasspath_fragments: ["com.android.os.statsd-bootclasspath-fragment"], |
Jiakai Zhang | 5cd57cb | 2021-12-20 16:51:17 +0000 | [diff] [blame] | 27 | systemserverclasspath_fragments: ["com.android.os.statsd-systemserverclasspath-fragment"], |
Jooyung Han | 67c9ee9 | 2020-08-28 16:58:36 +0900 | [diff] [blame] | 28 | jni_libs: [ |
Tej Singh | 0ff1bb3 | 2020-01-29 19:07:38 -0800 | [diff] [blame] | 29 | "libstats_jni", |
Jooyung Han | 67c9ee9 | 2020-08-28 16:58:36 +0900 | [diff] [blame] | 30 | ], |
| 31 | native_shared_libs: [ |
Muhammad Qureshi | 788d239 | 2020-02-18 16:45:06 -0800 | [diff] [blame] | 32 | "libstatspull", |
| 33 | "libstatssocket", |
Tej Singh | 0ff1bb3 | 2020-01-29 19:07:38 -0800 | [diff] [blame] | 34 | ], |
Howard Ro | bb6cd0b | 2020-02-20 04:57:00 +0000 | [diff] [blame] | 35 | binaries: ["statsd"], |
Muhammad Qureshi | 1b89df1 | 2020-02-18 11:30:17 -0800 | [diff] [blame] | 36 | compile_multilib: "both", |
Anton Hansson | d6511e8 | 2021-05-20 17:58:25 +0100 | [diff] [blame] | 37 | prebuilts: [ |
| 38 | "com.android.os.statsd.init.rc", |
| 39 | "current_sdkinfo", |
| 40 | ], |
Howard Ro | 92e1c6e | 2019-12-10 19:04:44 -0800 | [diff] [blame] | 41 | name: "com.android.os.statsd-defaults", |
Gurpreet Singh | 4425dcf | 2022-03-04 15:24:04 +0000 | [diff] [blame] | 42 | defaults: ["r-launched-apex-module"], |
Muhammad Qureshi | 564b364 | 2019-08-16 16:32:29 -0700 | [diff] [blame] | 43 | key: "com.android.os.statsd.key", |
| 44 | certificate: ":com.android.os.statsd.certificate", |
| 45 | } |
| 46 | |
| 47 | apex_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 | |
| 53 | android_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 Singh | 0ff1bb3 | 2020-01-29 19:07:38 -0800 | [diff] [blame] | 59 | |
Howard Ro | bb6cd0b | 2020-02-20 04:57:00 +0000 | [diff] [blame] | 60 | prebuilt_etc { |
| 61 | name: "com.android.os.statsd.init.rc", |
| 62 | src: "statsd.rc", |
| 63 | filename: "init.rc", |
| 64 | installable: false, |
| 65 | } |
Tej Singh | 0ff1bb3 | 2020-01-29 19:07:38 -0800 | [diff] [blame] | 66 | |
Eric Holk | cabc570 | 2021-02-04 00:25:50 +0000 | [diff] [blame] | 67 | // ========================================================== |
Eric Holk | 513a4c1 | 2021-03-18 20:38:12 +0000 | [diff] [blame] | 68 | // Make libstatssocket available to unbundled modules |
Eric Holk | cabc570 | 2021-02-04 00:25:50 +0000 | [diff] [blame] | 69 | // ========================================================== |
Martin Stjernholm | b92215b | 2021-01-26 19:14:28 +0000 | [diff] [blame] | 70 | sdk { |
| 71 | name: "statsd-module-sdk", |
Paul Duffin | e618a31 | 2022-07-13 11:18:50 +0000 | [diff] [blame] | 72 | apexes: [ |
| 73 | // Adds exportable dependencies of the APEX to the sdk, |
| 74 | // e.g. *classpath_fragments. |
| 75 | "com.android.os.statsd", |
| 76 | ], |
Martin Stjernholm | b92215b | 2021-01-26 19:14:28 +0000 | [diff] [blame] | 77 | native_shared_libs: [ |
| 78 | "libstatssocket", |
| 79 | ], |
| 80 | } |
Eric Holk | ce80cd9 | 2021-02-22 13:20:56 -0800 | [diff] [blame] | 81 | |
satayev | 521de58 | 2021-05-12 15:45:35 +0100 | [diff] [blame] | 82 | // Encapsulate the contributions made by the com.android.os.statsd to the bootclasspath. |
| 83 | bootclasspath_fragment { |
| 84 | name: "com.android.os.statsd-bootclasspath-fragment", |
| 85 | contents: ["framework-statsd"], |
| 86 | apex_available: ["com.android.os.statsd"], |
Paul Duffin | 442a2f3 | 2021-05-25 10:53:39 +0100 | [diff] [blame] | 87 | |
| 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 Duffin | 6571689 | 2022-03-30 13:54:02 +0100 | [diff] [blame] | 104 | |
| 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 Duffin | 442a2f3 | 2021-05-25 10:53:39 +0100 | [diff] [blame] | 126 | }, |
satayev | 521de58 | 2021-05-12 15:45:35 +0100 | [diff] [blame] | 127 | } |
Jiakai Zhang | 5cd57cb | 2021-12-20 16:51:17 +0000 | [diff] [blame] | 128 | |
| 129 | systemserverclasspath_fragment { |
| 130 | name: "com.android.os.statsd-systemserverclasspath-fragment", |
| 131 | standalone_contents: ["service-statsd"], |
| 132 | apex_available: ["com.android.os.statsd"], |
| 133 | } |