2021-01-01 21:49:51 +03:00
|
|
|
# Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
2019-04-04 11:33:38 +03:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
load(
|
2019-04-12 14:10:16 +03:00
|
|
|
"//bazel_tools:scala.bzl",
|
|
|
|
"da_scala_library",
|
|
|
|
"da_scala_test_suite",
|
2021-01-08 09:22:38 +03:00
|
|
|
"silencer_plugin",
|
2019-04-04 11:33:38 +03:00
|
|
|
)
|
2021-01-13 13:35:46 +03:00
|
|
|
load("@scala_version//:index.bzl", "scala_major_version")
|
2019-04-04 11:33:38 +03:00
|
|
|
|
|
|
|
da_scala_library(
|
2019-04-12 14:10:16 +03:00
|
|
|
name = "ledger-api-client",
|
|
|
|
srcs = glob(["src/main/scala/**/*.scala"]),
|
2021-01-08 09:22:38 +03:00
|
|
|
plugins = [
|
|
|
|
silencer_plugin,
|
|
|
|
],
|
|
|
|
scala_deps = [
|
|
|
|
"@maven//:org_scala_lang_modules_scala_collection_compat",
|
|
|
|
"@maven//:com_typesafe_akka_akka_actor",
|
|
|
|
"@maven//:com_typesafe_akka_akka_stream",
|
|
|
|
],
|
2020-04-01 12:41:18 +03:00
|
|
|
tags = ["maven_coordinates=com.daml:ledger-api-client:__VERSION__"],
|
2019-04-12 14:10:16 +03:00
|
|
|
visibility = [
|
|
|
|
"//visibility:public",
|
|
|
|
],
|
|
|
|
deps = [
|
2019-06-11 09:08:55 +03:00
|
|
|
"//daml-lf/data",
|
2019-04-12 14:10:16 +03:00
|
|
|
"//language-support/scala/bindings",
|
|
|
|
"//ledger-api/rs-grpc-akka",
|
|
|
|
"//ledger-api/rs-grpc-bridge",
|
2019-11-26 21:51:09 +03:00
|
|
|
"//ledger/ledger-api-auth-client",
|
2020-12-07 18:17:05 +03:00
|
|
|
"//ledger/ledger-api-common",
|
2019-05-24 20:18:51 +03:00
|
|
|
"//ledger/ledger-api-domain",
|
2020-10-20 12:26:28 +03:00
|
|
|
"//ledger/ledger-resources",
|
2021-06-01 14:31:58 +03:00
|
|
|
"//ledger/metrics",
|
2020-09-29 20:23:57 +03:00
|
|
|
"//libs-scala/concurrent",
|
2019-11-19 19:12:25 +03:00
|
|
|
"//libs-scala/grpc-utils",
|
2020-07-21 18:50:33 +03:00
|
|
|
"//libs-scala/ports",
|
|
|
|
"//libs-scala/resources",
|
2020-10-07 14:54:23 +03:00
|
|
|
"@maven//:io_dropwizard_metrics_metrics_core",
|
2019-10-28 15:53:14 +03:00
|
|
|
"@maven//:io_grpc_grpc_netty",
|
|
|
|
"@maven//:io_netty_netty_handler",
|
|
|
|
"@maven//:org_slf4j_slf4j_api",
|
2019-04-12 14:10:16 +03:00
|
|
|
],
|
2019-04-04 11:33:38 +03:00
|
|
|
)
|
|
|
|
|
2021-01-13 13:35:46 +03:00
|
|
|
da_scala_library(
|
|
|
|
name = "ledger-api-client-tests-lib",
|
|
|
|
srcs = glob(["src/test/{}/**/*.scala".format(scala_major_version)]),
|
|
|
|
versioned_scala_deps = {
|
|
|
|
"2.12": [
|
|
|
|
"@maven//:org_scalatest_scalatest",
|
|
|
|
"@maven//:org_scalactic_scalactic",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
deps = [
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-04-04 11:33:38 +03:00
|
|
|
da_scala_test_suite(
|
2019-04-12 14:10:16 +03:00
|
|
|
name = "ledger-api-client-tests",
|
|
|
|
srcs = glob(["src/test/suite/**/*.scala"]),
|
2021-04-26 22:46:14 +03:00
|
|
|
plugins = [
|
|
|
|
silencer_plugin,
|
|
|
|
],
|
2021-01-13 13:35:46 +03:00
|
|
|
scala_deps = [
|
|
|
|
"@maven//:com_typesafe_akka_akka_actor",
|
|
|
|
"@maven//:com_typesafe_akka_akka_stream",
|
|
|
|
"@maven//:com_typesafe_akka_akka_stream_testkit",
|
2021-06-01 14:31:58 +03:00
|
|
|
"@maven//:org_mockito_mockito_scala",
|
2021-01-13 13:35:46 +03:00
|
|
|
"@maven//:org_scalatest_scalatest",
|
|
|
|
],
|
|
|
|
scalacopts = [
|
|
|
|
"-P:silencer:lineContentFilters=import Compat._",
|
|
|
|
],
|
2019-04-04 11:33:38 +03:00
|
|
|
deps = [
|
2019-04-12 14:10:16 +03:00
|
|
|
":ledger-api-client",
|
2021-01-13 13:35:46 +03:00
|
|
|
":ledger-api-client-tests-lib",
|
2019-04-12 14:10:16 +03:00
|
|
|
"//language-support/scala/bindings",
|
|
|
|
"//ledger-api/rs-grpc-bridge",
|
|
|
|
"//ledger-api/testing-utils",
|
2020-05-26 11:33:53 +03:00
|
|
|
"//ledger/caching",
|
2021-06-01 14:31:58 +03:00
|
|
|
"//ledger/metrics",
|
2020-09-29 20:23:57 +03:00
|
|
|
"//libs-scala/concurrent",
|
2020-10-07 14:54:23 +03:00
|
|
|
"@maven//:io_dropwizard_metrics_metrics_core",
|
2021-06-01 14:31:58 +03:00
|
|
|
"@maven//:org_mockito_mockito_core",
|
2019-10-28 15:53:14 +03:00
|
|
|
"@maven//:org_reactivestreams_reactive_streams",
|
2019-04-12 14:10:16 +03:00
|
|
|
],
|
2019-04-04 11:33:38 +03:00
|
|
|
)
|
2019-12-17 18:11:27 +03:00
|
|
|
|
|
|
|
da_scala_test_suite(
|
|
|
|
name = "ledger-api-client-integration-tests",
|
|
|
|
srcs = glob(["src/it/**/*.scala"]),
|
|
|
|
data = [
|
2021-02-22 13:41:19 +03:00
|
|
|
"//ledger/test-common:dar-files",
|
2019-12-17 18:11:27 +03:00
|
|
|
],
|
|
|
|
resources = [
|
|
|
|
"src/it/resources/logback-test.xml",
|
|
|
|
],
|
2021-01-13 13:35:46 +03:00
|
|
|
scala_deps = [
|
|
|
|
"@maven//:com_typesafe_akka_akka_actor",
|
|
|
|
"@maven//:com_typesafe_akka_akka_stream",
|
|
|
|
],
|
2019-12-17 18:11:27 +03:00
|
|
|
deps = [
|
|
|
|
":ledger-api-client",
|
|
|
|
"//language-support/scala/bindings",
|
|
|
|
"//ledger-api/rs-grpc-bridge",
|
|
|
|
"//ledger-api/testing-utils",
|
2020-05-26 11:33:53 +03:00
|
|
|
"//ledger/caching",
|
2020-08-20 18:00:32 +03:00
|
|
|
"//ledger/ledger-api-auth",
|
2019-12-17 18:11:27 +03:00
|
|
|
"//ledger/ledger-api-common",
|
|
|
|
"//ledger/ledger-api-domain",
|
2020-10-20 12:26:28 +03:00
|
|
|
"//ledger/ledger-resources",
|
2021-06-01 14:31:58 +03:00
|
|
|
"//ledger/metrics",
|
2020-07-17 18:06:06 +03:00
|
|
|
"//ledger/participant-integration-api",
|
2019-12-17 18:11:27 +03:00
|
|
|
"//ledger/participant-state",
|
|
|
|
"//ledger/sandbox",
|
|
|
|
"//ledger/sandbox:sandbox-scala-tests-lib",
|
2020-07-17 18:06:06 +03:00
|
|
|
"//ledger/sandbox-classic",
|
|
|
|
"//ledger/sandbox-classic:sandbox-classic-scala-tests-lib",
|
|
|
|
"//ledger/sandbox-common",
|
|
|
|
"//ledger/sandbox-common:sandbox-common-scala-tests-lib",
|
2019-12-17 18:11:27 +03:00
|
|
|
"//ledger/test-common",
|
2020-09-29 20:23:57 +03:00
|
|
|
"//libs-scala/concurrent",
|
2020-08-20 18:00:32 +03:00
|
|
|
"//libs-scala/grpc-utils",
|
2020-03-03 11:59:15 +03:00
|
|
|
"//libs-scala/ports",
|
2020-02-14 16:52:45 +03:00
|
|
|
"//libs-scala/resources",
|
2019-12-17 18:11:27 +03:00
|
|
|
"@maven//:ch_qos_logback_logback_classic",
|
2020-11-25 16:28:32 +03:00
|
|
|
"@maven//:io_netty_netty_handler",
|
2019-12-17 18:11:27 +03:00
|
|
|
],
|
|
|
|
)
|