xref: /aosp_15_r20/external/grpc-grpc-java/protobuf-lite/BUILD.bazel (revision e07d83d3ffcef9ecfc9f7f475418ec639ff0e5fe)
1java_library(
2    name = "protobuf-lite",
3    srcs = glob([
4        "src/main/java/**/*.java",
5    ]),
6    visibility = ["//visibility:public"],
7    deps = [
8        "//api",
9        "@com_google_code_findbugs_jsr305//jar",
10        "@com_google_guava_guava//jar",
11        "@com_google_j2objc_j2objc_annotations//jar",
12    ] + select({
13        ":android": ["@com_google_protobuf_javalite//:protobuf_javalite"],
14        "//conditions:default": ["@com_google_protobuf//:protobuf_java"],
15    }),
16)
17
18# This config is not fully-reliable. If it breaks, it is probably because you
19# are changing --android_crosstool_top. Instead of doing that, you can bind
20# your own toolchain on top of the default android/crosstool, as mentioned at
21# https://github.com/bazelbuild/bazel/issues/3924#issuecomment-338704582
22config_setting(
23    name = "android",
24    values = {
25        "crosstool_top": "//external:android/crosstool",
26    },
27)
28