2021-01-01 21:49:51 +03:00
|
|
|
# Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
2020-07-30 20:51:07 +03:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
load(
|
|
|
|
"//bazel_tools:scala.bzl",
|
|
|
|
"da_scala_library",
|
|
|
|
"da_scala_test",
|
|
|
|
"lf_scalacopts",
|
2021-09-28 23:47:42 +03:00
|
|
|
"silencer_plugin",
|
2020-07-30 20:51:07 +03:00
|
|
|
)
|
2021-02-22 16:54:26 +03:00
|
|
|
load("@scala_version//:index.bzl", "scala_major_version", "scala_version_suffix")
|
2020-07-30 20:51:07 +03:00
|
|
|
|
|
|
|
scalacopts = lf_scalacopts + [
|
|
|
|
"-P:wartremover:traverser:org.wartremover.warts.NonUnitStatements",
|
|
|
|
]
|
|
|
|
|
|
|
|
da_scala_library(
|
|
|
|
name = "scala-utils",
|
2021-02-22 16:54:26 +03:00
|
|
|
srcs = glob(["src/main/scala/**/*.scala"]) + glob([
|
|
|
|
"src/main/{}/**/*.scala".format(scala_major_version),
|
|
|
|
]),
|
|
|
|
plugins = [
|
|
|
|
"@maven//:org_typelevel_kind_projector_{}".format(scala_version_suffix),
|
2021-09-28 23:47:42 +03:00
|
|
|
silencer_plugin,
|
2021-02-22 16:54:26 +03:00
|
|
|
],
|
|
|
|
scala_deps = [
|
2021-09-28 23:47:42 +03:00
|
|
|
"@maven//:org_scala_lang_modules_scala_collection_compat",
|
2021-02-22 16:54:26 +03:00
|
|
|
"@maven//:org_scalaz_scalaz_core",
|
|
|
|
],
|
2020-07-30 20:51:07 +03:00
|
|
|
scalacopts = scalacopts,
|
|
|
|
tags = ["maven_coordinates=com.daml:scala-utils:__VERSION__"],
|
|
|
|
visibility = [
|
|
|
|
"//visibility:public",
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
da_scala_test(
|
|
|
|
name = "test",
|
|
|
|
srcs = glob(["src/test/scala/**/*.scala"]),
|
2021-02-22 16:54:26 +03:00
|
|
|
plugins = [
|
|
|
|
"@maven//:org_typelevel_kind_projector_{}".format(scala_version_suffix),
|
|
|
|
],
|
2020-12-14 20:36:53 +03:00
|
|
|
scala_deps = [
|
2021-02-22 16:54:26 +03:00
|
|
|
"@maven//:com_chuusai_shapeless",
|
2020-12-14 20:36:53 +03:00
|
|
|
"@maven//:org_scalaz_scalaz_core",
|
|
|
|
],
|
2020-07-30 20:51:07 +03:00
|
|
|
scalacopts = scalacopts,
|
|
|
|
deps = [
|
|
|
|
":scala-utils",
|
|
|
|
"//libs-scala/scalatest-utils",
|
|
|
|
],
|
|
|
|
)
|