BUILD 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. package(default_visibility = ["//visibility:public"])
  2. load(
  3. "@io_bazel_rules_go//proto:def.bzl",
  4. "go_proto_library",
  5. )
  6. load(
  7. "@io_bazel_rules_go//go:def.bzl",
  8. "go_library",
  9. )
  10. go_library(
  11. name = "go_default_library",
  12. srcs = [
  13. "bangumi.go",
  14. "feed.go",
  15. "rpc.go",
  16. ],
  17. embed = [":model_go_proto"],
  18. importpath = "go-common/app/service/main/feed/model",
  19. tags = ["automanaged"],
  20. deps = [
  21. "//app/interface/openplatform/article/model:go_default_library",
  22. "//app/service/main/archive/api:go_default_library",
  23. "//app/service/main/archive/model/archive:go_default_library",
  24. "//library/time:go_default_library",
  25. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  26. "@com_github_golang_protobuf//proto:go_default_library",
  27. ],
  28. )
  29. proto_library(
  30. name = "model_proto",
  31. srcs = ["feed.proto"],
  32. tags = ["automanaged"],
  33. visibility = ["//visibility:public"],
  34. deps = ["@gogo_special_proto//github.com/gogo/protobuf/gogoproto"],
  35. )
  36. go_proto_library(
  37. name = "model_go_proto",
  38. compilers = ["@io_bazel_rules_go//proto:gogofast_proto"],
  39. importpath = "go-common/app/service/main/feed/model",
  40. proto = ":model_proto",
  41. tags = ["automanaged"],
  42. visibility = ["//visibility:public"],
  43. deps = ["@com_github_gogo_protobuf//gogoproto:go_default_library"],
  44. )
  45. filegroup(
  46. name = "package-srcs",
  47. srcs = glob(["**"]),
  48. tags = ["automanaged"],
  49. visibility = ["//visibility:private"],
  50. )
  51. filegroup(
  52. name = "all-srcs",
  53. srcs = [":package-srcs"],
  54. tags = ["automanaged"],
  55. visibility = ["//visibility:public"],
  56. )