xref: /aosp_15_r20/external/grpc-grpc-java/rls/build.gradle (revision e07d83d3ffcef9ecfc9f7f475418ec639ff0e5fe)
1plugins {
2    id "java"
3    id "maven-publish"
4    id "com.google.protobuf"
5    id "jacoco"
6    id "ru.vyarus.animalsniffer"
7}
8
9description = "gRPC: RouteLookupService Loadbalancing plugin"
10
11dependencies {
12    implementation project(':grpc-core'),
13            project(':grpc-protobuf'),
14            project(':grpc-stub'),
15            libraries.auto.value.annotations,
16            libraries.guava
17    annotationProcessor libraries.auto.value
18    compileOnly libraries.javax.annotation
19    testImplementation libraries.truth,
20            project(':grpc-grpclb'),
21            project(':grpc-testing'),
22            project(':grpc-testing-proto'),
23            testFixtures(project(':grpc-core'))
24    signature libraries.signature.java
25}
26
27tasks.named("compileJava").configure {
28    it.options.compilerArgs += [
29            // only has AutoValue annotation processor
30            "-Xlint:-processing",
31    ]
32    appendToProperty(
33            it.options.errorprone.excludedPaths,
34            ".*/build/generated/sources/annotationProcessor/java/.*",
35            "|")
36}
37
38tasks.named("javadoc").configure {
39    // Do not publish javadoc since currently there is no public API.
40    failOnError false  // no public or protected classes found to document
41    exclude 'io/grpc/lookup/v1/**'
42    exclude 'io/grpc/rls/internal/**'
43    exclude 'io/grpc/rls/Internal*'
44}
45
46tasks.named("jacocoTestReport").configure {
47    classDirectories.from = sourceSets.main.output.collect {
48        fileTree(dir: it, exclude: ['**/io/grpc/lookup/**'])
49    }
50}
51
52configureProtoCompilation()
53