From b14bb76d5b0927a8e2be46da1809f338f917f283 Mon Sep 17 00:00:00 2001 From: Shawn Pearce Date: Thu, 25 Jun 2015 00:03:07 -0700 Subject: [PATCH] Remove //lib/jgit:jgit from UI deps This should only appear in the server deps. For UI code build //lib/jgit:edit_lib which has only the tiny slice of code used in the UI. Change-Id: Ia46c0559a7180f80fda30efb8884ca236997c92d --- gerrit-common/BUCK | 2 +- gerrit-gwtui/BUCK | 2 +- gerrit-patch-jgit/BUCK | 1 - gerrit-prettify/BUCK | 2 +- lib/jgit/BUCK | 12 +++++++++--- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/gerrit-common/BUCK b/gerrit-common/BUCK index a4d399ba0a..718c751a5a 100644 --- a/gerrit-common/BUCK +++ b/gerrit-common/BUCK @@ -32,7 +32,7 @@ gwt_module( '//gerrit-reviewdb:client', '//lib:gwtjsonrpc', '//lib:gwtorm', - '//lib/jgit:jgit', + '//lib/jgit:Edit', ], visibility = ['PUBLIC'], ) diff --git a/gerrit-gwtui/BUCK b/gerrit-gwtui/BUCK index 2a6c7f8d33..ce6e081a35 100644 --- a/gerrit-gwtui/BUCK +++ b/gerrit-gwtui/BUCK @@ -44,7 +44,7 @@ gwt_module( '//lib:gwtorm', '//lib/codemirror:codemirror', '//lib/gwt:user', - '//lib/jgit:jgit', + '//lib/jgit:Edit', ], visibility = [ '//tools/eclipse:classpath', diff --git a/gerrit-patch-jgit/BUCK b/gerrit-patch-jgit/BUCK index e62172229c..64155bf7df 100644 --- a/gerrit-patch-jgit/BUCK +++ b/gerrit-patch-jgit/BUCK @@ -10,7 +10,6 @@ gwt_module( deps = [ '//lib:gwtjsonrpc', '//lib/gwt:user', - '//lib/jgit:jgit', '//lib/jgit:Edit', ], visibility = ['PUBLIC'], diff --git a/gerrit-prettify/BUCK b/gerrit-prettify/BUCK index cc42d2b769..2a5367e2f8 100644 --- a/gerrit-prettify/BUCK +++ b/gerrit-prettify/BUCK @@ -18,7 +18,7 @@ gwt_module( '//lib:guava', '//lib:gwtjsonrpc', '//lib/gwt:user', - '//lib/jgit:jgit', + '//lib/jgit:Edit', ], visibility = ['PUBLIC'], ) diff --git a/lib/jgit/BUCK b/lib/jgit/BUCK index 68847f6e9e..c7c63763e7 100644 --- a/lib/jgit/BUCK +++ b/lib/jgit/BUCK @@ -67,17 +67,23 @@ maven_jar( license = 'Apache2.0', ) -prebuilt_jar( +gwt_module( name = 'Edit', - binary_jar = ':jgit_edit_src', + srcs = [':jgit_edit_src'], + deps = [':edit_src'], visibility = ['PUBLIC'], ) +prebuilt_jar( + name = 'edit_src', + binary_jar = ':jgit_edit_src', +) + genrule( name = 'jgit_edit_src', cmd = 'unzip -qd $TMP $(location :jgit_src) ' + 'org/eclipse/jgit/diff/Edit.java;' + 'cd $TMP;' + 'zip -Dq $OUT org/eclipse/jgit/diff/Edit.java', - out = 'edit-src.jar', + out = 'edit.src.zip', )