Ray Milkey | f80bbb2 | 2016-03-11 10:16:22 -0800 | [diff] [blame] | 1 | SRC = 'src/main/java/org/onlab/**/' |
| 2 | TEST = 'src/test/java/org/onlab/**/' |
| 3 | CURRENT_NAME = 'onlab-misc' |
| 4 | CURRENT_TARGET = ':' + CURRENT_NAME |
| 5 | |
| 6 | COMPILE_DEPS = [ |
| 7 | '//lib:COMPILE', |
| 8 | ] |
| 9 | |
| 10 | TEST_DEPS = [ |
| 11 | '//lib:TEST', |
| 12 | ] |
| 13 | |
| 14 | java_library( |
| 15 | name = CURRENT_NAME, |
| 16 | srcs = glob([SRC + '/*.java']), |
| 17 | deps = COMPILE_DEPS, |
| 18 | visibility = ['PUBLIC'], |
| 19 | ) |
| 20 | |
| 21 | java_test( |
| 22 | name = 'tests', |
| 23 | srcs = glob([TEST + '/*.java']), |
| 24 | deps = COMPILE_DEPS + |
| 25 | TEST_DEPS + |
| 26 | [CURRENT_TARGET], |
| 27 | source_under_test = [CURRENT_TARGET], |
| 28 | ) |