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