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 = [ |
Carmelo Cascone | 72893b7 | 2018-08-09 00:59:06 -0700 | [diff] [blame] | 29 | '//lib:com_google_guava_guava', |
Brian O'Connor | be95f68 | 2016-05-18 15:40:19 -0700 | [diff] [blame] | 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 | |
Ray Milkey | 2d572dd | 2017-04-14 10:01:24 -0700 | [diff] [blame] | 55 | osgi_jar ( |
| 56 | name = 'onos-build-conf', |
| 57 | srcs = [], |
| 58 | deps = [ ':checkstyle' ] + RUN, |
| 59 | ) |
| 60 | |
Brian O'Connor | be95f68 | 2016-05-18 15:40:19 -0700 | [diff] [blame] | 61 | # cmd = '#!/bin/bash\n' |
| 62 | # cmd += '$1 &>/dev/null < /dev/null &' |
| 63 | # |
| 64 | # genrule( |
| 65 | # name = 'checkstyle-sh', |
| 66 | # bash = "echo '%s' > $OUT && chmod +x $OUT" % cmd, |
| 67 | # out = 'checkstyle.sh', |
| 68 | # ) |
| 69 | # |
| 70 | # sh_test( |
| 71 | # name = 'checkstyle-runner', |
| 72 | # test = ':checkstyle-sh', |
| 73 | # args = [ |
| 74 | # '$(exe :checkstyle-jar)', |
| 75 | # '$(location //lib:checkstyle)', |
| 76 | # '$(location //tools/build/conf:checkstyle-xml)', |
| 77 | # '`mktemp /tmp/%s-checkstyle-XXXXXX`', |
| 78 | # ], |
| 79 | # labels = [ 'checkstyle' ], |
| 80 | # visibility = [ 'PUBLIC' ], |
Ray Milkey | 8526700 | 2016-11-16 11:06:35 -0800 | [diff] [blame] | 81 | # ) |