Bazel: Simplify diffy_logo rules
There is a regression in Bazel 0.3.2 release: [1] that prevents creating a symbolic link to previously built artifact. In this case we don't really need to do that, as we can depend on previously built library and do not need to create a zip from java_library and import it again as java_library. [1] https://github.com/bazelbuild/bazel/issues/1966 Change-Id: I16a62e2fbb3e2d1de377eeef70061298bb2bb745
This commit is contained in:
committed by
David Ostrovsky
parent
fae18ed4a0
commit
0e121132f5
@@ -13,7 +13,6 @@ EXPORTED_DEPS = [
|
||||
]
|
||||
DEPS = ['//lib/gwt:user']
|
||||
SRC = 'src/main/java/com/google/gerrit/'
|
||||
DIFFY = glob(['src/main/resources/com/google/gerrit/client/diffy*.png'])
|
||||
|
||||
gwt_module(
|
||||
name = 'client',
|
||||
@@ -38,26 +37,14 @@ java_library2(
|
||||
visibility = ['//visibility:public'],
|
||||
)
|
||||
|
||||
java_import(
|
||||
java_library(
|
||||
name = 'diffy_logo',
|
||||
jars = [':diffy_image_files_ln'],
|
||||
visibility = ['//visibility:public'],
|
||||
resources = glob(['src/main/resources/com/google/gerrit/client/diffy*.png']),
|
||||
data = [
|
||||
'//lib:LICENSE-diffy',
|
||||
'//lib:LICENSE-CC-BY3.0-unported',
|
||||
],
|
||||
)
|
||||
|
||||
genrule2(
|
||||
name = 'diffy_image_files_ln',
|
||||
srcs = [':diffy_image_files'],
|
||||
cmd = 'ln -s $$ROOT/$(location :diffy_image_files) $@',
|
||||
out = 'diffy_images.jar',
|
||||
)
|
||||
|
||||
java_library(
|
||||
name = 'diffy_image_files',
|
||||
resources = DIFFY,
|
||||
visibility = ['//visibility:public'],
|
||||
)
|
||||
|
||||
junit_tests(
|
||||
|
||||
Reference in New Issue
Block a user