xref: /aosp_15_r20/external/federated-compute/fcp/client/http/java/BUILD (revision 14675a029014e728ec732f129a32e299b2da0601)
1# Copyright 2022 Google LLC
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15default_visibility = [
16    "//fcp:internal",
17]
18
19package(
20    default_visibility = default_visibility,
21    licenses = ["notice"],  # Apache 2.0
22)
23
24# --------------------------------------------------------------------
25
26# The protos used to pass data across the JNI boundary.
27proto_library(
28    name = "jni_proto",
29    srcs = ["jni.proto"],
30)
31
32java_proto_library(
33    name = "jni_java_proto",
34    deps = [":jni_proto"],
35)
36
37cc_proto_library(
38    name = "jni_cc_proto",
39    deps = [":jni_proto"],
40)
41
42cc_library(
43    name = "java_http_client",
44    srcs = ["java_http_client.cc"],
45    hdrs = ["java_http_client.h"],
46    deps = [
47        ":jni_cc_proto",
48        "//fcp/base",
49        "//fcp/client/http:http_client",
50        "//fcp/client/http:http_client_util",
51        "//fcp/jni:jni_util",
52        "@bazel_tools//tools/jdk:jni",
53        "@com_google_absl//absl/base:core_headers",
54        "@com_google_absl//absl/cleanup",
55        "@com_google_absl//absl/status",
56        "@com_google_absl//absl/status:statusor",
57        "@com_google_absl//absl/strings",
58        "@com_google_absl//absl/synchronization",
59        "@com_google_googleapis//google/rpc:status_cc_proto",
60    ],
61    alwayslink = 1,
62)
63