mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
d2e2c21684
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
72 lines
2.2 KiB
Python
72 lines
2.2 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_library")
|
|
load("//bazel_tools:proto.bzl", "proto_gen")
|
|
load("@io_bazel_rules_scala//scala:scala.bzl", "scala_library")
|
|
load("@scala_version//:index.bzl", "scala_major_version_suffix")
|
|
|
|
proto_library(
|
|
name = "sample-service-proto",
|
|
srcs = ["src/main/protobuf/hello.proto"],
|
|
)
|
|
|
|
proto_gen(
|
|
name = "sample-service-scalapb-sources",
|
|
srcs = [":sample-service-proto"],
|
|
plugin_exec = "//scala-protoc-plugins/scalapb:protoc-gen-scalapb",
|
|
plugin_name = "scalapb",
|
|
plugin_options = ["grpc"],
|
|
visibility = [
|
|
"//visibility:public",
|
|
],
|
|
)
|
|
|
|
scala_library(
|
|
name = "sample-service-scalapb",
|
|
srcs = [":sample-service-scalapb-sources"],
|
|
unused_dependency_checker_mode = "error",
|
|
deps = [
|
|
"@maven//:com_google_protobuf_protobuf_java",
|
|
"@maven//:io_grpc_grpc_api",
|
|
"@maven//:io_grpc_grpc_protobuf",
|
|
"@maven//:io_grpc_grpc_stub",
|
|
] + [
|
|
"{}_{}".format(dep, scala_major_version_suffix)
|
|
for dep in [
|
|
"@maven//:com_thesamet_scalapb_lenses",
|
|
"@maven//:com_thesamet_scalapb_scalapb_runtime",
|
|
"@maven//:com_thesamet_scalapb_scalapb_runtime_grpc",
|
|
]
|
|
],
|
|
)
|
|
|
|
da_scala_library(
|
|
name = "sample-service",
|
|
srcs = glob(["src/**/*.scala"]),
|
|
scala_deps = [
|
|
"@maven//:com_thesamet_scalapb_lenses",
|
|
"@maven//:com_thesamet_scalapb_scalapb_runtime",
|
|
"@maven//:com_thesamet_scalapb_scalapb_runtime_grpc",
|
|
"@maven//:org_scalactic_scalactic",
|
|
"@maven//:org_scalatest_scalatest_core",
|
|
"@maven//:org_scalatest_scalatest_matchers_core",
|
|
"@maven//:org_scalatest_scalatest_shouldmatchers",
|
|
"@maven//:org_scalatest_scalatest_wordspec",
|
|
],
|
|
visibility = [
|
|
"//visibility:public",
|
|
],
|
|
exports = [
|
|
":sample-service-scalapb",
|
|
],
|
|
deps = [
|
|
":sample-service-scalapb",
|
|
"//ledger-api/testing-utils",
|
|
"@maven//:com_google_protobuf_protobuf_java",
|
|
"@maven//:io_grpc_grpc_api",
|
|
"@maven//:io_grpc_grpc_stub",
|
|
"@maven//:org_scalatest_scalatest_compatible",
|
|
],
|
|
)
|