xref: /aosp_15_r20/external/grpc-grpc-java/Android.bp (revision e07d83d3ffcef9ecfc9f7f475418ec639ff0e5fe)
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//
16
17package {
18    default_applicable_licenses: ["external_grpc-grpc-java_license"],
19}
20
21// Added automatically by a large-scale-change
22//
23// large-scale-change included anything that looked like it might be a license
24// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
25//
26// Please consider removing redundant or irrelevant files from 'license_text:'.
27// See: http://go/android-license-faq
28license {
29    name: "external_grpc-grpc-java_license",
30    visibility: [":__subpackages__"],
31    license_kinds: [
32        "SPDX-license-identifier-Apache-2.0",
33    ],
34    license_text: [
35        "LICENSE",
36        "NOTICE.txt",
37    ],
38}
39
40java_defaults {
41    name: "grpc-java-default-visibility",
42    visibility: [
43        "//external/grpc-grpc-java:__subpackages__",
44        "//external/sdk-platform-java:__subpackages__",
45        "//tools/apksig",
46    ],
47}
48
49java_library_host {
50    name: "grpc-java",
51    static_libs: [
52        "grpc-java-auth",
53        "grpc-java-context",
54        "grpc-java-core",
55        "grpc-java-core-inprocess",
56        "grpc-java-core-internal",
57        "grpc-java-core-util",
58        "grpc-java-protobuf",
59        "grpc-java-protobuf-lite",
60        "grpc-java-reflection",
61        "grpc-java-stub",
62    ],
63    target: {
64        windows: {
65            enabled: true,
66        },
67    },
68}
69
70java_library {
71    name: "grpc-java-lite",
72    static_libs: [
73        "grpc-java-api",
74        "grpc-java-context",
75        "grpc-java-core",
76        "grpc-java-core-inprocess",
77        "grpc-java-core-internal",
78        "grpc-java-core-util",
79        "grpc-java-protobuf-lite",
80        "grpc-java-stub",
81    ],
82}
83
84java_library {
85    name: "grpc-java-okhttp-client-lite",
86    host_supported: true,
87    static_libs: [
88        "grpc-java-stub",
89        "grpc-java-context",
90        "grpc-java-core",
91        "grpc-java-core-internal",
92        "grpc-java-core-util",
93        "grpc-java-protobuf-lite",
94        "grpc-java-okhttp",
95    ],
96    sdk_version: "current",
97    min_sdk_version: "30",
98    apex_available: [
99        "com.android.adservices",
100        "com.android.devicelock",
101        "com.android.extservices",
102        "com.android.virt",
103    ],
104}
105
106java_library {
107    name: "grpc-java-core-android",
108    srcs: [
109        "android/src/main/java/io/grpc/android/*.java",
110    ],
111    libs: [
112        "error_prone_annotations",
113        "grpc-java-annotation-stubs",
114        "grpc-java-core",
115        "grpc-java-core-internal",
116        "jsr305",
117        "guava",
118    ],
119    sdk_version: "current",
120    min_sdk_version: "30",
121    apex_available: [
122        "//apex_available:platform",
123        "com.android.adservices",
124        "com.android.devicelock",
125        "com.android.extservices",
126        "com.android.virt",
127    ],
128}
129