dependency_imports.bzl 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
  2. load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
  3. load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
  4. load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
  5. load("@com_envoyproxy_protoc_gen_validate//bazel:repositories.bzl", "pgv_dependencies")
  6. # go version for rules_go
  7. GO_VERSION = "1.16.6"
  8. def xds_dependency_imports(go_version = GO_VERSION):
  9. protobuf_deps()
  10. go_rules_dependencies()
  11. go_register_toolchains(go_version)
  12. gazelle_dependencies()
  13. pgv_dependencies()
  14. switched_rules_by_language(
  15. name = "com_google_googleapis_imports",
  16. cc = True,
  17. go = True,
  18. grpc = True,
  19. rules_override = {
  20. "py_proto_library": "@com_github_cncf_xds//bazel:api_build_system.bzl",
  21. },
  22. )
  23. go_repository(
  24. name = "com_github_iancoleman_strcase",
  25. importpath = "github.com/iancoleman/strcase",
  26. sum = "h1:ux/56T2xqZO/3cP1I2F86qpeoYPCOzk+KF/UH/Ar+lk=",
  27. version = "v0.0.0-20180726023541-3605ed457bf7",
  28. )
  29. go_repository(
  30. name = "com_github_spf13_afero",
  31. importpath = "github.com/spf13/afero",
  32. sum = "h1:8q6vk3hthlpb2SouZcnBVKboxWQWMDNF38bwholZrJc=",
  33. version = "v1.3.4",
  34. )
  35. go_repository(
  36. name = "com_github_lyft_protoc_gen_star",
  37. importpath = "github.com/lyft/protoc-gen-star",
  38. sum = "h1:sImehRT+p7lW9n6R7MQc5hVgzWGEkDVZU4AsBQ4Isu8=",
  39. version = "v0.5.1",
  40. )
  41. go_repository(
  42. name = "org_golang_google_grpc",
  43. build_file_proto_mode = "disable",
  44. importpath = "google.golang.org/grpc",
  45. sum = "h1:AGJ0Ih4mHjSeibYkFGh1dD9KJ/eOtZ93I6hoHhukQ5Q=",
  46. version = "v1.40.0",
  47. )
  48. # Old name for backward compatibility.
  49. # TODO(roth): Remove this once callers are migrated to the new name.
  50. def udpa_dependency_imports(go_version = GO_VERSION):
  51. xds_dependency_imports(go_version=go_version)