BUILD 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. package(default_visibility = ["//visibility:public"])
  2. load(
  3. "@io_bazel_rules_go//go:def.bzl",
  4. "go_binary",
  5. "go_test",
  6. "go_library",
  7. )
  8. go_binary(
  9. name = "protoc-gen-liverpc",
  10. embed = [":go_default_library"],
  11. tags = ["automanaged"],
  12. )
  13. go_test(
  14. name = "go_default_test",
  15. srcs = [
  16. "command_line_test.go",
  17. "generator_test.go",
  18. ],
  19. embed = [":go_default_library"],
  20. rundir = ".",
  21. tags = ["automanaged"],
  22. deps = [
  23. "@com_github_golang_protobuf//proto:go_default_library",
  24. "@com_github_golang_protobuf//protoc-gen-go/plugin:go_default_library",
  25. ],
  26. )
  27. go_library(
  28. name = "go_default_library",
  29. srcs = [
  30. "command_line.go",
  31. "generator.go",
  32. "go_naming.go",
  33. "main.go",
  34. ],
  35. importpath = "go-common/app/tool/liverpc/protoc-gen-liverpc",
  36. tags = ["automanaged"],
  37. visibility = ["//visibility:public"],
  38. deps = [
  39. "//app/tool/liverpc/protoc-gen-liverpc/gen:go_default_library",
  40. "//app/tool/liverpc/protoc-gen-liverpc/gen/stringutils:go_default_library",
  41. "//app/tool/liverpc/protoc-gen-liverpc/gen/typemap:go_default_library",
  42. "//vendor/github.com/pkg/errors:go_default_library",
  43. "@com_github_golang_protobuf//proto:go_default_library",
  44. "@com_github_golang_protobuf//protoc-gen-go/descriptor:go_default_library",
  45. "@com_github_golang_protobuf//protoc-gen-go/plugin:go_default_library",
  46. ],
  47. )
  48. filegroup(
  49. name = "package-srcs",
  50. srcs = glob(["**"]),
  51. tags = ["automanaged"],
  52. visibility = ["//visibility:private"],
  53. )
  54. filegroup(
  55. name = "all-srcs",
  56. srcs = [
  57. ":package-srcs",
  58. "//app/tool/liverpc/protoc-gen-liverpc/gen:all-srcs",
  59. ],
  60. tags = ["automanaged"],
  61. visibility = ["//visibility:public"],
  62. )