blob: fd4b67b9dcb484418bfaef54e851a88cf6a80a2b [file] [log] [blame]
//
// Copyright (C) 2023 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Generate gRPC client code
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "packages_modules_DeviceLock_DeviceLockController_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: [
"packages_modules_DeviceLock_DeviceLockController_license",
],
}
genrule {
name: "checkIn-service-stub-lite",
tools: [
"aprotoc",
"protoc-gen-grpc-java-plugin",
"soong_zip",
],
cmd: "mkdir -p $(genDir)/gen && " +
"$(location aprotoc) --java_opt=annotate_code=false " +
"-Iexternal/protobuf/src -Ipackages/modules/DeviceLock/DeviceLockController/proto " +
"--plugin=protoc-gen-grpc-java=$(location protoc-gen-grpc-java-plugin) " +
"--grpc-java_out=lite:$(genDir)/gen $(locations *.proto) && " +
"$(location soong_zip) -o $(out) -C $(genDir)/gen -D $(genDir)/gen",
srcs: [
"*.proto",
":libprotobuf-internal-protos",
],
out: [
"protos.srcjar",
],
}
java_library {
name: "devicelockcontroller-proto-lite",
proto: {
type: "lite",
include_dirs: [
"external/protobuf/src",
"external/protobuf/java",
"packages/modules/DeviceLock/DeviceLockController/proto",
],
},
srcs: [
":checkIn-service-stub-lite",
"*.proto",
":libprotobuf-internal-protos",
],
libs: ["javax_annotation-api_1.3.2"],
static_libs: [
"libprotobuf-java-lite",
"guava",
"grpc-java-core-android",
"grpc-java-okhttp-client-lite",
],
apex_available: ["com.android.devicelock"],
sdk_version: "module_current",
min_sdk_version: "UpsideDownCake",
}