buck: Make :jgit_src target work in cross-cell environment

This artifact is used from unzip utility in Gerrit Code Review
build toolchain and thus the file must exist on the file system.
Moreover, trying to use java_binary() didn't work either, as the
zip layout was wrong: all files contained 'org.eclipse.jgit/src/'
prefix.

Change-Id: I00e3269a7a1a6c6d1fe7e60d1bf1c69b8e57d79d
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
This commit is contained in:
David Ostrovsky 2016-01-04 00:44:07 +01:00
parent 8d5d144530
commit 4c574b39b4
1 changed files with 3 additions and 2 deletions

5
BUCK
View File

@ -4,9 +4,10 @@ java_library(
visibility = ['PUBLIC'],
)
java_library(
genrule(
name = 'jgit_src',
exported_deps = ['//org.eclipse.jgit:jgit_src'],
cmd = 'ln -s $(location //org.eclipse.jgit:jgit_src) $OUT',
out = 'jgit_src.zip',
visibility = ['PUBLIC'],
)