BUILD 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. load("@rules_java//java:defs.bzl", "java_library", "java_proto_library")
  2. load("@rules_proto//proto:defs.bzl", "proto_library")
  3. load("//java/internal:testing.bzl", "junit_tests")
  4. java_library(
  5. name = "util",
  6. srcs = glob([
  7. "src/main/java/com/google/protobuf/util/*.java",
  8. ]),
  9. visibility = ["//visibility:public"],
  10. deps = [
  11. "//external:error_prone_annotations",
  12. "//external:gson",
  13. "//external:guava",
  14. "//java/core",
  15. "//java/lite",
  16. ],
  17. )
  18. proto_library(
  19. name = "test_protos",
  20. srcs = glob(["src/test/proto/**/*.proto"]),
  21. deps = [
  22. "//:any_proto",
  23. "//:duration_proto",
  24. "//:field_mask_proto",
  25. "//:struct_proto",
  26. "//:timestamp_proto",
  27. "//:wrappers_proto",
  28. ],
  29. )
  30. java_proto_library(
  31. name = "test_protos_java_proto",
  32. deps = [":test_protos"],
  33. )
  34. junit_tests(
  35. name = "tests",
  36. srcs = glob(["src/test/java/**/*.java"]),
  37. package_name = "com.google.protobuf.util",
  38. deps = [
  39. ":test_protos_java_proto",
  40. ":util",
  41. "//external:guava",
  42. "//external:junit",
  43. "//external:truth",
  44. "//java/core",
  45. "//java/core:generic_test_protos_java_proto",
  46. ],
  47. )