Files
gerrit/lib/asciidoctor/BUILD
Yuxuan 'fishy' Wang 14fdf9342e bazel: genasciidoc and genasciidoc_zip rule
Implement genasciidoc rule for bazel. It's a filegroup containing all
the html and resource files.

Also implement genasciidoc_zip rule for bazel, which is similar to
buck's genasciidoc rule to produce a zip file containing all asciidoctor
generated and resource files.

TEST PLAN:
  bazel build Documentation
  buck build Documentation:html
  diff -u bazel-bin/Documentation/install.html buck-out/gen/Documentation/html__tmp/Documentation/install.html

Change-Id: I3065355800a982c6956d3bb634204baaa60c045e
2016-10-07 15:20:35 +08:00

55 lines
1.1 KiB
Python

java_binary(
name = "asciidoc",
main_class = "AsciiDoctor",
runtime_deps = [":asciidoc_lib"],
visibility = ["//visibility:public"],
)
java_library(
name = "asciidoc_lib",
srcs = ["java/AsciiDoctor.java"],
deps = [
":asciidoctor",
"//lib:args4j",
"//lib:guava",
"//lib/log:api",
"//lib/log:nop",
],
visibility = ["//visibility:public"],
)
java_binary(
name = "doc_indexer",
main_class = "DocIndexer",
runtime_deps = [":doc_indexer_lib"],
visibility = ["//visibility:public"],
)
java_library(
name = "doc_indexer_lib",
srcs = ["java/DocIndexer.java"],
deps = [
":asciidoc_lib",
"//gerrit-server:constants",
"//lib:args4j",
"//lib:guava",
"//lib/lucene:lucene-analyzers-common",
"//lib/lucene:lucene-core-and-backward-codecs",
],
visibility = ["//visibility:public"],
)
java_library(
name = "asciidoctor",
exports = ["@asciidoctor//jar"],
runtime_deps = [":jruby"],
visibility = ["//visibility:public"],
data = ["//lib:LICENSE-asciidoctor"],
)
java_library(
name = "jruby",
exports = ["@jruby//jar"],
data = ["//lib:LICENSE-DO_NOT_DISTRIBUTE"],
)