xref: /aosp_15_r20/external/grpc-grpc-java/Android.bp (revision e07d83d3ffcef9ecfc9f7f475418ec639ff0e5fe)
1*e07d83d3SAndroid Build Coastguard Worker// Copyright (C) 2018 The Android Open Source Project
2*e07d83d3SAndroid Build Coastguard Worker//
3*e07d83d3SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*e07d83d3SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*e07d83d3SAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*e07d83d3SAndroid Build Coastguard Worker//
7*e07d83d3SAndroid Build Coastguard Worker//      http://www.apache.org/licenses/LICENSE-2.0
8*e07d83d3SAndroid Build Coastguard Worker//
9*e07d83d3SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*e07d83d3SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*e07d83d3SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*e07d83d3SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*e07d83d3SAndroid Build Coastguard Worker// limitations under the License.
14*e07d83d3SAndroid Build Coastguard Worker//
15*e07d83d3SAndroid Build Coastguard Worker//
16*e07d83d3SAndroid Build Coastguard Worker
17*e07d83d3SAndroid Build Coastguard Workerpackage {
18*e07d83d3SAndroid Build Coastguard Worker    default_applicable_licenses: ["external_grpc-grpc-java_license"],
19*e07d83d3SAndroid Build Coastguard Worker}
20*e07d83d3SAndroid Build Coastguard Worker
21*e07d83d3SAndroid Build Coastguard Worker// Added automatically by a large-scale-change
22*e07d83d3SAndroid Build Coastguard Worker//
23*e07d83d3SAndroid Build Coastguard Worker// large-scale-change included anything that looked like it might be a license
24*e07d83d3SAndroid Build Coastguard Worker// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
25*e07d83d3SAndroid Build Coastguard Worker//
26*e07d83d3SAndroid Build Coastguard Worker// Please consider removing redundant or irrelevant files from 'license_text:'.
27*e07d83d3SAndroid Build Coastguard Worker// See: http://go/android-license-faq
28*e07d83d3SAndroid Build Coastguard Workerlicense {
29*e07d83d3SAndroid Build Coastguard Worker    name: "external_grpc-grpc-java_license",
30*e07d83d3SAndroid Build Coastguard Worker    visibility: [":__subpackages__"],
31*e07d83d3SAndroid Build Coastguard Worker    license_kinds: [
32*e07d83d3SAndroid Build Coastguard Worker        "SPDX-license-identifier-Apache-2.0",
33*e07d83d3SAndroid Build Coastguard Worker    ],
34*e07d83d3SAndroid Build Coastguard Worker    license_text: [
35*e07d83d3SAndroid Build Coastguard Worker        "LICENSE",
36*e07d83d3SAndroid Build Coastguard Worker        "NOTICE.txt",
37*e07d83d3SAndroid Build Coastguard Worker    ],
38*e07d83d3SAndroid Build Coastguard Worker}
39*e07d83d3SAndroid Build Coastguard Worker
40*e07d83d3SAndroid Build Coastguard Workerjava_defaults {
41*e07d83d3SAndroid Build Coastguard Worker    name: "grpc-java-default-visibility",
42*e07d83d3SAndroid Build Coastguard Worker    visibility: [
43*e07d83d3SAndroid Build Coastguard Worker        "//external/grpc-grpc-java:__subpackages__",
44*e07d83d3SAndroid Build Coastguard Worker        "//external/sdk-platform-java:__subpackages__",
45*e07d83d3SAndroid Build Coastguard Worker        "//tools/apksig",
46*e07d83d3SAndroid Build Coastguard Worker    ],
47*e07d83d3SAndroid Build Coastguard Worker}
48*e07d83d3SAndroid Build Coastguard Worker
49*e07d83d3SAndroid Build Coastguard Workerjava_library_host {
50*e07d83d3SAndroid Build Coastguard Worker    name: "grpc-java",
51*e07d83d3SAndroid Build Coastguard Worker    static_libs: [
52*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-auth",
53*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-context",
54*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-core",
55*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-core-inprocess",
56*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-core-internal",
57*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-core-util",
58*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-protobuf",
59*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-protobuf-lite",
60*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-reflection",
61*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-stub",
62*e07d83d3SAndroid Build Coastguard Worker    ],
63*e07d83d3SAndroid Build Coastguard Worker    target: {
64*e07d83d3SAndroid Build Coastguard Worker        windows: {
65*e07d83d3SAndroid Build Coastguard Worker            enabled: true,
66*e07d83d3SAndroid Build Coastguard Worker        },
67*e07d83d3SAndroid Build Coastguard Worker    },
68*e07d83d3SAndroid Build Coastguard Worker}
69*e07d83d3SAndroid Build Coastguard Worker
70*e07d83d3SAndroid Build Coastguard Workerjava_library {
71*e07d83d3SAndroid Build Coastguard Worker    name: "grpc-java-lite",
72*e07d83d3SAndroid Build Coastguard Worker    static_libs: [
73*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-api",
74*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-context",
75*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-core",
76*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-core-inprocess",
77*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-core-internal",
78*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-core-util",
79*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-protobuf-lite",
80*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-stub",
81*e07d83d3SAndroid Build Coastguard Worker    ],
82*e07d83d3SAndroid Build Coastguard Worker}
83*e07d83d3SAndroid Build Coastguard Worker
84*e07d83d3SAndroid Build Coastguard Workerjava_library {
85*e07d83d3SAndroid Build Coastguard Worker    name: "grpc-java-okhttp-client-lite",
86*e07d83d3SAndroid Build Coastguard Worker    host_supported: true,
87*e07d83d3SAndroid Build Coastguard Worker    static_libs: [
88*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-stub",
89*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-context",
90*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-core",
91*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-core-internal",
92*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-core-util",
93*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-protobuf-lite",
94*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-okhttp",
95*e07d83d3SAndroid Build Coastguard Worker    ],
96*e07d83d3SAndroid Build Coastguard Worker    sdk_version: "current",
97*e07d83d3SAndroid Build Coastguard Worker    min_sdk_version: "30",
98*e07d83d3SAndroid Build Coastguard Worker    apex_available: [
99*e07d83d3SAndroid Build Coastguard Worker        "com.android.adservices",
100*e07d83d3SAndroid Build Coastguard Worker        "com.android.devicelock",
101*e07d83d3SAndroid Build Coastguard Worker        "com.android.extservices",
102*e07d83d3SAndroid Build Coastguard Worker        "com.android.virt",
103*e07d83d3SAndroid Build Coastguard Worker    ],
104*e07d83d3SAndroid Build Coastguard Worker}
105*e07d83d3SAndroid Build Coastguard Worker
106*e07d83d3SAndroid Build Coastguard Workerjava_library {
107*e07d83d3SAndroid Build Coastguard Worker    name: "grpc-java-core-android",
108*e07d83d3SAndroid Build Coastguard Worker    srcs: [
109*e07d83d3SAndroid Build Coastguard Worker        "android/src/main/java/io/grpc/android/*.java",
110*e07d83d3SAndroid Build Coastguard Worker    ],
111*e07d83d3SAndroid Build Coastguard Worker    libs: [
112*e07d83d3SAndroid Build Coastguard Worker        "error_prone_annotations",
113*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-annotation-stubs",
114*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-core",
115*e07d83d3SAndroid Build Coastguard Worker        "grpc-java-core-internal",
116*e07d83d3SAndroid Build Coastguard Worker        "jsr305",
117*e07d83d3SAndroid Build Coastguard Worker        "guava",
118*e07d83d3SAndroid Build Coastguard Worker    ],
119*e07d83d3SAndroid Build Coastguard Worker    sdk_version: "current",
120*e07d83d3SAndroid Build Coastguard Worker    min_sdk_version: "30",
121*e07d83d3SAndroid Build Coastguard Worker    apex_available: [
122*e07d83d3SAndroid Build Coastguard Worker        "//apex_available:platform",
123*e07d83d3SAndroid Build Coastguard Worker        "com.android.adservices",
124*e07d83d3SAndroid Build Coastguard Worker        "com.android.devicelock",
125*e07d83d3SAndroid Build Coastguard Worker        "com.android.extservices",
126*e07d83d3SAndroid Build Coastguard Worker        "com.android.virt",
127*e07d83d3SAndroid Build Coastguard Worker    ],
128*e07d83d3SAndroid Build Coastguard Worker}
129