Link to JGit source as git submodule Using a submodule to bring in the source files vastly simplifies updating JGit. Gitiles developers can bump the SHA-1 of the submodule and not deal with the Maven rebuild process for JGit. This follows the approach taken in Gerrit in I16370e57f27. Change-Id: Ib35f7bad8b8f61e73f416937a387e3675bf1e3a2
diff --git a/lib/BUILD b/lib/BUILD index 282643d..0f9620e 100644 --- a/lib/BUILD +++ b/lib/BUILD
@@ -42,3 +42,45 @@ "@slf4j-simple//jar", ], ) + +java_library( + name = "jgit", + visibility = ["//visibility:public"], + exports = ["@jgit//org.eclipse.jgit:jgit"], + runtime_deps = [ + ":slf4j-api", + "@javaewah//jar", + ], +) + +java_library( + name = "jgit-archive", + visibility = ["//visibility:public"], + exports = ["@jgit//org.eclipse.jgit.archive:jgit-archive"], + runtime_deps = [":jgit"], +) + +java_library( + name = "jgit-junit", + testonly = True, + visibility = ["//visibility:public"], + exports = ["@jgit//org.eclipse.jgit.junit:junit"], + runtime_deps = [":jgit"], +) + +java_library( + name = "jgit-servlet", + visibility = ["//visibility:public"], + exports = ["@jgit//org.eclipse.jgit.http.server:jgit-servlet"], + runtime_deps = [":jgit"], +) + +java_library( + name = "tukaani-xz", + exports = ["@tukaani-xz//jar"], +) + +java_library( + name = "commons-compress", + exports = ["@commons-compress//jar"], +)