| /* |
| * Copyright (C) 2021 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. |
| */ |
| |
| apply plugin: 'com.android.tools.java-library' |
| apply plugin: 'com.android.tools.publish' |
| apply plugin: 'com.google.protobuf' |
| |
| group = 'com.android.tools.emulator' |
| archivesBaseName = 'proto' |
| version = rootProject.ext.baseVersion |
| |
| dependencies { |
| implementation libs.protobuf |
| implementation libs.grpc |
| compileOnly "javax.annotation:javax.annotation-api:1.3.2" |
| } |
| |
| sourceSets { |
| main.java.srcDir "${project.buildDir}/generated/source/proto/main/grpc" |
| main.proto.srcDir "$projectDir" |
| main.proto.include "**/*.proto" |
| } |
| |
| protobuf { |
| protoc { |
| artifact = libs.proto_compiler |
| } |
| plugins { |
| grpc { |
| artifact = 'io.grpc:protoc-gen-grpc-java:1.21.1' |
| } |
| } |
| generateProtoTasks { |
| all()*.plugins { grpc {} } |
| } |
| } |
| |
| project.ext.pomName = 'Emulator protos for Android Tools' |
| project.ext.pomDesc = 'A protobuf messages to control Android Emulator' |