| # Copyright 2017 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("//third_party/cobalt/cobalt_config_header.gni") |
| import("//third_party/protobuf/proto_library.gni") |
| |
| static_library("legacy_project_context") { |
| sources = [ |
| "project_context.cc", |
| "project_context.h", |
| ] |
| configs += [ "//third_party/cobalt:cobalt_config" ] |
| |
| deps = [ |
| ":client_secret", |
| "//src/lib/fxl", |
| "//third_party/cobalt/config:client_config", |
| "//third_party/protobuf:protobuf_lite", |
| ] |
| } |
| |
| static_library("encoder") { |
| sources = [ |
| "encoder.cc", |
| "encoder.h", |
| "envelope_maker.cc", |
| "envelope_maker.h", |
| "file_observation_store.cc", |
| "file_observation_store.h", |
| "memory_observation_store.cc", |
| "memory_observation_store.h", |
| "observation_store.cc", |
| "observation_store.h", |
| "observation_store_update_recipient.h", |
| "send_retryer.cc", |
| "send_retryer.h", |
| "shipping_manager.cc", |
| "shipping_manager.h", |
| "shuffler_client.cc", |
| "shuffler_client.h", |
| "system_data.cc", |
| "system_data.h", |
| "upload_scheduler.cc", |
| "upload_scheduler.h", |
| |
| # Includes from protobuf that are not included in protobuf lite |
| "//third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc", |
| "//third_party/protobuf/src/google/protobuf/util/delimited_message_util.cc", |
| ] |
| public_configs = [ "//third_party/cobalt:cobalt_config" ] |
| |
| deps = [ |
| "//third_party/abseil-cpp/absl/synchronization:synchronization", |
| "//third_party/cobalt/algorithms/forculus:forculus_encoder", |
| "//third_party/cobalt/algorithms/rappor:rappor_encoder", |
| ] |
| |
| public_deps = [ |
| ":client_secret", |
| ":file_observation_store_internal_proto", |
| |
| # TODO(rudominer) Remove legacy_project_context, client_config, and |
| # cobalt_registry_proto from public_deps after Fuchsia code switches |
| # to ProjectContextFactory |
| ":legacy_project_context", |
| "//src/lib/fxl", |
| "//third_party/cobalt:cobalt_proto", |
| "//third_party/cobalt/config:client_config", |
| "//third_party/cobalt/config:cobalt_registry_proto", |
| "//third_party/cobalt/shuffler:shuffler_service", |
| "//third_party/cobalt/third_party/clearcut:clearcut", |
| "//third_party/cobalt/util:clock", |
| "//third_party/cobalt/util:encrypted_message_util", |
| "//third_party/grpc:grpc++", |
| ] |
| } |
| |
| proto_library("file_observation_store_internal_proto") { |
| sources = [ |
| "file_observation_store_internal.proto", |
| ] |
| extra_configs = [ "//third_party/cobalt:cobalt_config" ] |
| import_dirs = [ |
| "//third_party/protobuf/src", |
| "//third_party/cobalt", |
| ] |
| cc_generator_options = "lite" |
| generate_python = false |
| deps = [ |
| "//third_party/cobalt:cobalt_proto", |
| ] |
| } |
| |
| static_library("client_secret") { |
| sources = [ |
| "client_secret.cc", |
| "client_secret.h", |
| ] |
| configs += [ "//third_party/cobalt:cobalt_config" ] |
| |
| deps = [ |
| "//third_party/cobalt/util/crypto_util", |
| ] |
| } |
| |
| # Generate encoder_test_config.h from encoder_test_config.yaml. |
| cobalt_config_header("generate_encoder_test_config") { |
| input_yaml = "encoder_test_config.yaml" |
| output_file = "encoder_test_config.h" |
| } |
| |
| # Generate envelope_maker_test_config.h from envelope_maker_test_config.yaml. |
| cobalt_config_header("generate_envelope_maker_test_config") { |
| input_yaml = "envelope_maker_test_config.yaml" |
| output_file = "envelope_maker_test_config.h" |
| } |
| |
| # Generate shipping_manager_test_config.h from |
| # shipping_manager_test_config.yaml. |
| cobalt_config_header("generate_shipping_manager_test_config") { |
| input_yaml = "shipping_manager_test_config.yaml" |
| output_file = "shipping_manager_test_config.h" |
| } |
| |
| source_set("unittests") { |
| testonly = true |
| |
| sources = [ |
| "client_secret_test.cc", |
| "encoder_test.cc", |
| "encoder_test_config.h", |
| "envelope_maker_test.cc", |
| "envelope_maker_test_config.h", |
| "send_retryer_test.cc", |
| "shipping_manager_test.cc", |
| "shipping_manager_test_config.h", |
| "shuffler_client_test.cc", |
| "system_data_test.cc", |
| ] |
| |
| deps = [ |
| ":encoder", |
| ":generate_encoder_test_config", |
| ":generate_envelope_maker_test_config", |
| ":generate_shipping_manager_test_config", |
| ":legacy_project_context", |
| "//garnet/public/lib/syslog/cpp", |
| "//third_party/abseil-cpp", |
| "//third_party/gflags", |
| "//third_party/googletest:gtest_main", |
| ] |
| |
| configs += [ "//third_party/cobalt:cobalt_config" ] |
| } |