daml/language-support/codegen-main/BUILD.bazel
Andreas Herrmann 2bd1db490a
Replace bazel-deps by rules_jvm_external (#3253)
* Update bazel-common to fix javadoc issues

Specifically, to fix the following error

```
ERROR: /home/aj/tweag.io/da/da-bazel-1.1/ledger-api/rs-grpc-bridge/BUILD.bazel:7:1: in javadoc_library rule //ledger-api/rs-grpc-bridge:rs-grpc-bridge_javadoc:
Traceback (most recent call last):
        File "/home/aj/tweag.io/da/da-bazel-1.1/ledger-api/rs-grpc-bridge/BUILD.bazel", line 7
                javadoc_library(name = 'rs-grpc-bridge_javadoc')
        File "/home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/com_github_google_bazel_common/tools/javadoc/javadoc.bzl", line 27, in _javadoc_library
                dep.java.transitive_deps
object of type 'JavaSkylarkApiProvider' has no field 'transitive_deps'
```

* Define Maven deps using rules_jvm_external

* Pin artifacts

* Remove bazel-deps generated targets

* Remove bazel-deps

* Switch to rules_jvm_external targets

* update bazel documentation

* pom_file: There are no more bazel-deps targets

* BAZEL-JVM.md `maven_install` typo
2019-10-28 13:53:14 +01:00

59 lines
1.6 KiB
Python

# Copyright (c) 2019 The DAML Authors. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
load(
"//bazel_tools:scala.bzl",
"da_scala_binary",
"scala_source_jar",
"scaladoc_jar",
)
load(
"@com_github_johnynek_bazel_jar_jar//:jar_jar.bzl",
"jar_jar",
)
load("//bazel_tools:pom_file.bzl", "pom_file")
load("@os_info//:os_info.bzl", "is_windows")
da_scala_binary(
name = "codegen-main",
srcs = glob(["src/main/**/*.scala"]),
main_class = "com.digitalasset.codegen.CodegenMain",
visibility = ["//visibility:public"],
deps = [
"//daml-assistant/scala-daml-project-config",
"//language-support/codegen-common",
"//language-support/java/codegen:lib",
"//language-support/scala/codegen:codegen-main",
"@maven//:ch_qos_logback_logback_classic",
"@maven//:com_github_scopt_scopt_2_12",
"@maven//:com_typesafe_scala_logging_scala_logging_2_12",
],
)
jar_jar(
name = "shaded_binary",
input_jar = "//language-support/codegen-main:codegen-main_deploy.jar",
rules = "shade_rule",
tags = ["maven_coordinates=com.daml:codegen-main:__VERSION__"],
visibility = ["//visibility:public"],
)
pom_file(
name = "shaded_binary_pom",
target = ":shaded_binary",
visibility = ["//visibility:public"],
)
# Create empty Scaladoc JAR for uploading to Maven Central
scaladoc_jar(
name = "shaded_binary_scaladoc",
srcs = [],
deps = [],
) if is_windows == False else None
# Create empty Sources JAR for uploading to Maven Central
scala_source_jar(
name = "shaded_binary_src",
srcs = [],
)