• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load("@bazel_skylib//rules:build_test.bzl", "build_test")
2load("@rules_proto//proto:defs.bzl", "proto_lang_toolchain")
3load("//:internal.bzl", "conformance_test")
4load("//java/internal:testing.bzl", "junit_tests")
5
6exports_files(
7    ["lite.awk"],
8    visibility = ["//java/core:__pkg__"],
9)
10
11exports_files(
12    ["pom_template.xml"],
13    visibility = ["//java/core:__pkg__"],
14)
15
16alias(
17    name = "lite",
18    actual = "//java/core:lite",
19    visibility = ["//visibility:public"],
20)
21
22proto_lang_toolchain(
23    name = "toolchain",
24    command_line = "--java_out=lite:$(OUT)",
25    runtime = ":lite",
26    visibility = ["//visibility:public"],
27    # keep this in sync w/ LITE_WELL_KNOWN_PROTO_MAP in //:BUILD
28    blacklisted_protos = [
29        "//:any_proto",
30        "//:api_proto",
31        "//:duration_proto",
32        "//:empty_proto",
33        "//:field_mask_proto",
34        "//:source_context_proto",
35        "//:struct_proto",
36        "//:timestamp_proto",
37        "//:type_proto",
38        "//:wrappers_proto",
39    ],
40)
41
42test_suite(
43    name = "tests",
44    tests = [
45        "conformance_test",
46        "lite_build_test",
47        "lite_tests",
48        "//java/core:lite_tests",
49    ],
50)
51
52build_test(
53    name = "lite_build_test",
54    targets = [
55        ":lite",
56    ],
57)
58
59conformance_test(
60    name = "conformance_test",
61    failure_list = "//:conformance/failure_list_java_lite.txt",
62    testee = "//:conformance_java_lite",
63    text_format_failure_list = "//:conformance/text_format_failure_list_java_lite.txt",
64)
65
66junit_tests(
67    name = "lite_tests",
68    size = "small",
69    srcs = glob(["src/test/**/*.java"]),
70    deps = [
71        ":lite",
72        "//java/core:generic_test_protos_java_proto_lite",
73        "//java/core:java_test_protos_java_proto_lite",
74        "//java/core:test_util_lite",
75        "@maven//:com_google_truth_truth",
76        "@maven//:junit_junit",
77    ],
78)
79