blob: fb98b48cd0dbb09b1bdf213214cff2ed3cc9b7bf [file] [log] [blame]
plugins {
id "maven-publish"
id "com.github.johnrengelman.shadow"
id "com.google.protobuf"
}
description = "gRPC: XDS plugin"
[compileJava].each() {
it.options.compilerArgs += [
// valueOf(int) in RoutingPriority has been deprecated
"-Xlint:-deprecation",
]
}
dependencies {
compile project(':grpc-protobuf'),
project(':grpc-stub'),
project(':grpc-core'),
project(':grpc-services')
compile (libraries.protobuf_util) {
// prefer 26.0-android from libraries instead of 20.0
exclude group: 'com.google.guava', module: 'guava'
}
testCompile project(':grpc-core').sourceSets.test.output
compileOnly libraries.javax_annotation
testCompile project(':grpc-testing'),
project(':grpc-testing-proto'),
libraries.guava_testlib
signature "org.codehaus.mojo.signature:java17:1.0@signature"
}
sourceSets {
main {
proto {
srcDir 'third_party/envoy/src/main/proto'
srcDir 'third_party/gogoproto/src/main/proto'
srcDir 'third_party/protoc-gen-validate/src/main/proto'
srcDir 'third_party/udpa/src/main/proto'
}
}
}
configureProtoCompilation()
jar {
classifier = 'original'
}
shadowJar {
classifier = null
dependencies {
include(project(':grpc-xds'))
}
relocate 'com.github.udpa', 'io.grpc.xds.shaded.com.github.udpa'
relocate 'io.envoyproxy', 'io.grpc.xds.shaded.io.envoyproxy'
relocate 'validate', 'io.grpc.xds.shaded.com.lyft.pgv.validate'
exclude "**/*.proto"
}
publishing {
publications {
maven(MavenPublication) {
artifact shadowJar
artifacts.removeAll { it.classifier == 'original' }
}
}
}
[publishMavenPublicationToMavenRepository, publishMavenPublicationToMavenLocal]*.onlyIf { false }