blob: b1b0fe45a4ab0b2153c0fc26dd1323ebcc652009 [file] [log] [blame]
# 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:serde",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:tracing",
"//third_party/rust_crates:uuid",
]
test_deps = [ "//third_party/rust_crates:tempfile" ]
sources = [
"src/env_info.rs",
"src/ga4_event.rs",
"src/ga4_metrics_service.rs",
"src/lib.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)",
]
}