BUILD 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. load("@bazel_skylib//rules:build_test.bzl", "build_test")
  2. load("@rules_proto//proto:defs.bzl", "proto_lang_toolchain")
  3. load("//:internal.bzl", "conformance_test")
  4. load("//java/internal:testing.bzl", "junit_tests")
  5. exports_files(
  6. ["lite.awk"],
  7. visibility = ["//java/core:__pkg__"],
  8. )
  9. exports_files(
  10. ["pom_template.xml"],
  11. visibility = ["//java/core:__pkg__"],
  12. )
  13. alias(
  14. name = "lite",
  15. actual = "//java/core:lite",
  16. visibility = ["//visibility:public"],
  17. )
  18. proto_lang_toolchain(
  19. name = "toolchain",
  20. command_line = "--java_out=lite:$(OUT)",
  21. runtime = ":lite",
  22. visibility = ["//visibility:public"],
  23. )
  24. test_suite(
  25. name = "tests",
  26. tests = [
  27. "conformance_test",
  28. "lite_build_test",
  29. "lite_tests",
  30. "//java/core:lite_tests",
  31. ],
  32. )
  33. build_test(
  34. name = "lite_build_test",
  35. targets = [
  36. ":lite",
  37. ],
  38. )
  39. conformance_test(
  40. name = "conformance_test",
  41. failure_list = "//:conformance/failure_list_java_lite.txt",
  42. testee = "//:conformance_java_lite",
  43. text_format_failure_list = "//:conformance/text_format_failure_list_java_lite.txt",
  44. )
  45. junit_tests(
  46. name = "lite_tests",
  47. size = "small",
  48. srcs = glob(["src/test/**/*.java"]),
  49. deps = [
  50. ":lite",
  51. "//java/core:generic_test_protos_java_proto_lite",
  52. "//java/core:java_test_protos_java_proto_lite",
  53. "//java/core:test_util_lite",
  54. "@maven//:com_google_truth_truth",
  55. "@maven//:junit_junit",
  56. ],
  57. )