Files
gerrit/lib/jgit/jgit.bzl
David Pursehouse fa8988fc8e Upgrade JGit to 4.6.1.201703071140-r.169-g61e336475
This is a snapshot of the latest head of JGit's master branch.

Jetty was changed to version 9.3.17.v20170317.  This version change
will be done for Gerrit in a follow-up commit.

Change-Id: I19ca866f90b16260f72fdd9cdc97683031b48488
2017-04-03 16:07:58 +09:00

67 lines
2.1 KiB
Python

load("//tools/bzl:maven_jar.bzl", "GERRIT", "MAVEN_LOCAL", "MAVEN_CENTRAL", "maven_jar")
_JGIT_VERS = "4.6.1.201703071140-r.169-g61e336475"
_DOC_VERS = "4.6.0.201612231935-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 = "ae2d80dfa58eff4228425eb49cd22fc3190637b9",
src_sha1 = "693c525ef00a5e1ab918d90aff9893a19ebf43dd",
unsign = True,
)
maven_jar(
name = "jgit_servlet",
artifact = "org.eclipse.jgit:org.eclipse.jgit.http.server:" + _JGIT_VERS,
repository = _JGIT_REPO,
sha1 = "7610fde96610fbc17782ed383a721c4168bfd760",
unsign = True,
)
maven_jar(
name = "jgit_archive",
artifact = "org.eclipse.jgit:org.eclipse.jgit.archive:" + _JGIT_VERS,
repository = _JGIT_REPO,
sha1 = "c5c6ecac620a62a1f4115dcff63d7baa257582f1",
)
maven_jar(
name = "jgit_junit",
artifact = "org.eclipse.jgit:org.eclipse.jgit.junit:" + _JGIT_VERS,
repository = _JGIT_REPO,
sha1 = "5ed3263792c677e3e5a594d235f8360c38433324",
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