# Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. # SPDX-License-Identifier: Apache-2.0 load("//bazel_tools:scala.bzl", "da_scala_binary", "da_scala_library", "da_scala_test_suite") da_scala_library( name = "rs-grpc-akka", srcs = glob(["src/main/scala/**/*.scala"]), scala_deps = [ "@maven//:com_typesafe_akka_akka_actor", "@maven//:com_typesafe_akka_akka_stream", ], tags = ["maven_coordinates=com.daml:rs-grpc-akka:__VERSION__"], visibility = [ "//visibility:public", ], deps = [ "//ledger-api/rs-grpc-bridge", "//libs-scala/concurrent", "@maven//:io_grpc_grpc_stub", "@maven//:org_reactivestreams_reactive_streams", ], ) da_scala_library( name = "rs-grpc-akka-tests-lib", srcs = glob( ["src/test/**/*.scala"], exclude = [ "src/test/**/*Spec.scala", "src/test/**/*Test.scala", ], ), scala_deps = [ "@maven//:com_thesamet_scalapb_lenses", "@maven//:com_thesamet_scalapb_scalapb_runtime", "@maven//:com_thesamet_scalapb_scalapb_runtime_grpc", "@maven//:com_typesafe_akka_akka_actor", "@maven//:com_typesafe_akka_akka_stream", "@maven//:org_scalactic_scalactic", "@maven//:org_scalatest_scalatest", ], visibility = [ "//:__subpackages__", ], runtime_deps = [ "@maven//:ch_qos_logback_logback_classic", "@maven//:io_grpc_grpc_netty", ], deps = [ ":rs-grpc-akka", "//ledger-api/rs-grpc-bridge", "//ledger-api/rs-grpc-bridge:rs-grpc-bridge-test-lib", "//ledger-api/sample-service", "//ledger-api/testing-utils", "@maven//:com_google_protobuf_protobuf_java", "@maven//:io_grpc_grpc_api", "@maven//:io_grpc_grpc_stub", "@maven//:org_awaitility_awaitility", ], ) da_scala_test_suite( name = "rs-grpc-akka-tests", srcs = glob([ "src/test/**/*Spec.scala", "src/test/**/*Test.scala", ]), scala_deps = [ "@maven//:com_thesamet_scalapb_lenses", "@maven//:com_thesamet_scalapb_scalapb_runtime_grpc", "@maven//:com_typesafe_akka_akka_actor", "@maven//:com_typesafe_akka_akka_stream", "@maven//:org_scalactic_scalactic", "@maven//:org_scalatest_scalatest", ], deps = [ ":rs-grpc-akka-tests-lib", "//ledger-api/rs-grpc-bridge", "//ledger-api/sample-service", "//ledger-api/testing-utils", "@maven//:com_google_protobuf_protobuf_java", "@maven//:io_grpc_grpc_api", "@maven//:io_grpc_grpc_stub", ], ) da_scala_binary( name = "rs-grpc-akka-perf", srcs = glob(["src/perf/**/*.scala"]), main_class = "com.daml.grpc.adapter.ServerStreamingBenchmark", scala_deps = [ "@maven//:com_storm_enroute_scalameter", "@maven//:com_storm_enroute_scalameter_core", "@maven//:com_thesamet_scalapb_lenses", "@maven//:com_thesamet_scalapb_scalapb_runtime", "@maven//:com_thesamet_scalapb_scalapb_runtime_grpc", "@maven//:com_typesafe_akka_akka_actor", "@maven//:com_typesafe_akka_akka_stream", ], deps = [ ":rs-grpc-akka", ":rs-grpc-akka-tests-lib", "//ledger-api/perf-testing", "//ledger-api/rs-grpc-bridge", "//ledger-api/sample-service", "//ledger-api/testing-utils", "@maven//:com_google_protobuf_protobuf_java", "@maven//:io_grpc_grpc_api", "@maven//:io_grpc_grpc_stub", ], )