blob: cb80dd2590b561ae5a0cf1c178e01e6b84b6ef0d [file] [log] [blame]
Brian O'Connor42c38cf2016-04-05 17:05:57 -07001checkstyle_source = 'src/main/resources/onos/checkstyle.xml'
2suppression_source = 'src/main/resources/onos/suppressions.xml'
Ray Milkey85267002016-11-16 11:06:35 -08003header_source = 'src/main/resources/onos/onos-java.header'
Brian O'Connor42c38cf2016-04-05 17:05:57 -07004
Brian O'Connorbe95f682016-05-18 15:40:19 -07005export_file (
Brian O'Connor42c38cf2016-04-05 17:05:57 -07006 name = 'checkstyle-xml',
Brian O'Connorbe95f682016-05-18 15:40:19 -07007 src = checkstyle_source,
8 visibility = [ 'PUBLIC' ],
Brian O'Connor42c38cf2016-04-05 17:05:57 -07009)
10
Brian O'Connorbe95f682016-05-18 15:40:19 -070011export_file (
Brian O'Connor4847ea32016-04-29 16:33:06 -070012 name = 'suppressions-xml',
Brian O'Connor42c38cf2016-04-05 17:05:57 -070013 src = suppression_source,
Brian O'Connorbe95f682016-05-18 15:40:19 -070014 visibility = [ 'PUBLIC' ],
Brian O'Connor42c38cf2016-04-05 17:05:57 -070015)
Brian O'Connorbe95f682016-05-18 15:40:19 -070016
17export_file (
Ray Milkey85267002016-11-16 11:06:35 -080018 name = 'onos-java-header',
19 src = header_source,
20 visibility = [ 'PUBLIC' ],
21)
22
23export_file (
Thomas Vachuska275d2e82016-07-14 17:41:34 -070024 name = 'start-buck-daemon',
Brian O'Connorbe95f682016-05-18 15:40:19 -070025 visibility = [ 'PUBLIC' ],
26)
27
28COMPILE = [
29 '//lib:guava',
30 '//lib:checkstyle',
31]
32
33RUN = [
34 '//lib:commons-logging',
35 '//lib:commons-beanutils',
36 '//lib:commons-lang3',
37 '//lib:commons-collections',
38 '//lib:antlr',
39]
40
41java_library (
42 name = 'checkstyle',
43 srcs = glob([ 'src/main/java/**/*.java' ]),
44 deps = COMPILE,
45)
46
47java_binary (
Thomas Vachuska275d2e82016-07-14 17:41:34 -070048 name = 'buck-daemon-jar',
Brian O'Connorbe95f682016-05-18 15:40:19 -070049 deps = [ ':checkstyle' ] + RUN,
Thomas Vachuska275d2e82016-07-14 17:41:34 -070050 main_class = 'org.onosproject.buckdaemon.BuckDaemon',
Brian O'Connorbe95f682016-05-18 15:40:19 -070051 blacklist = [ 'META-INF/.*' ],
52 visibility = [ 'PUBLIC' ],
53)
54
55# cmd = '#!/bin/bash\n'
56# cmd += '$1 &>/dev/null < /dev/null &'
57#
58# genrule(
59# name = 'checkstyle-sh',
60# bash = "echo '%s' > $OUT && chmod +x $OUT" % cmd,
61# out = 'checkstyle.sh',
62# )
63#
64# sh_test(
65# name = 'checkstyle-runner',
66# test = ':checkstyle-sh',
67# args = [
68# '$(exe :checkstyle-jar)',
69# '$(location //lib:checkstyle)',
70# '$(location //tools/build/conf:checkstyle-xml)',
71# '`mktemp /tmp/%s-checkstyle-XXXXXX`',
72# ],
73# labels = [ 'checkstyle' ],
74# visibility = [ 'PUBLIC' ],
Ray Milkey85267002016-11-16 11:06:35 -080075# )