Files
gerrit/lib/jgit/jgit.bzl
David Pursehouse 3d9574e6c3 Upgrade JGit to 5.0.2.201807311906-r
This release contains the following fixes since 5.0.1.201806211838-r:

A fix for issue 9153:

  - ResolveMerger: Fix encoding with string; use bytes

And several fixes related to cleanup of ref directories after running
GC:

  - Delete all loose refs empty directories
  - Use java.nio to delete path to get detailed errors
  - GC: Remove empty references folders
  - Do not ignore path deletion errors

Bug: Issue 9153
Change-Id: I38d57c20475345626e277c7734fd0e109070d69e
2018-08-02 21:07:22 +02:00

67 lines
2.1 KiB
Python

load("//tools/bzl:maven_jar.bzl", "GERRIT", "MAVEN_CENTRAL", "MAVEN_LOCAL", "maven_jar")
_JGIT_VERS = "5.0.2.201807311906-r"
_DOC_VERS = _JGIT_VERS # Set to _JGIT_VERS unless using a snapshot
JGIT_DOC_URL = "http://download.eclipse.org/jgit/site/" + _DOC_VERS + "/apidocs"
_JGIT_REPO = MAVEN_CENTRAL # 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 = "a81d7c8d153a8a744b6be1d9c6d698270beec1c0",
src_sha1 = "c89f8f38cebaf75d13f9b2f7a1da71206d8c38f7",
unsign = True,
)
maven_jar(
name = "jgit-servlet",
artifact = "org.eclipse.jgit:org.eclipse.jgit.http.server:" + _JGIT_VERS,
repository = _JGIT_REPO,
sha1 = "ab3d0c85bc2008da513c1127ab4acf3df8ef414e",
unsign = True,
)
maven_jar(
name = "jgit-archive",
artifact = "org.eclipse.jgit:org.eclipse.jgit.archive:" + _JGIT_VERS,
repository = _JGIT_REPO,
sha1 = "ba6e0aaf3f733f2f460e227145526e1737ca160f",
)
maven_jar(
name = "jgit-junit",
artifact = "org.eclipse.jgit:org.eclipse.jgit.junit:" + _JGIT_VERS,
repository = _JGIT_REPO,
sha1 = "fe28963520e19c918eb26747e678ec9772ba800f",
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