BUILD 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. load(
  2. "@io_bazel_rules_go//proto:def.bzl",
  3. "go_proto_library",
  4. )
  5. package(default_visibility = ["//visibility:public"])
  6. load(
  7. "@io_bazel_rules_go//go:def.bzl",
  8. "go_library",
  9. )
  10. go_library(
  11. name = "go_default_library",
  12. srcs = ["ecode.go"],
  13. embed = [":pb_go_proto"],
  14. importpath = "go-common/library/ecode/pb",
  15. tags = ["automanaged"],
  16. visibility = ["//visibility:public"],
  17. deps = [
  18. "//library/ecode:go_default_library",
  19. "@com_github_golang_protobuf//proto:go_default_library",
  20. "@io_bazel_rules_go//proto/wkt:any_go_proto",
  21. ],
  22. )
  23. filegroup(
  24. name = "package-srcs",
  25. srcs = glob(["**"]),
  26. tags = ["automanaged"],
  27. visibility = ["//visibility:private"],
  28. )
  29. filegroup(
  30. name = "all-srcs",
  31. srcs = [":package-srcs"],
  32. tags = ["automanaged"],
  33. visibility = ["//visibility:public"],
  34. )
  35. proto_library(
  36. name = "pb_proto",
  37. srcs = ["ecode.proto"],
  38. tags = ["automanaged"],
  39. deps = ["@com_google_protobuf//:any_proto"],
  40. )
  41. go_proto_library(
  42. name = "pb_go_proto",
  43. compilers = ["@io_bazel_rules_go//proto:go_proto"],
  44. importpath = "go-common/library/ecode/pb",
  45. proto = ":pb_proto",
  46. tags = ["automanaged"],
  47. deps = ["@io_bazel_rules_go//proto/wkt:any_go_proto"],
  48. )