xref: /aosp_15_r20/external/grpc-grpc-java/examples/example-tls/BUILD.bazel (revision e07d83d3ffcef9ecfc9f7f475418ec639ff0e5fe)
1*e07d83d3SAndroid Build Coastguard Workerload("@rules_proto//proto:defs.bzl", "proto_library")
2*e07d83d3SAndroid Build Coastguard Workerload("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
3*e07d83d3SAndroid Build Coastguard Worker
4*e07d83d3SAndroid Build Coastguard Workerproto_library(
5*e07d83d3SAndroid Build Coastguard Worker    name = "helloworld_proto",
6*e07d83d3SAndroid Build Coastguard Worker    srcs = ["src/main/proto/helloworld/helloworld.proto"],
7*e07d83d3SAndroid Build Coastguard Worker)
8*e07d83d3SAndroid Build Coastguard Worker
9*e07d83d3SAndroid Build Coastguard Workerjava_proto_library(
10*e07d83d3SAndroid Build Coastguard Worker    name = "helloworld_java_proto",
11*e07d83d3SAndroid Build Coastguard Worker    deps = [":helloworld_proto"],
12*e07d83d3SAndroid Build Coastguard Worker)
13*e07d83d3SAndroid Build Coastguard Worker
14*e07d83d3SAndroid Build Coastguard Workerjava_grpc_library(
15*e07d83d3SAndroid Build Coastguard Worker    name = "helloworld_java_grpc",
16*e07d83d3SAndroid Build Coastguard Worker    srcs = [":helloworld_proto"],
17*e07d83d3SAndroid Build Coastguard Worker    deps = [":helloworld_java_proto"],
18*e07d83d3SAndroid Build Coastguard Worker)
19*e07d83d3SAndroid Build Coastguard Worker
20*e07d83d3SAndroid Build Coastguard Workerjava_library(
21*e07d83d3SAndroid Build Coastguard Worker    name = "example-tls",
22*e07d83d3SAndroid Build Coastguard Worker    testonly = 1,
23*e07d83d3SAndroid Build Coastguard Worker    srcs = glob(
24*e07d83d3SAndroid Build Coastguard Worker        ["src/main/java/**/*.java"],
25*e07d83d3SAndroid Build Coastguard Worker    ),
26*e07d83d3SAndroid Build Coastguard Worker    runtime_deps = [
27*e07d83d3SAndroid Build Coastguard Worker        "@maven//:io_netty_netty_tcnative_boringssl_static",
28*e07d83d3SAndroid Build Coastguard Worker        "@maven//:io_netty_netty_tcnative_classes",
29*e07d83d3SAndroid Build Coastguard Worker    ],
30*e07d83d3SAndroid Build Coastguard Worker    deps = [
31*e07d83d3SAndroid Build Coastguard Worker        ":helloworld_java_grpc",
32*e07d83d3SAndroid Build Coastguard Worker        ":helloworld_java_proto",
33*e07d83d3SAndroid Build Coastguard Worker        "@io_grpc_grpc_java//api",
34*e07d83d3SAndroid Build Coastguard Worker        "@io_grpc_grpc_java//netty",
35*e07d83d3SAndroid Build Coastguard Worker        "@io_grpc_grpc_java//protobuf",
36*e07d83d3SAndroid Build Coastguard Worker        "@io_grpc_grpc_java//stub",
37*e07d83d3SAndroid Build Coastguard Worker        "@maven//:io_netty_netty_handler",
38*e07d83d3SAndroid Build Coastguard Worker    ],
39*e07d83d3SAndroid Build Coastguard Worker)
40*e07d83d3SAndroid Build Coastguard Worker
41*e07d83d3SAndroid Build Coastguard Workerjava_binary(
42*e07d83d3SAndroid Build Coastguard Worker    name = "hello-world-tls-client",
43*e07d83d3SAndroid Build Coastguard Worker    testonly = 1,
44*e07d83d3SAndroid Build Coastguard Worker    main_class = "io.grpc.examples.helloworldtls.HelloWorldClientTls",
45*e07d83d3SAndroid Build Coastguard Worker    runtime_deps = [
46*e07d83d3SAndroid Build Coastguard Worker        ":example-tls",
47*e07d83d3SAndroid Build Coastguard Worker    ],
48*e07d83d3SAndroid Build Coastguard Worker)
49*e07d83d3SAndroid Build Coastguard Worker
50*e07d83d3SAndroid Build Coastguard Workerjava_binary(
51*e07d83d3SAndroid Build Coastguard Worker    name = "hello-world-tls-server",
52*e07d83d3SAndroid Build Coastguard Worker    testonly = 1,
53*e07d83d3SAndroid Build Coastguard Worker    main_class = "io.grpc.examples.helloworldtls.HelloWorldServerTls",
54*e07d83d3SAndroid Build Coastguard Worker    runtime_deps = [
55*e07d83d3SAndroid Build Coastguard Worker        ":example-tls",
56*e07d83d3SAndroid Build Coastguard Worker    ],
57*e07d83d3SAndroid Build Coastguard Worker)
58