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 "//apex_available:platform", 48 "com.android.adservices", 49 "com.android.devicelock", 50 "com.android.extservices", 51 "com.android.virt", 52 "//apex_available:platform", 53 ], 54 target: { 55 windows: { 56 enabled: true, 57 }, 58 }, 59} 60 61java_library { 62 name: "grpc-java-core-inprocess", 63 host_supported: true, 64 srcs: [ 65 "src/main/java/io/grpc/inprocess/*.java", 66 ], 67 libs: [ 68 "error_prone_annotations", 69 "grpc-java-annotation-stubs", 70 "grpc-java-api", 71 "grpc-java-context", 72 "grpc-java-core", 73 "grpc-java-core-internal", 74 "guava", 75 "jsr305", 76 ], 77 // b/267831518: Pin tradefed and dependencies to Java 11. 78 java_version: "11", 79 sdk_version: "current", 80 target: { 81 windows: { 82 enabled: true, 83 }, 84 }, 85} 86 87java_library { 88 name: "grpc-java-core-internal", 89 host_supported: true, 90 srcs: [ 91 "src/main/java/io/grpc/internal/*.java", 92 ], 93 libs: [ 94 "grpc-java-annotation-stubs", 95 "grpc-java-api", 96 "grpc-java-core", 97 "grpc-java-context", 98 "jsr305", 99 "gson", 100 "error_prone_annotations", 101 "guava", 102 "perfmark", 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 "//apex_available:platform", 128 "com.android.adservices", 129 "com.android.devicelock", 130 "com.android.extservices", 131 "com.android.virt", 132 "//apex_available:platform", 133 ], 134 errorprone: { 135 javacflags: [ 136 "-Xep:BanJNDI:WARN", 137 ], 138 }, 139} 140 141java_library { 142 name: "grpc-java-core-util", 143 host_supported: true, 144 srcs: [ 145 "src/main/java/io/grpc/util/*.java", 146 ], 147 libs: [ 148 "error_prone_annotations", 149 "grpc-java-annotation-stubs", 150 "grpc-java-api", 151 "grpc-java-core", 152 "grpc-java-core-internal", 153 "jsr305", 154 "guava", 155 ], 156 // b/267831518: Pin tradefed and dependencies to Java 11. 157 java_version: "11", 158 sdk_version: "current", 159 min_sdk_version: "30", 160 apex_available: [ 161 "com.android.adservices", 162 "com.android.devicelock", 163 "com.android.extservices", 164 "com.android.virt", 165 "//apex_available:platform", 166 ], 167 target: { 168 windows: { 169 enabled: true, 170 }, 171 }, 172} 173