
The recent JGit releases were published to the Eclipse repository due to a security embargo. The embargo has since been lifted, and the releases are available on Maven Central, so switch back to consuming the artifacts from there. Change-Id: I054cc91f410451fe2f3da5b3c8274d8b5890a3bf
76 lines
2.3 KiB
Python
76 lines
2.3 KiB
Python
load("//tools/bzl:maven_jar.bzl", "MAVEN_CENTRAL", "maven_jar")
|
|
|
|
_JGIT_VERS = "4.7.7.201812240805-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,
|
|
)
|
|
jgit_maven_repos_dev()
|
|
else:
|
|
jgit_maven_repos()
|
|
|
|
def jgit_maven_repos_dev():
|
|
# Transitive dependencies from JGit's WORKSPACE.
|
|
maven_jar(
|
|
name = "hamcrest-library",
|
|
artifact = "org.hamcrest:hamcrest-library:1.3",
|
|
sha1 = "4785a3c21320980282f9f33d0d1264a69040538f",
|
|
)
|
|
|
|
def jgit_maven_repos():
|
|
maven_jar(
|
|
name = "jgit-lib",
|
|
artifact = "org.eclipse.jgit:org.eclipse.jgit:" + _JGIT_VERS,
|
|
repository = _JGIT_REPO,
|
|
sha1 = "d2358e838084d2482d51b51b70fd34a356495925",
|
|
src_sha1 = "29471dec1313292c0b97a9b89bc3009802145497",
|
|
unsign = True,
|
|
)
|
|
maven_jar(
|
|
name = "jgit-servlet",
|
|
artifact = "org.eclipse.jgit:org.eclipse.jgit.http.server:" + _JGIT_VERS,
|
|
repository = _JGIT_REPO,
|
|
sha1 = "ed85179e4fd6aabadf00db035578dd0888c68228",
|
|
unsign = True,
|
|
)
|
|
maven_jar(
|
|
name = "jgit-archive",
|
|
artifact = "org.eclipse.jgit:org.eclipse.jgit.archive:" + _JGIT_VERS,
|
|
repository = _JGIT_REPO,
|
|
sha1 = "83820dc9253d6e1450742cbea9f7de265caf2a89",
|
|
)
|
|
maven_jar(
|
|
name = "jgit-junit",
|
|
artifact = "org.eclipse.jgit:org.eclipse.jgit.junit:" + _JGIT_VERS,
|
|
repository = _JGIT_REPO,
|
|
sha1 = "3275d89afdad003b03a055a8a2b838cc512cd2fc",
|
|
unsign = True,
|
|
)
|
|
|
|
def jgit_dep(name):
|
|
mapping = {
|
|
"@jgit-archive//jar": "@jgit//org.eclipse.jgit.archive:jgit-archive",
|
|
"@jgit-junit//jar": "@jgit//org.eclipse.jgit.junit:junit",
|
|
"@jgit-lib//jar": "@jgit//org.eclipse.jgit:jgit",
|
|
"@jgit-lib//jar:src": "@jgit//org.eclipse.jgit:libjgit-src.jar",
|
|
"@jgit-servlet//jar": "@jgit//org.eclipse.jgit.http.server:jgit-servlet",
|
|
}
|
|
|
|
if LOCAL_JGIT_REPO:
|
|
return mapping[name]
|
|
else:
|
|
return name
|