| # Copyright 2019 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("//src/lib/icu/tools/static_icu_data.gni") |
| import("//src/lib/icu/tzdata/icu_tzdata_config_data.gni") |
| |
| # Generates a text file containing the revision ID (e.g. "2019c") of the time |
| # zone resource files. |
| # |
| # The resulting file is ASCII-encoded and contains a single unquoted string |
| # without any line breaks. It is written to |
| # `out/default/gen/src/lib/icu/tzdata/revision.txt`. |
| static_icu_data("revision") { |
| command = "tz-version" |
| output = "${target_gen_dir}/revision.txt" |
| } |
| |
| # Template applies exactly the same tzdata settings for several sibling |
| # packages. The config name for target "foo" will be "icu_tzdata_for_foo". |
| template("_default_icu_tzdata") { |
| icu_tzdata_config_data("icu_tzdata_for_" + target_name) { |
| forward_variables_from(invoker, "*") |
| for_pkg = target_name |
| data_version = "44" |
| } |
| } |
| |
| icu_tzdata_config_data("icu_tzdata_for_flutter_runner_tests") { |
| for_pkg = "flutter_runner_tests" |
| data_version = "44" |
| } |
| |
| # This config package is intended for the test named 'base_icu_fuchsia_unittests' |
| # in out-of-tree, in Chromium. The test must have this package available when |
| # running in a Fuchsia environment, as it will attempt to load the appropriate |
| # library. |
| icu_tzdata_config_data("icu_tzdata_for_chromium_base_unittests") { |
| for_pkg = "base_unittests" |
| data_version = "44" |
| } |
| |
| # All the runners use exactly the same configs, so the data should dedupe |
| # exactly in pkgfs. |
| _default_icu_tzdata("dart_aot_product_runner") { |
| } |
| _default_icu_tzdata("dart_aot_runner") { |
| } |
| _default_icu_tzdata("dart_jit_product_runner") { |
| } |
| _default_icu_tzdata("dart_jit_runner") { |
| } |
| _default_icu_tzdata("flutter_aot_product_runner") { |
| } |
| _default_icu_tzdata("flutter_aot_runner") { |
| } |
| _default_icu_tzdata("flutter_jit_product_runner") { |
| } |
| _default_icu_tzdata("flutter_jit_runner") { |
| } |
| |
| group("config") { |
| public_deps = [ |
| ":icu_tzdata_for_chromium_base_unittests", |
| ":icu_tzdata_for_dart_aot_product_runner", |
| ":icu_tzdata_for_dart_aot_runner", |
| ":icu_tzdata_for_dart_aot_runner", |
| ":icu_tzdata_for_dart_jit_product_runner", |
| ":icu_tzdata_for_dart_jit_runner", |
| ":icu_tzdata_for_flutter_aot_product_runner", |
| ":icu_tzdata_for_flutter_aot_runner", |
| ":icu_tzdata_for_flutter_jit_product_runner", |
| ":icu_tzdata_for_flutter_jit_runner", |
| ":icu_tzdata_for_flutter_runner_tests", |
| ] |
| } |