| # 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 = "2018" |
| 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:log", |
| "//third_party/rust_crates:nix", |
| "//third_party/rust_crates:url", |
| "//third_party/rust_crates:uuid", |
| ] |
| |
| sources = [ |
| "src/env_info.rs", |
| "src/ga_event.rs", |
| "src/lib.rs", |
| "src/notice.rs", |
| "src/user_status.rs", |
| ] |
| } |
| } |
| |
| group("analytics") { |
| public_deps = [ ":lib($host_toolchain)" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":lib($host_toolchain)", |
| ":lib_test($host_toolchain)", |
| ] |
| } |