daml/daml-assistant/daml-sdk/BUILD.bazel
Gary Verhaegen d2e2c21684
update copyright headers (#12240)
New year, new copyright, new expected unknown issues with various files
that won't be covered by the script and/or will be but shouldn't change.

I'll do the details on Jan 1, but would appreciate this being
preapproved so I can actually get it merged by then.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-03 16:36:51 +00:00

80 lines
2.3 KiB
Python

# 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_binary",
"da_scala_library",
)
load("@os_info//:os_info.bzl", "is_windows")
load(":util.bzl", "deps")
scala_deps = [
"@maven//:com_typesafe_akka_akka_http_spray_json",
"@maven//:com_typesafe_scala_logging_scala_logging",
"@maven//:io_spray_spray_json",
]
scala_runtime_deps = [
"@maven//:com_typesafe_akka_akka_slf4j",
"@maven//:org_tpolecat_doobie_postgres",
]
runtime_deps = [
"@maven//:ch_qos_logback_logback_classic",
"@maven//:ch_qos_logback_logback_core",
"@maven//:io_grpc_grpc_netty",
"@maven//:org_xerial_sqlite_jdbc",
]
da_scala_binary(
name = "sdk",
srcs = glob(["src/main/scala/**/*.scala"]),
main_class = "com.daml.sdk.SdkMain",
resources = glob(["src/main/resources/**/*"]),
scala_deps = scala_deps,
scala_runtime_deps = scala_runtime_deps,
# Navigator resources trigger this incorrectly
unused_dependency_checker_mode = "off",
visibility = ["//visibility:public"],
runtime_deps = runtime_deps,
deps = deps("ce"),
)
da_scala_binary(
name = "sdk_ee",
srcs = glob(["src/main/scala/**/*.scala"]),
main_class = "com.daml.sdk.SdkMain",
resources = glob(["src/main/resources/**/*"]),
scala_deps = scala_deps,
scala_runtime_deps = scala_runtime_deps,
# Navigator resources trigger this incorrectly
unused_dependency_checker_mode = "off",
visibility = ["//visibility:public"],
runtime_deps = runtime_deps + [
"@maven//:com_oracle_database_jdbc_ojdbc8",
],
deps = deps("ee"),
)
# This is deliberately an sh_test on the actual SDK jars to test
# that the class paths end up being resolved properly and we really
# have the EE artifacts when we want to and only then.
sh_test(
name = "validate",
srcs = ["validate.sh"],
args = [
"$(location @local_jdk//:bin/java.exe)" if is_windows else "$(location @local_jdk//:bin/java)",
"$(location :sdk_deploy.jar)",
"$(location :sdk_ee_deploy.jar)",
],
data = [
":sdk_deploy.jar",
":sdk_ee_deploy.jar",
"@local_jdk//:bin/java.exe" if is_windows else "@local_jdk//:bin/java",
],
deps = [
"@bazel_tools//tools/bash/runfiles",
],
)