mirror of https://github.com/grpc/grpc-java.git
80 lines
2.0 KiB
Groovy
80 lines
2.0 KiB
Groovy
// Add dependency on the protobuf plugin
|
|
buildscript {
|
|
repositories {
|
|
maven { // The google mirror is less flaky than mavenCentral()
|
|
url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
|
|
gradlePluginPortal()
|
|
}
|
|
dependencies {
|
|
classpath libraries.protobuf_plugin
|
|
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
|
|
}
|
|
}
|
|
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
|
|
|
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"
|
|
}
|
|
|
|
apply plugin: 'com.google.protobuf'
|
|
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'
|
|
}
|
|
}
|
|
}
|
|
|
|
configureProtoCompilation()
|
|
|
|
jar {
|
|
classifier = 'original'
|
|
}
|
|
|
|
shadowJar {
|
|
classifier = null
|
|
dependencies {
|
|
include(project(':grpc-xds'))
|
|
}
|
|
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' }
|
|
}
|
|
}
|
|
}
|