|
| 1 | +plugins { |
| 2 | + id "java-library" |
| 3 | + id "maven-publish" |
| 4 | + id "com.google.protobuf" |
| 5 | + id "jacoco" |
| 6 | + id "ru.vyarus.animalsniffer" |
| 7 | +} |
| 8 | + |
| 9 | +description = "gRPC: Autosharding Loadbalancing plugin" |
| 10 | + |
| 11 | +tasks.named("jar").configure { |
| 12 | + manifest { |
| 13 | + attributes('Automatic-Module-Name': 'io.grpc.autosharding') |
| 14 | + } |
| 15 | +} |
| 16 | + |
| 17 | +sourceSets { |
| 18 | + main { |
| 19 | + proto { |
| 20 | + srcDir 'third_party/autosharding/src/main/proto' |
| 21 | + } |
| 22 | + } |
| 23 | +} |
| 24 | + |
| 25 | +dependencies { |
| 26 | + implementation project(':grpc-util'), |
| 27 | + project(':grpc-core'), |
| 28 | + project(':grpc-protobuf'), |
| 29 | + project(':grpc-stub'), |
| 30 | + libraries.auto.value.annotations, |
| 31 | + libraries.guava |
| 32 | + annotationProcessor libraries.auto.value |
| 33 | + testImplementation libraries.truth, |
| 34 | + project(':grpc-grpclb'), |
| 35 | + project(':grpc-inprocess'), |
| 36 | + project(':grpc-testing'), |
| 37 | + project(':grpc-testing-proto'), |
| 38 | + testFixtures(project(':grpc-api')), |
| 39 | + testFixtures(project(':grpc-core')) |
| 40 | + signature (libraries.signature.java) { |
| 41 | + artifact { |
| 42 | + extension = "signature" |
| 43 | + } |
| 44 | + } |
| 45 | +} |
| 46 | + |
| 47 | +tasks.named("compileJava").configure { |
| 48 | + it.options.compilerArgs += [ |
| 49 | + "-Xlint:-processing", |
| 50 | + ] |
| 51 | + appendToProperty( |
| 52 | + it.options.errorprone.excludedPaths, |
| 53 | + ".*/build/generated/sources/annotationProcessor/java/.*", |
| 54 | + "|") |
| 55 | +} |
| 56 | + |
| 57 | +tasks.named("javadoc").configure { |
| 58 | + failOnError = false |
| 59 | + exclude 'io/grpc/autosharding/v1/**' |
| 60 | + exclude 'io/grpc/autosharding/*Provider.java' |
| 61 | + exclude 'io/grpc/autosharding/internal/**' |
| 62 | + exclude 'io/grpc/autosharding/Internal*' |
| 63 | +} |
| 64 | + |
| 65 | +tasks.named("jacocoTestReport").configure { |
| 66 | + classDirectories.from = sourceSets.main.output.collect { |
| 67 | + fileTree(dir: it, exclude: ['**/io/grpc/autosharding/v1/**']) |
| 68 | + } |
| 69 | +} |
| 70 | + |
| 71 | +configureProtoCompilation() |
0 commit comments