xref: /aosp_15_r20/external/grpc-grpc-java/services/Android.bp (revision e07d83d3ffcef9ecfc9f7f475418ec639ff0e5fe)
1// Copyright (C) 2024 The Android Open Source Project
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//
15
16package {
17    default_applicable_licenses: ["external_grpc-grpc-java_license"],
18}
19
20java_library_static {
21    name: "grpc-java-reflection-proto",
22    host_supported: true,
23    device_supported: false,
24    srcs: [
25        "src/main/proto/grpc/reflection/v1alpha/reflection.proto",
26    ],
27    proto: {
28        include_dirs: ["external/protobuf/src"],
29    },
30    visibility: ["//visibility:private"],
31    // b/267831518: Pin tradefed and dependencies to Java 11.
32    java_version: "11",
33    target: {
34        windows: {
35            enabled: true,
36        },
37    },
38}
39
40java_library_host {
41    name: "grpc-java-reflection",
42    srcs: [
43        "src/main/java/io/grpc/protobuf/services/ProtoReflectionService.java",
44        "src/main/proto/grpc/reflection/v1alpha/reflection.proto",
45    ],
46    proto: {
47        include_dirs: ["external/protobuf/src"],
48        plugin: "grpc-java-plugin",
49        output_params: ["lite"],
50    },
51    static_libs: [
52        "grpc-java-reflection-proto",
53    ],
54    libs: [
55        "grpc-java-api",
56        "grpc-java-core",
57        "grpc-java-context",
58        "grpc-java-protobuf",
59        "grpc-java-protobuf-lite",
60        "grpc-java-stub",
61        "guava",
62        "javax_annotation-api_1.3.2",
63        "jsr305",
64        "libprotobuf-java-util-full",
65    ],
66    // b/267831518: Pin tradefed and dependencies to Java 11.
67    java_version: "11",
68    target: {
69        windows: {
70            enabled: true,
71        },
72    },
73}
74