BUILD 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. proto_library(
  11. name = "model_proto",
  12. srcs = ["dm.proto"],
  13. tags = ["automanaged"],
  14. deps = ["@gogo_special_proto//github.com/gogo/protobuf/gogoproto"],
  15. )
  16. go_proto_library(
  17. name = "model_go_proto",
  18. compilers = ["@io_bazel_rules_go//proto:gogofast_proto"],
  19. importpath = "go-common/app/interface/main/dm2/model",
  20. proto = ":model_proto",
  21. tags = ["automanaged"],
  22. deps = [
  23. "//library/time:go_default_library",
  24. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  25. ],
  26. )
  27. go_library(
  28. name = "go_default_library",
  29. srcs = [
  30. "action.go",
  31. "advance.go",
  32. "advert.go",
  33. "bangumi.go",
  34. "dm.go",
  35. "dm_seg.go",
  36. "dm_special_location.go",
  37. "filter.go",
  38. "history.go",
  39. "mask.go",
  40. "member.go",
  41. "params.go",
  42. "rpc.go",
  43. "subject.go",
  44. "subtitle.go",
  45. "thumbup.go",
  46. "ugcpay.go",
  47. "view.go",
  48. "workflow.go",
  49. ],
  50. embed = [":model_go_proto"],
  51. importpath = "go-common/app/interface/main/dm2/model",
  52. tags = ["automanaged"],
  53. visibility = ["//visibility:public"],
  54. deps = [
  55. "//app/interface/main/dm2/model/oplog:go_default_library",
  56. "//library/ecode:go_default_library",
  57. "//library/time:go_default_library",
  58. "//library/xstr:go_default_library",
  59. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  60. "@com_github_gogo_protobuf//proto:go_default_library",
  61. ],
  62. )
  63. filegroup(
  64. name = "package-srcs",
  65. srcs = glob(["**"]),
  66. tags = ["automanaged"],
  67. visibility = ["//visibility:private"],
  68. )
  69. filegroup(
  70. name = "all-srcs",
  71. srcs = [
  72. ":package-srcs",
  73. "//app/interface/main/dm2/model/oplog:all-srcs",
  74. ],
  75. tags = ["automanaged"],
  76. visibility = ["//visibility:public"],
  77. )