1// 2// Copyright (C) 2020 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15 16package { 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20cc_binary { 21 name: "metrics", 22 srcs: [ 23 "events.cc", 24 "host_receiver.cc", 25 "metrics.cc", 26 "utils.cc", 27 ], 28 product_variables: { 29 shipping_api_level: { 30 cflags: ["-DPRODUCT_SHIPPING_API_LEVEL=%s"], 31 }, 32 }, 33 shared_libs: [ 34 "cf_metrics_proto", 35 "libbase", 36 "libcurl", 37 "libcuttlefish_fs", 38 "libcuttlefish_utils", 39 "libfruit", 40 "libjsoncpp", 41 "liblog", 42 "libprotobuf-cpp-full", 43 ], 44 static_libs: [ 45 "libcuttlefish_host_config", 46 "libcuttlefish_msg_queue", 47 "libext2_uuid", 48 "libgflags", 49 ], 50 defaults: ["cuttlefish_host"], 51} 52 53subdirs = ["proto"] 54 55cc_test_host { 56 name: "metrics_test", 57 shared_libs: [ 58 "cf_metrics_proto", 59 "libbase", 60 "libcurl", 61 "libcuttlefish_fs", 62 "libcuttlefish_utils", 63 "libfruit", 64 "liblog", 65 "libprotobuf-cpp-full", 66 ], 67 srcs: [ 68 "unittest/main_test.cc", 69 "unittest/utils_tests.cpp", 70 "utils.cc", 71 ], 72 static_libs: [ 73 "libcuttlefish_host_config", 74 "libcuttlefish_msg_queue", 75 "libgflags", 76 "libgmock", 77 ], 78 test_options: { 79 unit_test: true, 80 }, 81 defaults: ["cuttlefish_host"], 82} 83