mirror of https://github.com/grpc/grpc-java.git
62 lines
1.8 KiB
Groovy
62 lines
1.8 KiB
Groovy
plugins {
|
|
id "java-library"
|
|
id "maven-publish"
|
|
|
|
id "com.google.protobuf"
|
|
id "ru.vyarus.animalsniffer"
|
|
}
|
|
|
|
description = "gRPC: Services"
|
|
|
|
tasks.named("compileJava").configure {
|
|
// v1alpha of reflection.proto is deprecated at the file level.
|
|
// Without this workaround, the project can not compile.
|
|
it.options.compilerArgs += [
|
|
"-Xlint:-deprecation",
|
|
]
|
|
}
|
|
|
|
tasks.named("jar").configure {
|
|
manifest {
|
|
attributes('Automatic-Module-Name': 'io.grpc.services')
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
api project(':grpc-protobuf'),
|
|
project(':grpc-stub'),
|
|
project(':grpc-util')
|
|
implementation libraries.protobuf.java.util,
|
|
libraries.guava.jre // JRE required by protobuf-java-util
|
|
|
|
runtimeOnly libraries.errorprone.annotations,
|
|
libraries.j2objc.annotations, // Explicit dependency to keep in step with version used by guava
|
|
libraries.gson // to fix checkUpperBoundDeps error here
|
|
compileOnly libraries.javax.annotation
|
|
testImplementation project(':grpc-testing'),
|
|
libraries.netty.transport.epoll, // for DomainSocketAddress
|
|
testFixtures(project(':grpc-core'))
|
|
testCompileOnly libraries.javax.annotation
|
|
signature libraries.signature.java
|
|
}
|
|
|
|
configureProtoCompilation()
|
|
|
|
tasks.named("javadoc").configure {
|
|
exclude 'io/grpc/services/Internal*.java'
|
|
exclude 'io/grpc/services/internal/*'
|
|
exclude 'io/grpc/protobuf/services/internal/*'
|
|
}
|
|
|
|
tasks.named("jacocoTestReport").configure {
|
|
classDirectories.from = sourceSets.main.output.collect {
|
|
fileTree(dir: it,
|
|
exclude: [
|
|
'**/io/grpc/binarylog/v1/**',
|
|
'**/io/grpc/channelz/v1/**',
|
|
'**/io/grpc/health/v1/**',
|
|
'**/io/grpc/reflection/v1alpha/**',
|
|
])
|
|
}
|
|
}
|