2019-04-04 11:33:38 +03:00
|
|
|
# Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
|
|
# 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
|
|
|
)
|
|
|
|
load(
|
2019-04-12 14:10:16 +03:00
|
|
|
"//rules_daml:daml.bzl",
|
|
|
|
"daml_compile",
|
2019-04-04 11:33:38 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
compileDependencies = [
|
2019-04-12 14:10:16 +03:00
|
|
|
# this has to come first other as somehow a different instance of grpc-core.jar
|
|
|
|
"//3rdparty/jvm/io/grpc:grpc_services",
|
|
|
|
"//daml-lf/archive:daml_lf_java_proto",
|
|
|
|
"//daml-lf/archive:daml_lf_archive_scala",
|
|
|
|
"//daml-lf/data",
|
|
|
|
"//daml-lf/interface",
|
|
|
|
"//ledger-api/rs-grpc-bridge",
|
|
|
|
"//ledger-api/rs-grpc-akka",
|
|
|
|
"//language-support/scala/bindings",
|
|
|
|
"//ledger/ledger-api-client",
|
|
|
|
"//3rdparty/jvm/io/netty:netty_tcnative_boringssl_static",
|
|
|
|
"//3rdparty/jvm/com/chuusai:shapeless",
|
|
|
|
"//3rdparty/jvm/org/spire_math:kind_projector",
|
|
|
|
"//3rdparty/jvm/com/github/scopt:scopt",
|
|
|
|
"//3rdparty/jvm/com/lihaoyi:pprint",
|
|
|
|
"//3rdparty/jvm/org/tpolecat:doobie_core",
|
|
|
|
"//3rdparty/jvm/org/tpolecat:doobie_postgres",
|
|
|
|
"//3rdparty/jvm/com/typesafe/akka:akka_stream",
|
|
|
|
"//3rdparty/jvm/org/scalaz:scalaz_core",
|
|
|
|
"//3rdparty/jvm/org/slf4j:slf4j_api",
|
|
|
|
"//3rdparty/jvm/io/circe:circe_core",
|
|
|
|
"//3rdparty/jvm/io/circe:circe_generic",
|
|
|
|
"//3rdparty/jvm/io/circe:circe_parser",
|
|
|
|
"//3rdparty/jvm/io/grpc:grpc_netty",
|
2019-04-04 11:33:38 +03:00
|
|
|
]
|
|
|
|
|
|
|
|
daml_compile(
|
2019-04-12 14:10:16 +03:00
|
|
|
name = "RecordsAndVariants",
|
|
|
|
damlc = "//daml-foundations/daml-tools/da-hs-damlc-app:da-hs-damlc-app-deprecated",
|
|
|
|
main_src = "src/test/resources/damls/RecordsAndVariants.daml",
|
|
|
|
target = "1.3",
|
2019-04-04 11:33:38 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
daml_compile(
|
2019-04-12 14:10:16 +03:00
|
|
|
name = "PrimitiveTypes",
|
|
|
|
damlc = "//daml-foundations/daml-tools/da-hs-damlc-app:da-hs-damlc-app-deprecated",
|
|
|
|
main_src = "src/test/resources/damls/PrimitiveTypes.daml",
|
|
|
|
target = "1.3",
|
2019-04-04 11:33:38 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
daml_compile(
|
2019-04-12 14:10:16 +03:00
|
|
|
name = "TransactionExample",
|
|
|
|
damlc = "//daml-foundations/daml-tools/da-hs-damlc-app:da-hs-damlc-app-deprecated",
|
|
|
|
main_src = "src/test/resources/damls/TransactionExample.daml",
|
|
|
|
target = "1.3",
|
2019-04-04 11:33:38 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
testDependencies = [
|
2019-04-12 14:10:16 +03:00
|
|
|
":extractor",
|
|
|
|
"//ledger/sandbox:sandbox",
|
|
|
|
"//ledger-api/testing-utils",
|
|
|
|
"//ledger/sandbox:sandbox-scala-tests-lib",
|
|
|
|
"//3rdparty/jvm/org/scalatest:scalatest",
|
2019-04-04 11:33:38 +03:00
|
|
|
] + compileDependencies
|
|
|
|
|
|
|
|
da_scala_library(
|
2019-04-12 14:10:16 +03:00
|
|
|
name = "extractor",
|
|
|
|
srcs = glob(["src/main/scala/**/*.scala"]),
|
|
|
|
resources = glob(["src/main/resources/**/*"]),
|
|
|
|
runtime_deps = [
|
|
|
|
"//3rdparty/jvm/ch/qos/logback:logback_classic",
|
|
|
|
"//3rdparty/jvm/ch/qos/logback:logback_core",
|
|
|
|
],
|
|
|
|
deps = compileDependencies,
|
2019-04-04 11:33:38 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
da_scala_binary(
|
2019-04-12 14:10:16 +03:00
|
|
|
name = "extractor-binary",
|
|
|
|
main_class = "com.digitalasset.extractor.Main",
|
|
|
|
tags = ["maven_coordinates=com.digitalasset:extractor:__VERSION__"],
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
|
|
|
":extractor",
|
|
|
|
],
|
2019-04-04 11:33:38 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
da_scala_library(
|
2019-04-12 14:10:16 +03:00
|
|
|
name = "extractor-scala-tests-lib",
|
|
|
|
srcs = glob(["src/test/lib/**/*.scala"]),
|
|
|
|
deps = testDependencies,
|
2019-04-04 11:33:38 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
da_scala_test_suite(
|
|
|
|
name = "extractor-scala-tests",
|
2019-04-12 14:10:16 +03:00
|
|
|
size = "small",
|
|
|
|
srcs = glob(["src/test/suite/**/*.scala"]),
|
2019-04-04 11:33:38 +03:00
|
|
|
data = [
|
2019-04-12 14:10:16 +03:00
|
|
|
"//daml-foundations/daml-ghc/package-database/deprecated:daml-prim-1.3.dalf",
|
|
|
|
"//extractor:PrimitiveTypes.dalf",
|
|
|
|
"//extractor:RecordsAndVariants.dalf",
|
|
|
|
"//extractor:TransactionExample.dalf",
|
2019-04-04 11:33:38 +03:00
|
|
|
],
|
2019-04-12 14:10:16 +03:00
|
|
|
resources = glob(["src/test/resources/**/*"]),
|
2019-04-04 11:33:38 +03:00
|
|
|
deps = [
|
2019-04-12 14:10:16 +03:00
|
|
|
":extractor-scala-tests-lib",
|
2019-04-04 11:33:38 +03:00
|
|
|
] + testDependencies,
|
|
|
|
)
|