Document diffy logo is CC-BY 3.0
Restructure the build process slightly so there is license information
attached to the diffy images. The CC-BY 3.0 attribution information
and license will now appear in the documentation alongside all other
libraries used by Gerrit.
Change-Id: I8e3315fbe79ae1dc8e0444c6e6ed2ae241bcefb0
diff --git a/gerrit-gwtui/BUCK b/gerrit-gwtui/BUCK
index 5db6e0e..f3c8a25 100644
--- a/gerrit-gwtui/BUCK
+++ b/gerrit-gwtui/BUCK
@@ -53,12 +53,15 @@
visibility = ['//:'],
)
+DIFFY = glob(['src/main/java/com/google/gerrit/client/diffy*.png'])
+
gwt_module(
name = 'ui_module',
srcs = glob(['src/main/java/**/*.java']),
gwtxml = 'src/main/java/%s.gwt.xml' % MODULE.replace('.', '/'),
- resources = glob(['src/main/java/**/*']),
+ resources = glob(['src/main/java/**/*'], excludes = DIFFY),
deps = [
+ ':diffy_logo',
'//gerrit-gwtexpui:Clippy',
'//gerrit-gwtexpui:CSS',
'//gerrit-gwtexpui:GlobalKey',
@@ -84,6 +87,28 @@
],
)
+prebuilt_jar(
+ name = 'diffy_logo',
+ binary_jar = genfile('diffy_images.jar'),
+ deps = [
+ '//lib:LICENSE-diffy',
+ '//lib:LICENSE-CC-BY3.0',
+ ':diffy_image_files_ln',
+ ],
+)
+
+genrule(
+ name = 'diffy_image_files_ln',
+ cmd = 'ln -s $(location :diffy_image_files) $OUT',
+ deps = [':diffy_image_files'],
+ out = 'diffy_images.jar',
+)
+
+java_library(
+ name = 'diffy_image_files',
+ resources = DIFFY,
+)
+
java_test(
name = 'ui_tests',
srcs = glob(['src/test/java/**/*.java']),