File: BUILD.bazel

package info (click to toggle)
chromium 139.0.7258.127-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 6,122,156 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (98 lines) | stat: -rw-r--r-- 2,501 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
load("@bazel_skylib//rules:build_test.bzl", "build_test")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("//bazel/toolchains:proto_lang_toolchain.bzl", "proto_lang_toolchain")
load("//conformance:defs.bzl", "conformance_test")
load("//java/internal:testing.bzl", "junit_tests")

exports_files(
    ["lite.awk"],
    visibility = ["//java/core:__pkg__"],
)

exports_files(
    ["pom_template.xml"],
    visibility = ["//java/core:__pkg__"],
)

alias(
    name = "lite",
    actual = "//java/core:lite",
    visibility = ["//visibility:public"],
)

proto_lang_toolchain(
    name = "toolchain",
    # keep this in sync w/ LITE_WELL_KNOWN_PROTO_MAP in //:BUILD
    blacklisted_protos = [
        "//:java_features_proto",
        "//:any_proto",
        "//:api_proto",
        "//:duration_proto",
        "//:empty_proto",
        "//:field_mask_proto",
        "//:source_context_proto",
        "//:struct_proto",
        "//:timestamp_proto",
        "//:type_proto",
        "//:wrappers_proto",
    ],
    command_line = "--java_out=lite:$(OUT)",
    runtime = ":lite",
    visibility = ["//visibility:public"],
)

test_suite(
    name = "tests",
    tests = [
        "conformance_test",
        "lite_build_test",
        "lite_tests",
        "//java/core:lite_tests",
    ],
)

build_test(
    name = "lite_build_test",
    targets = [
        ":lite",
    ],
)

conformance_test(
    name = "conformance_test",
    failure_list = "//conformance:failure_list_java_lite.txt",
    maximum_edition = "2023",
    testee = "//conformance:conformance_java_lite",
    text_format_failure_list = "//conformance:text_format_failure_list_java_lite.txt",
)

junit_tests(
    name = "lite_tests",
    size = "small",
    srcs = glob(["src/test/**/*.java"]),
    deps = [
        ":lite",
        "//java/core:generic_test_protos_java_proto_lite",
        "//java/core:java_test_protos_java_proto_lite",
        "//java/core:lite_test_protos_java_proto_lite",
        "//java/core:test_util_lite",
        "@protobuf_maven_dev//:com_google_truth_truth",
        "@protobuf_maven_dev//:junit_junit",
    ],
)

pkg_files(
    name = "dist_files",
    srcs = glob([
        "**/*.java",
    ]) + [
        "BUILD.bazel",
        "generate-sources-build.xml",
        "generate-test-sources-build.xml",
        "lite.awk",
        "pom_template.xml",
        "process-lite-sources-build.xml",
    ],
    strip_prefix = strip_prefix.from_root(""),
    visibility = ["//java:__pkg__"],
)