xref: /aosp_15_r20/external/grpc-grpc-java/services/build.gradle (revision e07d83d3ffcef9ecfc9f7f475418ec639ff0e5fe)
1plugins {
2    id "java-library"
3    id "maven-publish"
4
5    id "com.google.protobuf"
6    id "ru.vyarus.animalsniffer"
7}
8
9description = "gRPC: Services"
10
11tasks.named("compileJava").configure {
12    // v1alpha of reflection.proto is deprecated at the file level.
13    // Without this workaround, the project can not compile.
14    it.options.compilerArgs += [
15        "-Xlint:-deprecation",
16    ]
17}
18
19dependencies {
20    api project(':grpc-protobuf'),
21            project(':grpc-stub'),
22            project(':grpc-core')
23    implementation libraries.protobuf.java.util,
24            libraries.guava.jre // JRE required by protobuf-java-util
25
26    runtimeOnly libraries.errorprone.annotations
27
28    compileOnly libraries.javax.annotation
29    testImplementation project(':grpc-testing'),
30            libraries.netty.transport.epoll, // for DomainSocketAddress
31            testFixtures(project(':grpc-core'))
32    testCompileOnly libraries.javax.annotation
33    signature libraries.signature.java
34}
35
36configureProtoCompilation()
37
38tasks.named("javadoc").configure {
39    exclude 'io/grpc/services/Internal*.java'
40    exclude 'io/grpc/services/internal/*'
41    exclude 'io/grpc/protobuf/services/internal/*'
42}
43
44tasks.named("jacocoTestReport").configure {
45    classDirectories.from = sourceSets.main.output.collect {
46        fileTree(dir: it,
47        exclude: [
48                '**/io/grpc/binarylog/v1/**',
49                '**/io/grpc/channelz/v1/**',
50                '**/io/grpc/health/v1/**',
51                '**/io/grpc/reflection/v1alpha/**',
52        ])
53    }
54}
55