gerrit/gerrit-patch-jgit/BUILD
David Ostrovsky fa18907d7f Bazel: Reformat build files
Reformat the Bazel build files with the buildifier tool [1].

The style is different for Bazel files. Most notably, indentation level
is 4 spaces instead of 2, and " is used instead of '.

[1] https://github.com/bazelbuild/buildifier

Change-Id: I95c0c6f11b6d76572797853b4ebb5cee5ebd3c98
2016-12-07 11:33:07 +00:00

68 lines
1.5 KiB
Python

load("//tools/bzl:genrule2.bzl", "genrule2")
load("//tools/bzl:gwt.bzl", "gwt_module")
SRC = "src/main/java/org/eclipse/jgit/"
gwt_module(
name = "client",
srcs = [
SRC + "diff/Edit_JsonSerializer.java",
SRC + "diff/ReplaceEdit.java",
],
gwt_xml = SRC + "JGit.gwt.xml",
visibility = ["//visibility:public"],
deps = [
":Edit",
"//lib:gwtjsonrpc",
"//lib/gwt:user",
],
)
gwt_module(
name = "Edit",
srcs = [":jgit_edit_src"],
visibility = ["//visibility:public"],
)
genrule2(
name = "jgit_edit_src",
outs = ["edit.srcjar"],
cmd = " && ".join([
"unzip -qd $$TMP $(location @jgit//jar:src) " +
"org/eclipse/jgit/diff/Edit.java",
"cd $$TMP",
"zip -Dq $$ROOT/$@ org/eclipse/jgit/diff/Edit.java",
]),
tools = ["@jgit//jar:src"],
)
java_library(
name = "server",
srcs = [
SRC + x
for x in [
"diff/EditDeserializer.java",
"diff/ReplaceEdit.java",
"internal/storage/file/WindowCacheStatAccessor.java",
"lib/ObjectIdSerialization.java",
]
],
visibility = ["//visibility:public"],
deps = [
"//lib:gson",
"//lib/jgit/org.eclipse.jgit:jgit",
],
)
java_test(
name = "jgit_patch_tests",
srcs = glob(["src/test/java/**/*.java"]),
test_class = "org.eclipse.jgit.diff.EditDeserializerTest",
visibility = ["//visibility:public"],
deps = [
":server",
"//lib:junit",
"//lib/jgit/org.eclipse.jgit:jgit",
],
)