Move AsciiDoctor Java files to a java package
These classes are authored by the Gerrit project, so let's give them a Gerrit package name and put them in the normal java/... hierarchy. Change-Id: I7b681fdd64e3ab96e073c91f8e16597704c85154
This commit is contained in:
parent
90163dec7c
commit
90135c1b88
@ -71,13 +71,13 @@ genrule(
|
||||
name = "index",
|
||||
srcs = SRCS,
|
||||
outs = ["index.jar"],
|
||||
cmd = "$(location //lib/asciidoctor:doc_indexer) " +
|
||||
cmd = "$(location //java/com/google/gerrit/asciidoctor:doc_indexer) " +
|
||||
"-o $(OUTS) " +
|
||||
"--prefix \"%s/\" " % DOC_DIR +
|
||||
"--in-ext \".txt\" " +
|
||||
"--out-ext \".html\" " +
|
||||
"$(SRCS)",
|
||||
tools = ["//lib/asciidoctor:doc_indexer"],
|
||||
tools = ["//java/com/google/gerrit/asciidoctor:doc_indexer"],
|
||||
)
|
||||
|
||||
# For the same srcs, we can have multiple genasciidoc_zip rules, but only one
|
||||
|
@ -12,6 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.asciidoctor;
|
||||
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
import com.google.common.io.ByteStreams;
|
39
java/com/google/gerrit/asciidoctor/BUILD
Normal file
39
java/com/google/gerrit/asciidoctor/BUILD
Normal file
@ -0,0 +1,39 @@
|
||||
java_binary(
|
||||
name = "asciidoc",
|
||||
main_class = "com.google.gerrit.asciidoctor.AsciiDoctor",
|
||||
visibility = ["//visibility:public"],
|
||||
runtime_deps = [":asciidoc_lib"],
|
||||
)
|
||||
|
||||
java_library(
|
||||
name = "asciidoc_lib",
|
||||
srcs = ["AsciiDoctor.java"],
|
||||
deps = [
|
||||
"//lib:args4j",
|
||||
"//lib:guava",
|
||||
"//lib/asciidoctor",
|
||||
"//lib/log:api",
|
||||
"//lib/log:nop",
|
||||
],
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "doc_indexer",
|
||||
main_class = "com.google.gerrit.asciidoctor.DocIndexer",
|
||||
visibility = ["//visibility:public"],
|
||||
runtime_deps = [":doc_indexer_lib"],
|
||||
)
|
||||
|
||||
java_library(
|
||||
name = "doc_indexer_lib",
|
||||
srcs = ["DocIndexer.java"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":asciidoc_lib",
|
||||
"//java/com/google/gerrit/server:constants",
|
||||
"//lib:args4j",
|
||||
"//lib:guava",
|
||||
"//lib/lucene:lucene-analyzers-common",
|
||||
"//lib/lucene:lucene-core-and-backward-codecs",
|
||||
],
|
||||
)
|
@ -12,6 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.asciidoctor;
|
||||
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
import com.google.gerrit.server.documentation.Constants;
|
@ -1,48 +1,7 @@
|
||||
java_binary(
|
||||
name = "asciidoc",
|
||||
main_class = "AsciiDoctor",
|
||||
visibility = ["//visibility:public"],
|
||||
runtime_deps = [":asciidoc_lib"],
|
||||
)
|
||||
|
||||
java_library(
|
||||
name = "asciidoc_lib",
|
||||
srcs = ["java/AsciiDoctor.java"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":asciidoctor",
|
||||
"//lib:args4j",
|
||||
"//lib:guava",
|
||||
"//lib/log:api",
|
||||
"//lib/log:nop",
|
||||
],
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "doc_indexer",
|
||||
main_class = "DocIndexer",
|
||||
visibility = ["//visibility:public"],
|
||||
runtime_deps = [":doc_indexer_lib"],
|
||||
)
|
||||
|
||||
java_library(
|
||||
name = "doc_indexer_lib",
|
||||
srcs = ["java/DocIndexer.java"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":asciidoc_lib",
|
||||
"//java/com/google/gerrit/server:constants",
|
||||
"//lib:args4j",
|
||||
"//lib:guava",
|
||||
"//lib/lucene:lucene-analyzers-common",
|
||||
"//lib/lucene:lucene-core-and-backward-codecs",
|
||||
],
|
||||
)
|
||||
|
||||
java_library(
|
||||
name = "asciidoctor",
|
||||
data = ["//lib:LICENSE-asciidoctor"],
|
||||
visibility = ["//visibility:public"],
|
||||
visibility = ["//java/com/google/gerrit/asciidoctor:__pkg__"],
|
||||
exports = ["@asciidoctor//jar"],
|
||||
runtime_deps = [":jruby"],
|
||||
)
|
||||
|
@ -103,7 +103,7 @@ def _asciidoc_impl(ctx):
|
||||
|
||||
_asciidoc_attrs = {
|
||||
"_exe": attr.label(
|
||||
default = Label("//lib/asciidoctor:asciidoc"),
|
||||
default = Label("//java/com/google/gerrit/asciidoctor:asciidoc"),
|
||||
cfg = "host",
|
||||
allow_files = True,
|
||||
executable = True,
|
||||
|
@ -18,8 +18,8 @@ DEPS = [
|
||||
"//gerrit-plugin-gwtui:gwtui-api-lib",
|
||||
"//java/com/google/gerrit/acceptance:lib",
|
||||
"//java/com/google/gerrit/server",
|
||||
"//lib/asciidoctor:asciidoc_lib",
|
||||
"//lib/asciidoctor:doc_indexer_lib",
|
||||
"//java/com/google/gerrit/asciidoctor:asciidoc_lib",
|
||||
"//java/com/google/gerrit/asciidoctor:doc_indexer_lib",
|
||||
"//lib/auto:auto-value",
|
||||
"//lib/gwt:ant",
|
||||
"//lib/gwt:colt",
|
||||
|
Loading…
Reference in New Issue
Block a user