2020-03-27 03:26:10 +03:00
|
|
|
# Copyright (c) 2020 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_binary",
|
|
|
|
"da_scala_library",
|
|
|
|
"da_scala_test_suite",
|
2019-04-04 11:33:38 +03:00
|
|
|
)
|
|
|
|
|
2019-07-16 17:53:17 +03:00
|
|
|
navigator_scalacopts = [
|
2019-04-12 14:10:16 +03:00
|
|
|
"-Xelide-below",
|
|
|
|
"CONFIG",
|
2019-04-04 11:33:38 +03:00
|
|
|
]
|
|
|
|
|
2019-12-12 16:02:23 +03:00
|
|
|
# All frontend resource files.
|
|
|
|
# These come in a manually created JAR file, this rule is just wrapping it in
|
2019-04-04 11:33:38 +03:00
|
|
|
# a java_import, so that it is a valid target for the 'resources' property of
|
|
|
|
# scala_binary.
|
|
|
|
java_import(
|
2019-04-12 14:10:16 +03:00
|
|
|
name = "frontend-resources",
|
|
|
|
jars = [
|
|
|
|
"//navigator/frontend:frontend.jar",
|
|
|
|
],
|
2019-11-29 16:26:47 +03:00
|
|
|
visibility = ["//visibility:public"],
|
2019-04-04 11:33:38 +03:00
|
|
|
)
|
|
|
|
|
2019-12-12 16:02:23 +03:00
|
|
|
# Static backend resources.
|
2019-04-04 11:33:38 +03:00
|
|
|
java_library(
|
2019-04-12 14:10:16 +03:00
|
|
|
name = "backend-resources",
|
|
|
|
resources = glob(["src/main/resources/**/*"]),
|
2019-11-29 16:26:47 +03:00
|
|
|
visibility = ["//visibility:public"],
|
2019-04-04 11:33:38 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
da_scala_library(
|
2019-04-12 14:10:16 +03:00
|
|
|
name = "navigator-library",
|
|
|
|
srcs = glob([
|
2020-04-05 20:49:57 +03:00
|
|
|
"src/main/scala/**/*.scala",
|
2019-04-12 14:10:16 +03:00
|
|
|
]),
|
2019-07-16 17:53:17 +03:00
|
|
|
scalacopts = navigator_scalacopts,
|
2019-11-29 16:26:47 +03:00
|
|
|
visibility = ["//visibility:public"],
|
2020-01-06 20:14:21 +03:00
|
|
|
runtime_deps = [
|
|
|
|
"@maven//:ch_qos_logback_logback_classic",
|
2020-01-20 00:16:06 +03:00
|
|
|
"@maven//:com_typesafe_akka_akka_slf4j_2_12",
|
2020-01-06 20:14:21 +03:00
|
|
|
"@maven//:org_xerial_sqlite_jdbc",
|
|
|
|
],
|
2020-01-06 15:58:56 +03:00
|
|
|
deps = [
|
|
|
|
"//daml-assistant/scala-daml-project-config",
|
|
|
|
"//daml-lf/archive:daml_lf_archive_reader",
|
|
|
|
"//daml-lf/archive:daml_lf_dev_archive_java_proto",
|
|
|
|
"//daml-lf/data",
|
|
|
|
"//daml-lf/interface",
|
|
|
|
"//daml-lf/language",
|
|
|
|
"//daml-lf/transaction",
|
|
|
|
"//language-support/scala/bindings",
|
|
|
|
"//ledger-api/rs-grpc-akka",
|
|
|
|
"//ledger-api/rs-grpc-bridge",
|
|
|
|
"//ledger-service/lf-value-json",
|
|
|
|
"//ledger/ledger-api-client",
|
|
|
|
"//ledger/ledger-api-common",
|
|
|
|
"//ledger/ledger-api-domain",
|
2020-03-16 11:04:00 +03:00
|
|
|
"//libs-scala/build-info",
|
2020-01-06 15:58:56 +03:00
|
|
|
"//libs-scala/grpc-utils",
|
|
|
|
"@maven//:com_chuusai_shapeless_2_12",
|
|
|
|
"@maven//:com_github_pureconfig_pureconfig_2_12",
|
|
|
|
"@maven//:com_github_scopt_scopt_2_12",
|
|
|
|
"@maven//:com_lihaoyi_sourcecode_2_12",
|
|
|
|
"@maven//:com_typesafe_akka_akka_actor_2_12",
|
|
|
|
"@maven//:com_typesafe_akka_akka_http_2_12",
|
|
|
|
"@maven//:com_typesafe_akka_akka_http_core_2_12",
|
|
|
|
"@maven//:com_typesafe_akka_akka_http_spray_json_2_12",
|
|
|
|
"@maven//:com_typesafe_akka_akka_stream_2_12",
|
|
|
|
"@maven//:com_typesafe_config",
|
|
|
|
"@maven//:com_typesafe_scala_logging_scala_logging_2_12",
|
|
|
|
"@maven//:io_grpc_grpc_netty",
|
|
|
|
"@maven//:io_netty_netty_handler",
|
|
|
|
"@maven//:io_spray_spray_json_2_12",
|
|
|
|
"@maven//:org_gnieh_diffson_core_2_12",
|
|
|
|
"@maven//:org_gnieh_diffson_spray_json_2_12",
|
|
|
|
"@maven//:org_jline_jline",
|
|
|
|
"@maven//:org_sangria_graphql_sangria_2_12",
|
|
|
|
"@maven//:org_sangria_graphql_sangria_marshalling_api_2_12",
|
|
|
|
"@maven//:org_scalaz_scalaz_core_2_12",
|
|
|
|
"@maven//:org_slf4j_slf4j_api",
|
|
|
|
"@maven//:org_tpolecat_doobie_core_2_12",
|
|
|
|
"@maven//:org_tpolecat_doobie_free_2_12",
|
|
|
|
"@maven//:org_typelevel_cats_core_2_12",
|
|
|
|
"@maven//:org_typelevel_cats_effect_2_12",
|
|
|
|
"@maven//:org_typelevel_cats_free_2_12",
|
|
|
|
"@maven//:org_typelevel_cats_kernel_2_12",
|
|
|
|
],
|
2019-04-04 11:33:38 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
da_scala_library(
|
2019-04-12 14:10:16 +03:00
|
|
|
name = "navigator-tests-library",
|
|
|
|
srcs = glob(
|
|
|
|
["src/test/**/*.scala"],
|
|
|
|
exclude = [
|
|
|
|
"src/test/**/*Spec.scala",
|
|
|
|
"src/test/**/*Test.scala",
|
|
|
|
],
|
|
|
|
),
|
2019-07-16 17:53:17 +03:00
|
|
|
scalacopts = navigator_scalacopts,
|
2020-01-06 20:14:21 +03:00
|
|
|
runtime_deps = [
|
|
|
|
"@maven//:ch_qos_logback_logback_classic",
|
|
|
|
"@maven//:com_typesafe_akka_akka_stream_testkit_2_12",
|
|
|
|
"@maven//:io_grpc_grpc_netty",
|
|
|
|
"@maven//:org_xerial_sqlite_jdbc",
|
|
|
|
],
|
2019-12-30 16:49:59 +03:00
|
|
|
deps = [
|
|
|
|
":navigator-library",
|
|
|
|
"//daml-lf/data",
|
|
|
|
"//daml-lf/interface",
|
|
|
|
"//daml-lf/transaction",
|
|
|
|
"//language-support/scala/bindings",
|
|
|
|
"//ledger-service/lf-value-json",
|
|
|
|
"//ledger/ledger-api-common",
|
|
|
|
"@maven//:org_scalaz_scalaz_core_2_12",
|
|
|
|
],
|
2019-04-04 11:33:38 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
da_scala_binary(
|
2019-04-12 14:10:16 +03:00
|
|
|
name = "navigator-binary",
|
2020-04-05 20:49:57 +03:00
|
|
|
main_class = "com.daml.navigator.NavigatorBackend",
|
2019-04-12 19:30:49 +03:00
|
|
|
tags = [
|
2020-04-01 12:41:18 +03:00
|
|
|
"maven_coordinates=com.daml:navigator:__VERSION__",
|
2019-04-12 19:30:49 +03:00
|
|
|
"no_scala_version_suffix",
|
|
|
|
],
|
2019-04-12 14:10:16 +03:00
|
|
|
visibility = [
|
|
|
|
"//visibility:public",
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":backend-resources",
|
|
|
|
":frontend-resources",
|
|
|
|
":navigator-library",
|
|
|
|
],
|
2019-04-04 11:33:38 +03:00
|
|
|
)
|
|
|
|
|
2019-12-12 16:02:23 +03:00
|
|
|
# Static test resources.
|
2019-04-04 11:33:38 +03:00
|
|
|
java_library(
|
2019-04-12 14:10:16 +03:00
|
|
|
name = "test-resources",
|
|
|
|
resources = glob(["src/test/resources/**/*"]),
|
2019-04-04 11:33:38 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
da_scala_test_suite(
|
2019-04-12 14:10:16 +03:00
|
|
|
name = "navigator-scala-tests",
|
|
|
|
size = "small",
|
|
|
|
srcs = glob([
|
|
|
|
"src/test/**/*Spec.scala",
|
|
|
|
"src/test/**/*Test.scala",
|
|
|
|
]),
|
2019-07-16 17:53:17 +03:00
|
|
|
scalacopts = navigator_scalacopts,
|
2019-04-12 14:10:16 +03:00
|
|
|
deps = [
|
2019-12-30 16:49:59 +03:00
|
|
|
":navigator-library",
|
2019-04-12 14:10:16 +03:00
|
|
|
":navigator-tests-library",
|
|
|
|
":test-resources",
|
2019-12-30 16:49:59 +03:00
|
|
|
"//daml-lf/data",
|
|
|
|
"//daml-lf/interface",
|
|
|
|
"//daml-lf/transaction",
|
|
|
|
"//language-support/scala/bindings",
|
|
|
|
"//ledger-service/lf-value-json",
|
|
|
|
"//ledger/ledger-api-common",
|
2020-03-16 11:04:00 +03:00
|
|
|
"//libs-scala/build-info",
|
2019-12-30 16:49:59 +03:00
|
|
|
"@maven//:com_typesafe_akka_akka_actor_2_12",
|
|
|
|
"@maven//:com_typesafe_akka_akka_http_2_12",
|
|
|
|
"@maven//:com_typesafe_akka_akka_http_core_2_12",
|
|
|
|
"@maven//:com_typesafe_akka_akka_http_spray_json_2_12",
|
|
|
|
"@maven//:com_typesafe_akka_akka_http_testkit_2_12",
|
|
|
|
"@maven//:com_typesafe_akka_akka_stream_2_12",
|
|
|
|
"@maven//:com_typesafe_config",
|
|
|
|
"@maven//:com_typesafe_scala_logging_scala_logging_2_12",
|
|
|
|
"@maven//:io_spray_spray_json_2_12",
|
|
|
|
"@maven//:org_sangria_graphql_sangria_2_12",
|
|
|
|
"@maven//:org_sangria_graphql_sangria_marshalling_api_2_12",
|
|
|
|
"@maven//:org_scalacheck_scalacheck_2_12",
|
|
|
|
"@maven//:org_scalatest_scalatest_2_12",
|
|
|
|
"@maven//:org_scalaz_scalaz_core_2_12",
|
|
|
|
],
|
2019-04-04 11:33:38 +03:00
|
|
|
)
|
2019-12-12 16:02:23 +03:00
|
|
|
|
|
|
|
exports_files(["src/main/resources/logback.xml"])
|