Brian O'Connor | 42c38cf | 2016-04-05 17:05:57 -0700 | [diff] [blame] | 1 | checkstyle_source = 'src/main/resources/onos/checkstyle.xml' |
| 2 | suppression_source = 'src/main/resources/onos/suppressions.xml' |
Ray Milkey | 8526700 | 2016-11-16 11:06:35 -0800 | [diff] [blame^] | 3 | header_source = 'src/main/resources/onos/onos-java.header' |
Brian O'Connor | 42c38cf | 2016-04-05 17:05:57 -0700 | [diff] [blame] | 4 | |
Brian O'Connor | be95f68 | 2016-05-18 15:40:19 -0700 | [diff] [blame] | 5 | export_file ( |
Brian O'Connor | 42c38cf | 2016-04-05 17:05:57 -0700 | [diff] [blame] | 6 | name = 'checkstyle-xml', |
Brian O'Connor | be95f68 | 2016-05-18 15:40:19 -0700 | [diff] [blame] | 7 | src = checkstyle_source, |
| 8 | visibility = [ 'PUBLIC' ], |
Brian O'Connor | 42c38cf | 2016-04-05 17:05:57 -0700 | [diff] [blame] | 9 | ) |
| 10 | |
Brian O'Connor | be95f68 | 2016-05-18 15:40:19 -0700 | [diff] [blame] | 11 | export_file ( |
Brian O'Connor | 4847ea3 | 2016-04-29 16:33:06 -0700 | [diff] [blame] | 12 | name = 'suppressions-xml', |
Brian O'Connor | 42c38cf | 2016-04-05 17:05:57 -0700 | [diff] [blame] | 13 | src = suppression_source, |
Brian O'Connor | be95f68 | 2016-05-18 15:40:19 -0700 | [diff] [blame] | 14 | visibility = [ 'PUBLIC' ], |
Brian O'Connor | 42c38cf | 2016-04-05 17:05:57 -0700 | [diff] [blame] | 15 | ) |
Brian O'Connor | be95f68 | 2016-05-18 15:40:19 -0700 | [diff] [blame] | 16 | |
| 17 | export_file ( |
Ray Milkey | 8526700 | 2016-11-16 11:06:35 -0800 | [diff] [blame^] | 18 | name = 'onos-java-header', |
| 19 | src = header_source, |
| 20 | visibility = [ 'PUBLIC' ], |
| 21 | ) |
| 22 | |
| 23 | export_file ( |
Thomas Vachuska | 275d2e8 | 2016-07-14 17:41:34 -0700 | [diff] [blame] | 24 | name = 'start-buck-daemon', |
Brian O'Connor | be95f68 | 2016-05-18 15:40:19 -0700 | [diff] [blame] | 25 | visibility = [ 'PUBLIC' ], |
| 26 | ) |
| 27 | |
| 28 | COMPILE = [ |
| 29 | '//lib:guava', |
| 30 | '//lib:checkstyle', |
| 31 | ] |
| 32 | |
| 33 | RUN = [ |
| 34 | '//lib:commons-logging', |
| 35 | '//lib:commons-beanutils', |
| 36 | '//lib:commons-lang3', |
| 37 | '//lib:commons-collections', |
| 38 | '//lib:antlr', |
| 39 | ] |
| 40 | |
| 41 | java_library ( |
| 42 | name = 'checkstyle', |
| 43 | srcs = glob([ 'src/main/java/**/*.java' ]), |
| 44 | deps = COMPILE, |
| 45 | ) |
| 46 | |
| 47 | java_binary ( |
Thomas Vachuska | 275d2e8 | 2016-07-14 17:41:34 -0700 | [diff] [blame] | 48 | name = 'buck-daemon-jar', |
Brian O'Connor | be95f68 | 2016-05-18 15:40:19 -0700 | [diff] [blame] | 49 | deps = [ ':checkstyle' ] + RUN, |
Thomas Vachuska | 275d2e8 | 2016-07-14 17:41:34 -0700 | [diff] [blame] | 50 | main_class = 'org.onosproject.buckdaemon.BuckDaemon', |
Brian O'Connor | be95f68 | 2016-05-18 15:40:19 -0700 | [diff] [blame] | 51 | 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 Milkey | 8526700 | 2016-11-16 11:06:35 -0800 | [diff] [blame^] | 75 | # ) |