Bazel: Format all build files with buildifier 0.15.0
Change-Id: I8343b723da6e40d5ae7fc45c84f64c31276bd5dc Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
This commit is contained in:
parent
ee56e5fc04
commit
487571e604
|
@ -115,9 +115,9 @@ java_library(
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
exports = [
|
exports = [
|
||||||
"@junit//jar",
|
|
||||||
"@hamcrest_core//jar",
|
"@hamcrest_core//jar",
|
||||||
"@hamcrest_library//jar",
|
"@hamcrest_library//jar",
|
||||||
|
"@junit//jar",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ DATA = [
|
||||||
|
|
||||||
tests(glob(
|
tests(glob(
|
||||||
["tst/**/*.java"],
|
["tst/**/*.java"],
|
||||||
exclude = HELPERS + DATA
|
exclude = HELPERS + DATA,
|
||||||
))
|
))
|
||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
|
@ -54,8 +54,8 @@ java_import(
|
||||||
)
|
)
|
||||||
|
|
||||||
genrule2(
|
genrule2(
|
||||||
name = 'tst_rsrc_jar',
|
name = "tst_rsrc_jar",
|
||||||
cmd = 'o=$$PWD/$@ && tar cf - $(SRCS) | tar -C $$TMP --strip-components=2 -xf - && cd $$TMP && zip -qr $$o .',
|
srcs = glob(["tst-rsrc/**"]),
|
||||||
srcs = glob(['tst-rsrc/**']),
|
outs = ["tst_rsrc.jar"],
|
||||||
outs = ['tst_rsrc.jar',],
|
cmd = "o=$$PWD/$@ && tar cf - $(SRCS) | tar -C $$TMP --strip-components=2 -xf - && cd $$TMP && zip -qr $$o .",
|
||||||
)
|
)
|
||||||
|
|
|
@ -5,29 +5,29 @@ 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",
|
||||||
]
|
]
|
||||||
|
|
||||||
junit_tests(
|
junit_tests(
|
||||||
|
@ -35,14 +35,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"],
|
||||||
)
|
)
|
||||||
|
|
|
@ -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…
Reference in New Issue