Browse Source

Buck: Simplify root build file

Remove all proxy rules, that were introduced to allow to build Gerrit
with hijacked JGit cell. New approach suggested in: [1], that emulates
real JGit project structure in its own cell, makes them unnecessary.

Add :all rule, that build all artifacts and packages them in zip file.
Add shell binary :jgit_bin rule, that allows to execute JGit binary
from with buck run command, e.g.:

  $ buck run jgit_bin status
  $ buck run jgit_bin -- --version

* [1] https://gerrit-review.googlesource.com/74859

Change-Id: Idf9ecb783cbd2b9984d4118047968f1f5204d642
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
tags/v4.3.0.201603230630-rc1
David Ostrovsky 8 years ago
parent
commit
2d0fc6124d
2 changed files with 19 additions and 78 deletions
  1. 6
    5
      .buckconfig
  2. 13
    73
      BUCK

+ 6
- 5
.buckconfig View File

@@ -1,10 +1,11 @@
[alias]
jgit = //:jgit
jgit-servlet = //:jgit-servlet
jgit-archive = //:jgit-archive
jgit-lfs = //:jgit-lfs
jgit-lfs-server = //:jgit-lfs-server
all = //:all
jgit = //org.eclipse.jgit:jgit
jgit-archive = //org.eclipse.jgit.archive:jgit-archive
jgit_bin = //:jgit_bin
jgit-lfs = //org.eclipse.jgit.lfs:jgit-lfs
jgit-lfs-server = //org.eclipse.jgit.lfs.server:jgit-lfs-server
jgit-servlet = //org.eclipse.jgit.http.server:jgit-servlet

[buildfile]
includes = //tools/default.defs

+ 13
- 73
BUCK View File

@@ -1,78 +1,18 @@
java_library(
name = 'jgit',
exported_deps = ['//org.eclipse.jgit:jgit'],
visibility = ['PUBLIC'],
)

genrule(
name = 'jgit_src',
cmd = 'ln -s $(location //org.eclipse.jgit:jgit_src) $OUT',
out = 'jgit_src.zip',
visibility = ['PUBLIC'],
)

java_library(
name = 'jgit-servlet',
exported_deps = [
':jgit',
'//org.eclipse.jgit.http.server:jgit-servlet'
],
visibility = ['PUBLIC'],
)

java_library(
name = 'jgit-archive',
exported_deps = [
':jgit',
'//org.eclipse.jgit.archive:jgit-archive'
],
visibility = ['PUBLIC'],
)

java_library(
name = 'jgit-lfs',
exported_deps = [
':jgit',
'//org.eclipse.jgit.lfs:jgit-lfs'
],
visibility = ['PUBLIC'],
)

genrule(
name = 'jgit-lfs_src',
cmd = 'ln -s $(location //org.eclipse.jgit.lfs:jgit-lfs_src) $OUT',
out = 'jgit-lfs_src.zip',
visibility = ['PUBLIC'],
)

java_library(
name = 'jgit-lfs-server',
exported_deps = [
':jgit',
':jgit-lfs',
'//org.eclipse.jgit.lfs.server:jgit-lfs-server'
],
visibility = ['PUBLIC'],
)

genrule(
name = 'jgit-lfs-server_src',
cmd = 'ln -s $(location //org.eclipse.jgit.lfs.server:jgit-lfs-server_src) $OUT',
out = 'jgit-lfs-server_src.zip',
visibility = ['PUBLIC'],
)
DEPS = [
'//org.eclipse.jgit:jgit',
'//org.eclipse.jgit.archive:jgit-archive',
'//org.eclipse.jgit.http.server:jgit-servlet',
'//org.eclipse.jgit.lfs:jgit-lfs',
'//org.eclipse.jgit.lfs.server:jgit-lfs-server',
'//org.eclipse.jgit.pgm:jgit',
]

java_library(
name = 'junit',
exported_deps = [
':jgit',
'//org.eclipse.jgit.junit:junit'
],
visibility = ['PUBLIC'],
zip_file(
name = 'all',
srcs = DEPS,
)

genrule(
sh_binary(
name = 'jgit_bin',
cmd = 'ln -s $(location //org.eclipse.jgit.pgm:jgit) $OUT',
out = 'jgit_bin',
main = '//org.eclipse.jgit.pgm:jgit',
)

Loading…
Cancel
Save