我按以下方式构建了我的代码:
BUCK
component A
src
test
BUCK
component B
src
test
BUCK
请参阅此处的示例。
每个组件的 BUCK 文件如下所示:
java_library(
name = 'selendroid-standalone',
srcs = glob(['src/**/*.java']),
visibility = [ 'PUBLIC' ],
deps = [
...
],
resources = [
'//apps/selendroid-server-apk:selendroid-server-apk',
],
)
java_test(
name = 'selendroid-standalone-tests',
srcs = glob(['test/**/*.java']),
deps = [
...
],
)
java_binary(
name = 'selendroid-standalone-bin',
deps = [
':selendroid-standalone',
],
)
project_config(
src_target = ':selendroid-standalone',
src_roots = [ 'src' ],
test_target = ':selendroid-standalone-tests',
test_roots = ['test','test-resources'],
)
我希望能够做到:
$ buck build selendroid # This should build everything
$ buck test selendroid # This should test everything
我的问题是:顶级BUCK
文件应该是什么样的?