| # Copyright 2020 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/rust/rustc_library.gni") |
| import("//build/rust/rustc_test.gni") |
| import("//build/testing/test_spec.gni") |
| |
| if (is_host) { |
| rustc_library("lib") { |
| name = "analytics" |
| version = "0.1.0" |
| edition = "2021" |
| with_unit_tests = true |
| |
| deps = [ |
| "//src/lib/fuchsia-hyper:fuchsia-hyper", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:home", |
| "//third_party/rust_crates:hyper", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:tracing", |
| "//third_party/rust_crates:url", |
| "//third_party/rust_crates:uuid", |
| ] |
| |
| test_deps = [ |
| "//src/lib/fuchsia-async", |
| "//third_party/rust_crates:tempfile", |
| ] |
| |
| sources = [ |
| "src/env_info.rs", |
| "src/ga_event.rs", |
| "src/lib.rs", |
| "src/metrics_event_batch.rs", |
| "src/metrics_service.rs", |
| "src/metrics_state.rs", |
| "src/notice.rs", |
| ] |
| } |
| } |
| |
| group("analytics") { |
| public_deps = [ ":lib($host_toolchain)" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":lib($host_toolchain)", |
| ":lib_test($host_toolchain)", |
| ] |
| } |