mirror of https://github.com/grpc/grpc-java.git
53 lines
1.1 KiB
Groovy
53 lines
1.1 KiB
Groovy
plugins {
|
|
id "java-library"
|
|
id "maven-publish"
|
|
|
|
id "com.google.protobuf"
|
|
id "me.champeau.gradle.japicmp"
|
|
id "ru.vyarus.animalsniffer"
|
|
}
|
|
|
|
description = 'gRPC: Protobuf Lite'
|
|
|
|
dependencies {
|
|
api project(':grpc-api'),
|
|
libraries.protobuf.javalite
|
|
implementation libraries.jsr305,
|
|
libraries.guava
|
|
|
|
testImplementation project(':grpc-core')
|
|
|
|
signature libraries.signature.java
|
|
signature libraries.signature.android
|
|
}
|
|
|
|
tasks.named("jar").configure {
|
|
manifest {
|
|
attributes('Automatic-Module-Name': 'io.grpc.protobuf.lite')
|
|
}
|
|
}
|
|
|
|
tasks.named("compileTestJava").configure {
|
|
options.compilerArgs += [
|
|
"-Xlint:-cast"
|
|
]
|
|
options.errorprone.excludedPaths = ".*/build/generated/source/proto/.*"
|
|
}
|
|
|
|
protobuf {
|
|
protoc {
|
|
if (project.hasProperty('protoc')) {
|
|
path = project.protoc
|
|
} else {
|
|
artifact = libs.protobuf.protoc.get()
|
|
}
|
|
}
|
|
generateProtoTasks {
|
|
ofSourceSet('test')*.each { task ->
|
|
task.builtins {
|
|
java { option 'lite' }
|
|
}
|
|
}
|
|
}
|
|
}
|