Browse Source

Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  Bazel: Use hyphen instead of underscore in external repository names
  Bazel: Format all build files with buildifier 0.15.0
  ChangeIdUtilTest: Remove unused notestCommitDashV

Change-Id: I500dd4e63302abb19ad669988b3a427cef8ef3d4
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-4.11
David Pursehouse 6 years ago
parent
commit
b67aacda2f
  1. 30
      WORKSPACE
  2. 30
      lib/BUILD
  3. 42
      org.eclipse.jgit.test/tests.bzl
  4. 3
      tools/bazlets.bzl

30
WORKSPACE

@ -40,43 +40,43 @@ maven_jar(
) )
maven_jar( maven_jar(
name = "commons_codec", name = "commons-codec",
artifact = "commons-codec:commons-codec:1.4", artifact = "commons-codec:commons-codec:1.4",
sha1 = "4216af16d38465bbab0f3dff8efa14204f7a399a", sha1 = "4216af16d38465bbab0f3dff8efa14204f7a399a",
) )
maven_jar( maven_jar(
name = "commons_logging", name = "commons-logging",
artifact = "commons-logging:commons-logging:1.1.3", artifact = "commons-logging:commons-logging:1.1.3",
sha1 = "f6f66e966c70a83ffbdb6f17a0919eaf7c8aca7f", sha1 = "f6f66e966c70a83ffbdb6f17a0919eaf7c8aca7f",
) )
maven_jar( maven_jar(
name = "log_api", name = "log-api",
artifact = "org.slf4j:slf4j-api:1.7.2", artifact = "org.slf4j:slf4j-api:1.7.2",
sha1 = "0081d61b7f33ebeab314e07de0cc596f8e858d97", sha1 = "0081d61b7f33ebeab314e07de0cc596f8e858d97",
) )
maven_jar( maven_jar(
name = "slf4j_simple", name = "slf4j-simple",
artifact = "org.slf4j:slf4j-simple:1.7.2", artifact = "org.slf4j:slf4j-simple:1.7.2",
sha1 = "760055906d7353ba4f7ce1b8908bc6b2e91f39fa", sha1 = "760055906d7353ba4f7ce1b8908bc6b2e91f39fa",
) )
maven_jar( maven_jar(
name = "servlet_api_3_1", name = "servlet-api-3_1",
artifact = "javax.servlet:javax.servlet-api:3.1.0", artifact = "javax.servlet:javax.servlet-api:3.1.0",
sha1 = "3cd63d075497751784b2fa84be59432f4905bf7c", sha1 = "3cd63d075497751784b2fa84be59432f4905bf7c",
) )
maven_jar( maven_jar(
name = "commons_compress", name = "commons-compress",
artifact = "org.apache.commons:commons-compress:1.15", artifact = "org.apache.commons:commons-compress:1.15",
sha1 = "b686cd04abaef1ea7bc5e143c080563668eec17e", sha1 = "b686cd04abaef1ea7bc5e143c080563668eec17e",
) )
maven_jar( maven_jar(
name = "tukaani_xz", name = "tukaani-xz",
artifact = "org.tukaani:xz:1.6", artifact = "org.tukaani:xz:1.6",
sha1 = "05b6f921f1810bdf90e25471968f741f87168b64", sha1 = "05b6f921f1810bdf90e25471968f741f87168b64",
) )
@ -94,13 +94,13 @@ maven_jar(
) )
maven_jar( maven_jar(
name = "hamcrest_library", name = "hamcrest-library",
artifact = "org.hamcrest:hamcrest-library:1.3", artifact = "org.hamcrest:hamcrest-library:1.3",
sha1 = "4785a3c21320980282f9f33d0d1264a69040538f", sha1 = "4785a3c21320980282f9f33d0d1264a69040538f",
) )
maven_jar( maven_jar(
name = "hamcrest_core", name = "hamcrest-core",
artifact = "org.hamcrest:hamcrest-core:1.3", artifact = "org.hamcrest:hamcrest-core:1.3",
sha1 = "42a25dc3219429f0e5d060061f71acb49bf010a0", sha1 = "42a25dc3219429f0e5d060061f71acb49bf010a0",
) )
@ -114,42 +114,42 @@ maven_jar(
JETTY_VER = "9.4.8.v20171121" JETTY_VER = "9.4.8.v20171121"
maven_jar( maven_jar(
name = "jetty_servlet", name = "jetty-servlet",
artifact = "org.eclipse.jetty:jetty-servlet:" + JETTY_VER, artifact = "org.eclipse.jetty:jetty-servlet:" + JETTY_VER,
sha1 = "bbbb9b5de08f468c7b9b3de6aea0b098d2c679b6", sha1 = "bbbb9b5de08f468c7b9b3de6aea0b098d2c679b6",
src_sha1 = "6ef1e65a5af7ab2d79ba6043923affdaeaafb1e5", src_sha1 = "6ef1e65a5af7ab2d79ba6043923affdaeaafb1e5",
) )
maven_jar( maven_jar(
name = "jetty_security", name = "jetty-security",
artifact = "org.eclipse.jetty:jetty-security:" + JETTY_VER, artifact = "org.eclipse.jetty:jetty-security:" + JETTY_VER,
sha1 = "e8350eec683b55494287f06740543e4be6f75425", sha1 = "e8350eec683b55494287f06740543e4be6f75425",
src_sha1 = "e3a879d8675fa10bc305e7a59006f1d09db04a68", src_sha1 = "e3a879d8675fa10bc305e7a59006f1d09db04a68",
) )
maven_jar( maven_jar(
name = "jetty_server", name = "jetty-server",
artifact = "org.eclipse.jetty:jetty-server:" + JETTY_VER, artifact = "org.eclipse.jetty:jetty-server:" + JETTY_VER,
sha1 = "34614bd9a29de57ef28ca31f1f2b49a412af196d", sha1 = "34614bd9a29de57ef28ca31f1f2b49a412af196d",
src_sha1 = "fef49ac6b2bbc6d142dc0be34f68f0fb0792d52b", src_sha1 = "fef49ac6b2bbc6d142dc0be34f68f0fb0792d52b",
) )
maven_jar( maven_jar(
name = "jetty_http", name = "jetty-http",
artifact = "org.eclipse.jetty:jetty-http:" + JETTY_VER, artifact = "org.eclipse.jetty:jetty-http:" + JETTY_VER,
sha1 = "9879d6c4e37400bf43f0cd4b3c6e34a3ba409864", sha1 = "9879d6c4e37400bf43f0cd4b3c6e34a3ba409864",
src_sha1 = "5e746cd0ccb732eef0427c8c4b9dcb034e26c61b", src_sha1 = "5e746cd0ccb732eef0427c8c4b9dcb034e26c61b",
) )
maven_jar( maven_jar(
name = "jetty_io", name = "jetty-io",
artifact = "org.eclipse.jetty:jetty-io:" + JETTY_VER, artifact = "org.eclipse.jetty:jetty-io:" + JETTY_VER,
sha1 = "d3fe2dfa62f52ee91ff07cb359f63387e0e30b40", sha1 = "d3fe2dfa62f52ee91ff07cb359f63387e0e30b40",
src_sha1 = "41f25e1e1bba14ab0d3415488fa189f09c27a1cf", src_sha1 = "41f25e1e1bba14ab0d3415488fa189f09c27a1cf",
) )
maven_jar( maven_jar(
name = "jetty_util", name = "jetty-util",
artifact = "org.eclipse.jetty:jetty-util:" + JETTY_VER, artifact = "org.eclipse.jetty:jetty-util:" + JETTY_VER,
sha1 = "d6ec1a1613c7fa72aa6bf5d8c204750afbc3df3b", sha1 = "d6ec1a1613c7fa72aa6bf5d8c204750afbc3df3b",
src_sha1 = "a74ecb43f96b2e21852f6908604316d7348a16ad", src_sha1 = "a74ecb43f96b2e21852f6908604316d7348a16ad",

30
lib/BUILD

@ -13,19 +13,19 @@ java_library(
"//org.eclipse.jgit.archive:__pkg__", "//org.eclipse.jgit.archive:__pkg__",
"//org.eclipse.jgit.pgm.test:__pkg__", "//org.eclipse.jgit.pgm.test:__pkg__",
], ],
exports = ["@commons_compress//jar"], exports = ["@commons-compress//jar"],
) )
java_library( java_library(
name = "commons-codec", name = "commons-codec",
exports = ["@commons_codec//jar"], exports = ["@commons-codec//jar"],
) )
java_library( java_library(
name = "commons-logging", name = "commons-logging",
testonly = 1, testonly = 1,
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = ["@commons_logging//jar"], exports = ["@commons-logging//jar"],
) )
java_library( java_library(
@ -68,7 +68,7 @@ java_library(
name = "jetty-http", name = "jetty-http",
# TODO: This should be testonly but org.eclipse.jgit.pgm depends on it. # TODO: This should be testonly but org.eclipse.jgit.pgm depends on it.
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = ["@jetty_http//jar"], exports = ["@jetty-http//jar"],
runtime_deps = [":commons-codec"], runtime_deps = [":commons-codec"],
) )
@ -76,35 +76,35 @@ java_library(
name = "jetty-io", name = "jetty-io",
# TODO: This should be testonly but org.eclipse.jgit.pgm depends on it. # TODO: This should be testonly but org.eclipse.jgit.pgm depends on it.
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = ["@jetty_io//jar"], exports = ["@jetty-io//jar"],
) )
java_library( java_library(
name = "jetty-security", name = "jetty-security",
# TODO: This should be testonly but org.eclipse.jgit.pgm depends on it. # TODO: This should be testonly but org.eclipse.jgit.pgm depends on it.
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = ["@jetty_security//jar"], exports = ["@jetty-security//jar"],
) )
java_library( java_library(
name = "jetty-server", name = "jetty-server",
# TODO: This should be testonly but org.eclipse.jgit.pgm depends on it. # TODO: This should be testonly but org.eclipse.jgit.pgm depends on it.
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = ["@jetty_server//jar"], exports = ["@jetty-server//jar"],
) )
java_library( java_library(
name = "jetty-servlet", name = "jetty-servlet",
# TODO: This should be testonly but org.eclipse.jgit.pgm depends on it. # TODO: This should be testonly but org.eclipse.jgit.pgm depends on it.
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = ["@jetty_servlet//jar"], exports = ["@jetty-servlet//jar"],
) )
java_library( java_library(
name = "jetty-util", name = "jetty-util",
# TODO: This should be testonly but org.eclipse.jgit.pgm depends on it. # TODO: This should be testonly but org.eclipse.jgit.pgm depends on it.
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = ["@jetty_util//jar"], exports = ["@jetty-util//jar"],
) )
java_library( java_library(
@ -130,8 +130,8 @@ java_library(
testonly = 1, testonly = 1,
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = [ exports = [
"@hamcrest_core//jar", "@hamcrest-core//jar",
"@hamcrest_library//jar", "@hamcrest-library//jar",
"@junit//jar", "@junit//jar",
], ],
) )
@ -147,25 +147,25 @@ java_library(
"//org.eclipse.jgit.lfs.server.test:__pkg__", "//org.eclipse.jgit.lfs.server.test:__pkg__",
"//org.eclipse.jgit.pgm:__pkg__", "//org.eclipse.jgit.pgm:__pkg__",
], ],
exports = ["@servlet_api_3_1//jar"], exports = ["@servlet-api-3_1//jar"],
) )
java_library( java_library(
name = "slf4j-api", name = "slf4j-api",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = ["@log_api//jar"], exports = ["@log-api//jar"],
) )
java_library( java_library(
name = "slf4j-simple", name = "slf4j-simple",
testonly = 1, testonly = 1,
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = ["@slf4j_simple//jar"], exports = ["@slf4j-simple//jar"],
) )
java_library( java_library(
name = "xz", name = "xz",
testonly = 1, testonly = 1,
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = ["@tukaani_xz//jar"], exports = ["@tukaani-xz//jar"],
) )

42
org.eclipse.jgit.test/tests.bzl

@ -5,37 +5,37 @@ load(
def tests(tests): def tests(tests):
for src in tests: for src in tests:
name = src[len('tst/'):len(src)-len('.java')].replace('/', '_') name = src[len("tst/"):len(src) - len(".java")].replace("/", "_")
labels = [] labels = []
if name.startswith('org_eclipse_jgit_'): if name.startswith("org_eclipse_jgit_"):
l = name[len('org.eclipse.jgit_'):] l = name[len("org.eclipse.jgit_"):]
if l.startswith('internal_storage_'): if l.startswith("internal_storage_"):
l = l[len('internal.storage_'):] l = l[len("internal.storage_"):]
i = l.find('_') i = l.find("_")
if i > 0: if i > 0:
labels.append(l[:i]) labels.append(l[:i])
else: else:
labels.append(i) labels.append(i)
if 'lib' not in labels: if "lib" not in labels:
labels.append('lib') labels.append("lib")
additional_deps = [] additional_deps = []
if src.endswith("RootLocaleTest.java"): if src.endswith("RootLocaleTest.java"):
additional_deps = [ additional_deps = [
'//org.eclipse.jgit.pgm:pgm', "//org.eclipse.jgit.pgm:pgm",
'//org.eclipse.jgit.ui:ui', "//org.eclipse.jgit.ui:ui",
] ]
if src.endswith("WalkEncryptionTest.java"): if src.endswith("WalkEncryptionTest.java"):
additional_deps = [ additional_deps = [
'//org.eclipse.jgit:insecure_cipher_factory', "//org.eclipse.jgit:insecure_cipher_factory",
] ]
if src.endswith("OpenSshConfigTest.java"): if src.endswith("OpenSshConfigTest.java"):
additional_deps = [ additional_deps = [
'//lib:jsch', "//lib:jsch",
] ]
if src.endswith("JschConfigSessionFactoryTest.java"): if src.endswith("JschConfigSessionFactoryTest.java"):
additional_deps = [ additional_deps = [
'//lib:jsch', "//lib:jsch",
] ]
junit_tests( junit_tests(
@ -43,14 +43,14 @@ def tests(tests):
tags = labels, tags = labels,
srcs = [src], srcs = [src],
deps = additional_deps + [ deps = additional_deps + [
':helpers', ":helpers",
':tst_rsrc', ":tst_rsrc",
'//lib:javaewah', "//lib:javaewah",
'//lib:junit', "//lib:junit",
'//lib:slf4j-api', "//lib:slf4j-api",
'//org.eclipse.jgit:jgit', "//org.eclipse.jgit:jgit",
'//org.eclipse.jgit.junit:junit', "//org.eclipse.jgit.junit:junit",
'//org.eclipse.jgit.lfs:jgit-lfs', "//org.eclipse.jgit.lfs:jgit-lfs",
], ],
jvm_flags = ["-Xmx256m", "-Dfile.encoding=UTF-8"], jvm_flags = ["-Xmx256m", "-Dfile.encoding=UTF-8"],
) )

3
tools/bazlets.bzl

@ -2,8 +2,7 @@ NAME = "com_googlesource_gerrit_bazlets"
def load_bazlets( def load_bazlets(
commit, commit,
local_path = None local_path = None):
):
if not local_path: if not local_path:
native.git_repository( native.git_repository(
name = NAME, name = NAME,

Loading…
Cancel
Save