blob: 7644c70c6d880cb65fcde2fa44c918f5ee590627 [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'
3
Brian O'Connorbe95f682016-05-18 15:40:19 -07004export_file (
Brian O'Connor42c38cf2016-04-05 17:05:57 -07005 name = 'checkstyle-xml',
Brian O'Connorbe95f682016-05-18 15:40:19 -07006 src = checkstyle_source,
7 visibility = [ 'PUBLIC' ],
Brian O'Connor42c38cf2016-04-05 17:05:57 -07008)
9
Brian O'Connorbe95f682016-05-18 15:40:19 -070010export_file (
Brian O'Connor4847ea32016-04-29 16:33:06 -070011 name = 'suppressions-xml',
Brian O'Connor42c38cf2016-04-05 17:05:57 -070012 src = suppression_source,
Brian O'Connorbe95f682016-05-18 15:40:19 -070013 visibility = [ 'PUBLIC' ],
Brian O'Connor42c38cf2016-04-05 17:05:57 -070014)
Brian O'Connorbe95f682016-05-18 15:40:19 -070015
16export_file (
Thomas Vachuska275d2e82016-07-14 17:41:34 -070017 name = 'start-buck-daemon',
Brian O'Connorbe95f682016-05-18 15:40:19 -070018 visibility = [ 'PUBLIC' ],
19)
20
21COMPILE = [
22 '//lib:guava',
23 '//lib:checkstyle',
24]
25
26RUN = [
27 '//lib:commons-logging',
28 '//lib:commons-beanutils',
29 '//lib:commons-lang3',
30 '//lib:commons-collections',
31 '//lib:antlr',
32]
33
34java_library (
35 name = 'checkstyle',
36 srcs = glob([ 'src/main/java/**/*.java' ]),
37 deps = COMPILE,
38)
39
40java_binary (
Thomas Vachuska275d2e82016-07-14 17:41:34 -070041 name = 'buck-daemon-jar',
Brian O'Connorbe95f682016-05-18 15:40:19 -070042 deps = [ ':checkstyle' ] + RUN,
Thomas Vachuska275d2e82016-07-14 17:41:34 -070043 main_class = 'org.onosproject.buckdaemon.BuckDaemon',
Brian O'Connorbe95f682016-05-18 15:40:19 -070044 blacklist = [ 'META-INF/.*' ],
45 visibility = [ 'PUBLIC' ],
46)
47
48# cmd = '#!/bin/bash\n'
49# cmd += '$1 &>/dev/null < /dev/null &'
50#
51# genrule(
52# name = 'checkstyle-sh',
53# bash = "echo '%s' > $OUT && chmod +x $OUT" % cmd,
54# out = 'checkstyle.sh',
55# )
56#
57# sh_test(
58# name = 'checkstyle-runner',
59# test = ':checkstyle-sh',
60# args = [
61# '$(exe :checkstyle-jar)',
62# '$(location //lib:checkstyle)',
63# '$(location //tools/build/conf:checkstyle-xml)',
64# '`mktemp /tmp/%s-checkstyle-XXXXXX`',
65# ],
66# labels = [ 'checkstyle' ],
67# visibility = [ 'PUBLIC' ],
68# )