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 | |
| 15 | apex { |
| 16 | name: "com.android.os.statsd", |
Howard Ro | 92e1c6e | 2019-12-10 19:04:44 -0800 | [diff] [blame] | 17 | defaults: ["com.android.os.statsd-defaults"], |
Muhammad Qureshi | 564b364 | 2019-08-16 16:32:29 -0700 | [diff] [blame] | 18 | manifest: "apex_manifest.json", |
Howard Ro | 92e1c6e | 2019-12-10 19:04:44 -0800 | [diff] [blame] | 19 | } |
| 20 | |
| 21 | apex_defaults { |
Jooyung Han | 89a04ac | 2020-08-28 16:58:36 +0900 | [diff] [blame^] | 22 | jni_libs: [ |
Tej Singh | 0ff1bb3 | 2020-01-29 19:07:38 -0800 | [diff] [blame] | 23 | "libstats_jni", |
Jooyung Han | 89a04ac | 2020-08-28 16:58:36 +0900 | [diff] [blame^] | 24 | ], |
| 25 | native_shared_libs: [ |
Muhammad Qureshi | 788d239 | 2020-02-18 16:45:06 -0800 | [diff] [blame] | 26 | "libstatspull", |
| 27 | "libstatssocket", |
Tej Singh | 0ff1bb3 | 2020-01-29 19:07:38 -0800 | [diff] [blame] | 28 | ], |
Howard Ro | bb6cd0b | 2020-02-20 04:57:00 +0000 | [diff] [blame] | 29 | binaries: ["statsd"], |
Muhammad Qureshi | ff02d48 | 2019-12-12 11:03:55 -0800 | [diff] [blame] | 30 | java_libs: [ |
| 31 | "framework-statsd", |
| 32 | "service-statsd", |
| 33 | ], |
Muhammad Qureshi | 1b89df1 | 2020-02-18 11:30:17 -0800 | [diff] [blame] | 34 | compile_multilib: "both", |
Howard Ro | bb6cd0b | 2020-02-20 04:57:00 +0000 | [diff] [blame] | 35 | prebuilts: ["com.android.os.statsd.init.rc"], |
Howard Ro | 92e1c6e | 2019-12-10 19:04:44 -0800 | [diff] [blame] | 36 | name: "com.android.os.statsd-defaults", |
Jiyong Park | 14e691e | 2020-02-24 18:36:46 +0900 | [diff] [blame] | 37 | updatable: true, |
Jooyung Han | 3b57153 | 2020-03-30 13:23:01 +0900 | [diff] [blame] | 38 | min_sdk_version: "R", |
Muhammad Qureshi | 564b364 | 2019-08-16 16:32:29 -0700 | [diff] [blame] | 39 | key: "com.android.os.statsd.key", |
| 40 | certificate: ":com.android.os.statsd.certificate", |
| 41 | } |
| 42 | |
| 43 | apex_key { |
| 44 | name: "com.android.os.statsd.key", |
| 45 | public_key: "com.android.os.statsd.avbpubkey", |
| 46 | private_key: "com.android.os.statsd.pem", |
| 47 | } |
| 48 | |
| 49 | android_app_certificate { |
| 50 | name: "com.android.os.statsd.certificate", |
| 51 | // This will use com.android.os.statsd.x509.pem (the cert) and |
| 52 | // com.android.os.statsd.pk8 (the private key) |
| 53 | certificate: "com.android.os.statsd", |
| 54 | } |
Tej Singh | 0ff1bb3 | 2020-01-29 19:07:38 -0800 | [diff] [blame] | 55 | |
Howard Ro | bb6cd0b | 2020-02-20 04:57:00 +0000 | [diff] [blame] | 56 | prebuilt_etc { |
| 57 | name: "com.android.os.statsd.init.rc", |
| 58 | src: "statsd.rc", |
| 59 | filename: "init.rc", |
| 60 | installable: false, |
| 61 | } |
Tej Singh | 0ff1bb3 | 2020-01-29 19:07:38 -0800 | [diff] [blame] | 62 | |
| 63 | // JNI library for StatsLog.write |
| 64 | cc_library_shared { |
| 65 | name: "libstats_jni", |
| 66 | srcs: ["jni/**/*.cpp"], |
Orion Hodson | 517b78f | 2020-05-29 13:30:34 +0100 | [diff] [blame] | 67 | header_libs: ["libnativehelper_header_only"], |
Tej Singh | 0ff1bb3 | 2020-01-29 19:07:38 -0800 | [diff] [blame] | 68 | shared_libs: [ |
Tej Singh | 0ff1bb3 | 2020-01-29 19:07:38 -0800 | [diff] [blame] | 69 | "liblog", // Has a stable abi - should not be copied into apex. |
Tej Singh | 0ff1bb3 | 2020-01-29 19:07:38 -0800 | [diff] [blame] | 70 | "libstatssocket", |
Tej Singh | 0ff1bb3 | 2020-01-29 19:07:38 -0800 | [diff] [blame] | 71 | ], |
Tej Singh | 0ff1bb3 | 2020-01-29 19:07:38 -0800 | [diff] [blame] | 72 | stl: "libc++_static", |
| 73 | cflags: [ |
| 74 | "-Wall", |
| 75 | "-Werror", |
| 76 | "-Wextra", |
| 77 | "-Wno-unused-parameter", |
| 78 | ], |
| 79 | apex_available: [ |
| 80 | "com.android.os.statsd", |
| 81 | "test_com.android.os.statsd", |
Tej Singh | 0ff1bb3 | 2020-01-29 19:07:38 -0800 | [diff] [blame] | 82 | ], |
Muhammad Qureshi | 1b89df1 | 2020-02-18 11:30:17 -0800 | [diff] [blame] | 83 | } |