# Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. # SPDX-License-Identifier: Apache-2.0 load( "//bazel_tools:scala.bzl", "da_scala_library", "da_scala_test", "lf_scalacopts", ) da_scala_library( name = "db-backend", srcs = glob(["src/main/scala/**/*.scala"]), scala_deps = [ "@maven//:com_chuusai_shapeless", "@maven//:io_spray_spray_json", "@maven//:org_scalaz_scalaz_core", "@maven//:org_tpolecat_doobie_core", "@maven//:org_tpolecat_doobie_free", "@maven//:org_typelevel_cats_core", "@maven//:org_typelevel_cats_effect", "@maven//:org_typelevel_cats_free", "@maven//:org_typelevel_cats_kernel", "@maven//:org_tpolecat_typename", ], scala_runtime_deps = [ "@maven//:org_tpolecat_doobie_postgres", ], scalacopts = lf_scalacopts, tags = ["maven_coordinates=com.daml:http-json-db-backend:__VERSION__"], visibility = [ "//visibility:public", ], runtime_deps = [ "@maven//:ch_qos_logback_logback_classic", ], deps = [ "//daml-lf/data", "//daml-lf/transaction", "//ledger-service/utils", "//ledger/caching", "//ledger/metrics", "//libs-scala/contextualized-logging", "//libs-scala/nonempty", "@maven//:io_dropwizard_metrics_metrics_core", ], ) da_scala_test( name = "tests", size = "medium", srcs = glob(["src/test/scala/**/*.scala"]), scala_deps = [ "@maven//:com_chuusai_shapeless", "@maven//:org_scalatest_scalatest_core", "@maven//:org_scalatest_scalatest_matchers_core", "@maven//:org_scalatest_scalatest_shouldmatchers", "@maven//:org_scalatest_scalatest_wordspec", "@maven//:org_scalaz_scalaz_core", "@maven//:org_tpolecat_doobie_core", "@maven//:org_tpolecat_doobie_free", "@maven//:org_typelevel_cats_core", "@maven//:org_typelevel_cats_effect", "@maven//:org_typelevel_cats_free", "@maven//:org_typelevel_cats_kernel", ], scalacopts = lf_scalacopts, # data = ["//docs:quickstart-model.dar"], deps = [ ":db-backend", ], )