1// Copyright 2018 Google Inc. All rights reserved. 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 19bootstrap_go_package { 20 name: "soong-ui-metrics", 21 pkgPath: "android/soong/ui/metrics", 22 deps: [ 23 "golang-protobuf-proto", 24 "soong-finder-fs", 25 "soong-ui-metrics_upload_proto", 26 "soong-ui-metrics_proto", 27 "soong-ui-mk_metrics_proto", 28 "soong-shared", 29 "soong-ui-metrics_combined_proto", 30 ], 31 srcs: [ 32 "hostinfo.go", 33 "metrics.go", 34 "event.go", 35 ], 36 testSrcs: [ 37 "event_test.go", 38 ], 39 linux: { 40 srcs: [ 41 "hostinfo_linux.go", 42 ], 43 testSrcs: [ 44 "hostinfo_linux_test.go", 45 ], 46 }, 47 darwin: { 48 srcs: [ 49 "hostinfo_darwin.go", 50 ], 51 }, 52} 53 54bootstrap_go_package { 55 name: "soong-ui-metrics_proto", 56 pkgPath: "android/soong/ui/metrics/metrics_proto", 57 deps: [ 58 "golang-protobuf-reflect-protoreflect", 59 "golang-protobuf-runtime-protoimpl", 60 ], 61 srcs: [ 62 "metrics_proto/metrics.pb.go", 63 ], 64} 65 66bootstrap_go_package { 67 name: "soong-ui-metrics_combined_proto", 68 pkgPath: "android/soong/ui/metrics/combined_metrics_proto", 69 deps: [ 70 "golang-protobuf-reflect-protoreflect", 71 "golang-protobuf-runtime-protoimpl", 72 "soong-cmd-find_input_delta-proto", 73 ], 74 srcs: [ 75 "metrics_proto/metrics.pb.go", 76 ], 77} 78 79bootstrap_go_package { 80 name: "soong-ui-metrics_upload_proto", 81 pkgPath: "android/soong/ui/metrics/upload_proto", 82 deps: [ 83 "golang-protobuf-reflect-protoreflect", 84 "golang-protobuf-runtime-protoimpl", 85 ], 86 srcs: [ 87 "upload_proto/upload.pb.go", 88 ], 89} 90 91bootstrap_go_package { 92 name: "soong-ui-mk_metrics_proto", 93 pkgPath: "android/soong/ui/metrics/mk_metrics_proto", 94 deps: [ 95 "golang-protobuf-reflect-protoreflect", 96 "golang-protobuf-runtime-protoimpl", 97 ], 98 srcs: [ 99 "mk_metrics_proto/mk_metrics.pb.go", 100 ], 101} 102