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 static_libs: [ 35 "grpc-java-api", 36 ], 37 libs: [ 38 "grpc-java-context", 39 "jsr305", 40 "guava", 41 ], 42 // b/267831518: Pin tradefed and dependencies to Java 11. 43 java_version: "11", 44 sdk_version: "current", 45 min_sdk_version: "30", 46 apex_available: [ 47 "com.android.adservices", 48 "com.android.devicelock", 49 "com.android.extservices", 50 "//apex_available:platform", 51 ], 52 target: { 53 windows: { 54 enabled: true, 55 }, 56 }, 57} 58 59java_library { 60 name: "grpc-java-core-inprocess", 61 host_supported: true, 62 srcs: [ 63 "src/main/java/io/grpc/inprocess/*.java", 64 ], 65 libs: [ 66 "error_prone_annotations", 67 "grpc-java-annotation-stubs", 68 "grpc-java-api", 69 "grpc-java-context", 70 "grpc-java-core", 71 "grpc-java-core-internal", 72 "guava", 73 "jsr305", 74 ], 75 // b/267831518: Pin tradefed and dependencies to Java 11. 76 java_version: "11", 77 sdk_version: "current", 78 target: { 79 windows: { 80 enabled: true, 81 }, 82 }, 83} 84 85java_library { 86 name: "grpc-java-core-internal", 87 host_supported: true, 88 srcs: [ 89 "src/main/java/io/grpc/internal/*.java", 90 ], 91 libs: [ 92 "grpc-java-annotation-stubs", 93 "grpc-java-api", 94 "grpc-java-core", 95 "grpc-java-context", 96 "jsr305", 97 "gson", 98 "error_prone_annotations", 99 "guava", 100 "opencensus-java-api", 101 "opencensus-java-contrib-grpc-metrics", 102 "perfmark-api-lib", 103 ], 104 target: { 105 // For the Android variant, ignore this class since it is optional, 106 // uses javax APIs not available on Android, and is used reflectively 107 // so ignoring it does not affect the functionality of the library. 108 android: { 109 exclude_srcs: [ 110 "src/main/java/io/grpc/internal/JndiResourceResolverFactory.java", 111 ], 112 }, 113 host: { 114 libs: [ 115 "annotations", // For android.annotation.SuppressLint 116 ] 117 }, 118 windows: { 119 enabled: true, 120 }, 121 }, 122 // b/267831518: Pin tradefed and dependencies to Java 11. 123 java_version: "11", 124 sdk_version: "current", 125 min_sdk_version: "30", 126 apex_available: [ 127 "com.android.adservices", 128 "com.android.devicelock", 129 "com.android.extservices", 130 "//apex_available:platform", 131 ], 132 errorprone: { 133 javacflags: [ 134 "-Xep:BanJNDI:WARN", 135 ], 136 }, 137} 138 139java_library { 140 name: "grpc-java-core-util", 141 host_supported: true, 142 srcs: [ 143 "src/main/java/io/grpc/util/*.java", 144 ], 145 libs: [ 146 "error_prone_annotations", 147 "grpc-java-annotation-stubs", 148 "grpc-java-api", 149 "grpc-java-core", 150 "grpc-java-core-internal", 151 "jsr305", 152 "guava", 153 ], 154 // b/267831518: Pin tradefed and dependencies to Java 11. 155 java_version: "11", 156 sdk_version: "current", 157 min_sdk_version: "30", 158 apex_available: [ 159 "com.android.adservices", 160 "com.android.devicelock", 161 "com.android.extservices", 162 "//apex_available:platform", 163 ], 164 target: { 165 windows: { 166 enabled: true, 167 }, 168 }, 169} 170