| # Copyright 2025 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/components.gni") |
| import("//build/icu/icu_rustc_library.gni") |
| |
| group("intl") { |
| testonly = true |
| deps = [ |
| ":settings_intl", |
| ":tests", |
| ] |
| } |
| |
| icu_rustc_library("settings_intl") { |
| name = "settings_intl" |
| with_unit_tests = true |
| edition = "2024" |
| |
| visibility = [ |
| ":*", |
| "//src/settings/service:*", |
| ] |
| |
| icu_deps = [ |
| "//src/lib/icu_data/rust/icu_data", |
| "//third_party/rust_crates/compat/icu:uenum", |
| "//third_party/rust_crates/compat/icu:uloc", |
| ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.intl:fuchsia.intl_rust", |
| "//sdk/fidl/fuchsia.settings:fuchsia.settings_rust", |
| "//src/lib/async-utils", |
| "//src/lib/fuchsia-async", |
| "//src/settings/common:settings_common", |
| "//src/settings/storage:settings_storage", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| test_deps = [ |
| "//src/lib/fuchsia", |
| "//src/settings/test_common:settings_test_common", |
| ] |
| |
| sources = [ |
| "src/intl_controller.rs", |
| "src/intl_fidl_handler.rs", |
| "src/lib.rs", |
| "src/types.rs", |
| ] |
| |
| configs += [ "//build/config/rust/lints:deny_unused_results" ] |
| configs += [ "//build/config/rust/lints:clippy_warn_all" ] |
| } |
| |
| fuchsia_unittest_package("settings_intl_tests") { |
| component_name = "settings_intl_test" |
| manifest = "meta/settings_intl_tests.cml" |
| deps = [ |
| ":settings_intl_test", |
| "//src/intl:icudtl", |
| ] |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":settings_intl_tests" ] |
| } |