Files
gerrit/lib/jgit/jgit.bzl
Dave Borowitz 9eb5c4eed9 Update JGit to 4.9.0.201710071750-r.65-g8b3ab4343
Includes a fix to round-tripping Config values with leading/trailing
whitespace.

Change-Id: I43bd6cbf37ea057b1c7eae13f48654497f36b4b8
2017-11-21 09:25:32 -05:00

67 lines
2.1 KiB
Python

load("//tools/bzl:maven_jar.bzl", "GERRIT", "MAVEN_LOCAL", "MAVEN_CENTRAL", "maven_jar")
_JGIT_VERS = "4.9.0.201710071750-r.65-g8b3ab4343"
_DOC_VERS = "4.9.0.201710071750-r" # Set to _JGIT_VERS unless using a snapshot
JGIT_DOC_URL = "http://download.eclipse.org/jgit/site/" + _DOC_VERS + "/apidocs"
_JGIT_REPO = GERRIT # Leave here even if set to MAVEN_CENTRAL.
# set this to use a local version.
# "/home/<user>/projects/jgit"
LOCAL_JGIT_REPO = ""
def jgit_repos():
if LOCAL_JGIT_REPO:
native.local_repository(
name = "jgit",
path = LOCAL_JGIT_REPO,
)
else:
jgit_maven_repos()
def jgit_maven_repos():
maven_jar(
name = "jgit_lib",
artifact = "org.eclipse.jgit:org.eclipse.jgit:" + _JGIT_VERS,
repository = _JGIT_REPO,
sha1 = "5e9a6147583d2071da3a4eb55b1da5955793da45",
src_sha1 = "61fee1a923b718b81b1e0f763865a222a78ed3d5",
unsign = True,
)
maven_jar(
name = "jgit_servlet",
artifact = "org.eclipse.jgit:org.eclipse.jgit.http.server:" + _JGIT_VERS,
repository = _JGIT_REPO,
sha1 = "f769fd0052de1eb5d78760683ca8d5cdb2c28e8a",
unsign = True,
)
maven_jar(
name = "jgit_archive",
artifact = "org.eclipse.jgit:org.eclipse.jgit.archive:" + _JGIT_VERS,
repository = _JGIT_REPO,
sha1 = "ea97248007428a3e5a552eb93ae9b71fc041fcb9",
)
maven_jar(
name = "jgit_junit",
artifact = "org.eclipse.jgit:org.eclipse.jgit.junit:" + _JGIT_VERS,
repository = _JGIT_REPO,
sha1 = "b9ddbf0819f6411ecb616eabcabdbd3ea4ead9a3",
unsign = True,
)
def jgit_dep(name):
mapping = {
"@jgit_junit//jar": "@jgit//org.eclipse.jgit.junit:junit",
"@jgit_lib//jar:src": "@jgit//org.eclipse.jgit:libjgit-src.jar",
"@jgit_lib//jar": "@jgit//org.eclipse.jgit:jgit",
"@jgit_servlet//jar":"@jgit//org.eclipse.jgit.http.server:jgit-servlet",
"@jgit_archive//jar": "@jgit//org.eclipse.jgit.archive:jgit-archive",
}
if LOCAL_JGIT_REPO:
return mapping[name]
else:
return name