blob: 03581c2d5948be5203ddfa07bbb2a5d22b6e6d40 [file] [log] [blame]
checkstyle_source = 'src/main/resources/onos/checkstyle.xml'
suppression_source = 'src/main/resources/onos/suppressions.xml'
header_source = 'src/main/resources/onos/onos-java.header'
export_file (
name = 'checkstyle-xml',
src = checkstyle_source,
visibility = [ 'PUBLIC' ],
)
export_file (
name = 'suppressions-xml',
src = suppression_source,
visibility = [ 'PUBLIC' ],
)
export_file (
name = 'onos-java-header',
src = header_source,
visibility = [ 'PUBLIC' ],
)
export_file (
name = 'start-buck-daemon',
visibility = [ 'PUBLIC' ],
)
COMPILE = [
'//lib:guava',
'//lib:checkstyle',
]
RUN = [
'//lib:commons-logging',
'//lib:commons-beanutils',
'//lib:commons-lang3',
'//lib:commons-collections',
'//lib:antlr',
]
java_library (
name = 'checkstyle',
srcs = glob([ 'src/main/java/**/*.java' ]),
deps = COMPILE,
)
java_binary (
name = 'buck-daemon-jar',
deps = [ ':checkstyle' ] + RUN,
main_class = 'org.onosproject.buckdaemon.BuckDaemon',
blacklist = [ 'META-INF/.*' ],
visibility = [ 'PUBLIC' ],
)
osgi_jar (
name = 'onos-build-conf',
srcs = [],
deps = [ ':checkstyle' ] + RUN,
)
# cmd = '#!/bin/bash\n'
# cmd += '$1 &>/dev/null < /dev/null &'
#
# genrule(
# name = 'checkstyle-sh',
# bash = "echo '%s' > $OUT && chmod +x $OUT" % cmd,
# out = 'checkstyle.sh',
# )
#
# sh_test(
# name = 'checkstyle-runner',
# test = ':checkstyle-sh',
# args = [
# '$(exe :checkstyle-jar)',
# '$(location //lib:checkstyle)',
# '$(location //tools/build/conf:checkstyle-xml)',
# '`mktemp /tmp/%s-checkstyle-XXXXXX`',
# ],
# labels = [ 'checkstyle' ],
# visibility = [ 'PUBLIC' ],
# )