mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-05 03:56:26 +03:00
aa70c7f64e
* Add buildifier targets. The tool allows to check and format BUILD files in the repo. To check if files are well formatted, run: bazel run //:buildifier To fix badly-formatted files run: bazel run //:buildifier-fix * Cleanup dade-copyright-headers formatting. * Fix dade-copyright-headers on files with just the copyright. * Run buildifier automatically on CI via 'fmt.sh'. * Reformat all BUILD files with buildifier. Excludes autogenerated Bazel files.
51 lines
2.4 KiB
Python
51 lines
2.4 KiB
Python
# Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
load("@os_info//:os_info.bzl", "is_windows")
|
|
|
|
genrule(
|
|
name = "javadocs",
|
|
srcs = [
|
|
"//language-support/java/bindings-rxjava:sources",
|
|
"//language-support/java/bindings:sources",
|
|
"//language-support/java/bindings-rxjava",
|
|
"//language-support/java/bindings:bindings-java",
|
|
"//external:jar/org/slf4j/slf4j_api",
|
|
"//ledger-api/rs-grpc-bridge",
|
|
"//external:jar/io/reactivex/rxjava2/rxjava",
|
|
"//external:jar/com/google/protobuf/protobuf_java",
|
|
"//external:jar/org/pcollections/pcollections",
|
|
"//external:jar/org/checkerframework/checker",
|
|
"//external:jar/io/grpc/grpc_netty",
|
|
"//external:jar/io/grpc/grpc_core",
|
|
"//external:jar/io/grpc/grpc_stub",
|
|
"//external:jar/io/netty/netty_handler",
|
|
"//external:jar/com/google/code/findbugs/jsr305",
|
|
],
|
|
outs = ["javadocs.tar.gz"],
|
|
cmd = """
|
|
CP=$(location //external:jar/org/slf4j/slf4j_api)
|
|
CP=$$CP{delim}$(location //language-support/java/bindings-rxjava:bindings-rxjava)
|
|
CP=$$CP{delim}$(location //language-support/java/bindings:bindings-java)
|
|
CP=$$CP{delim}$(location //ledger-api/rs-grpc-bridge:rs-grpc-bridge)
|
|
CP=$$CP{delim}$(location //external:jar/io/reactivex/rxjava2/rxjava)
|
|
CP=$$CP{delim}$(location //external:jar/com/google/protobuf/protobuf_java)
|
|
CP=$$CP{delim}$(location //external:jar/org/pcollections/pcollections)
|
|
CP=$$CP{delim}$(location //external:jar/org/checkerframework/checker)
|
|
CP=$$CP{delim}$(location //external:jar/io/grpc/grpc_netty)
|
|
CP=$$CP{delim}$(location //external:jar/io/grpc/grpc_core)
|
|
CP=$$CP{delim}$(location //external:jar/io/grpc/grpc_stub)
|
|
CP=$$CP{delim}$(location //external:jar/io/netty/netty_handler)
|
|
CP=$$CP{delim}$(location //external:jar/com/google/code/findbugs/jsr305)
|
|
echo $$CP
|
|
$(location @javadoc_dev_env//:javadoc) -quiet -d javadocs -classpath $$CP $(locations //language-support/java/bindings-rxjava:sources) $(locations //language-support/java/bindings:sources)
|
|
tar -zcf $(location javadocs.tar.gz) javadocs
|
|
""".format(
|
|
delim = "\;" if is_windows else ":",
|
|
),
|
|
tools = ["@javadoc_dev_env//:javadoc"],
|
|
visibility = [
|
|
"//visibility:public",
|
|
],
|
|
)
|