diff options
author | Shawn Pearce <sop@google.com> | 2015-12-31 11:18:02 -0800 |
---|---|---|
committer | Shawn Pearce <sop@google.com> | 2015-12-31 17:18:50 -0800 |
commit | 34de70a5d42fc89275c9108351cf2e8154ff3322 (patch) | |
tree | a596a9eba25b883b2b19014c1cfb9210eae928ae /org.eclipse.jgit.pgm | |
parent | 13502fef8f4814c6c5bdfa63674c94f9d32b5531 (diff) | |
download | jgit-34de70a5d42fc89275c9108351cf2e8154ff3322.tar.gz jgit-34de70a5d42fc89275c9108351cf2e8154ff3322.zip |
buck: build standalone jgit binary
Construct the java_application JAR wrapped with the shell script
header. This is enough to clone a repository over HTTPs:
$ buck build :jgit_bin
$ buck-out/gen/jgit_bin/jgit_bin clone https://...
Change-Id: I4aceb4e77b2ec9be76a32ec93d94f2dafe9acce6
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r-- | org.eclipse.jgit.pgm/BUCK | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/org.eclipse.jgit.pgm/BUCK b/org.eclipse.jgit.pgm/BUCK new file mode 100644 index 0000000000..64237c32e1 --- /dev/null +++ b/org.eclipse.jgit.pgm/BUCK @@ -0,0 +1,44 @@ +java_library( + name = 'pgm', + srcs = glob(['src/**']), + resources = glob(['resources/**']), + deps = [ + ':services', + '//org.eclipse.jgit:jgit', + '//org.eclipse.jgit.archive:jgit-archive', + '//org.eclipse.jgit.http.apache:http-apache', + '//org.eclipse.jgit.ui:ui', + '//lib:args4j', + ], + visibility = ['PUBLIC'], +) + +prebuilt_jar( + name = 'services', + binary_jar = ':services__jar', +) + +genrule( + name = 'services__jar', + cmd = 'cd $SRCDIR ; zip -qr $OUT .', + srcs = glob(['META-INF/services/*']), + out = 'services.jar', +) + +genrule( + name = 'jgit', + cmd = 'cat $SRCDIR/jgit.sh $(location :jgit_jar) >$OUT;' + + 'chmod a+x $OUT', + srcs = ['jgit.sh'], + out = 'jgit', + visibility = ['PUBLIC'], +) + +java_binary( + name = 'jgit_jar', + main_class = 'org.eclipse.jgit.pgm.Main', + deps = [ + ':pgm', + '//lib:slf4j-simple', + ], +) |