• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2018 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    // See: http://go/android-license-faq
18    // A large-scale-change added 'default_applicable_licenses' to import
19    // all of the 'license_kinds' from "external_grpc-grpc-java_license"
20    // to get the below license kinds:
21    //   SPDX-license-identifier-Apache-2.0
22    default_applicable_licenses: ["external_grpc-grpc-java_license"],
23}
24
25java_library {
26    name: "grpc-java-core",
27    host_supported: true,
28    srcs: [
29        "src/main/java/io/grpc/*.java",
30    ],
31    java_resource_dirs: [
32        "src/main/resources",
33    ],
34    libs: [
35        "grpc-java-context",
36        "jsr305",
37        "guava",
38    ],
39    // b/267831518: Pin tradefed and dependencies to Java 11.
40    java_version: "11",
41    sdk_version: "current",
42    min_sdk_version: "30",
43    apex_available: [
44        "com.android.adservices",
45        "com.android.devicelock",
46        "com.android.extservices",
47    ],
48}
49
50java_library {
51    name: "grpc-java-core-inprocess",
52    host_supported: true,
53    srcs: [
54        "src/main/java/io/grpc/inprocess/*.java",
55    ],
56    libs: [
57        "grpc-java-core",
58        "grpc-java-core-internal",
59        "grpc-java-context",
60        "jsr305",
61        "guava",
62    ],
63    // b/267831518: Pin tradefed and dependencies to Java 11.
64    java_version: "11",
65    sdk_version: "current",
66}
67
68java_library {
69    name: "grpc-java-core-internal",
70    host_supported: true,
71    srcs: [
72        "src/main/java/io/grpc/internal/*.java",
73    ],
74    libs: [
75        "grpc-java-annotation-stubs",
76        "grpc-java-core",
77        "grpc-java-context",
78        "jsr305",
79        "gson",
80        "error_prone_annotations",
81        "guava",
82        "opencensus-java-api",
83        "opencensus-java-contrib-grpc-metrics",
84    ],
85    target: {
86
87        // For the Android variant, ignore this class since it is optional,
88        // uses javax APIs not available on Android, and is used reflectively
89        // so ignoring it does not affect the functionality of the library.
90        android: {
91            exclude_srcs: [
92                "src/main/java/io/grpc/internal/JndiResourceResolverFactory.java",
93            ],
94        },
95    },
96    // b/267831518: Pin tradefed and dependencies to Java 11.
97    java_version: "11",
98    sdk_version: "current",
99    min_sdk_version: "30",
100    apex_available: [
101        "com.android.adservices",
102        "com.android.devicelock",
103        "com.android.extservices",
104    ],
105    errorprone: {
106        javacflags: [
107            "-Xep:BanJNDI:WARN",
108        ],
109    },
110}
111
112java_library {
113    name: "grpc-java-core-util",
114    host_supported: true,
115    srcs: [
116        "src/main/java/io/grpc/util/*.java",
117    ],
118    libs: [
119        "grpc-java-core",
120        "grpc-java-core-internal",
121        "jsr305",
122        "guava",
123    ],
124    // b/267831518: Pin tradefed and dependencies to Java 11.
125    java_version: "11",
126    sdk_version: "current",
127}
128