Fix armeria-grpc latest dep test (#12734)
This commit is contained in:
parent
6bafd2b3d5
commit
805ce0a3cc
|
@ -1,5 +1,8 @@
|
||||||
|
import com.google.protobuf.gradle.*
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("otel.javaagent-instrumentation")
|
id("otel.javaagent-instrumentation")
|
||||||
|
id("com.google.protobuf")
|
||||||
}
|
}
|
||||||
|
|
||||||
muzzle {
|
muzzle {
|
||||||
|
@ -18,6 +21,35 @@ dependencies {
|
||||||
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
|
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
|
||||||
testInstrumentation(project(":instrumentation:grpc-1.6:javaagent"))
|
testInstrumentation(project(":instrumentation:grpc-1.6:javaagent"))
|
||||||
|
|
||||||
testImplementation(project(":instrumentation:grpc-1.6:testing"))
|
|
||||||
testLibrary("com.linecorp.armeria:armeria-junit5:1.14.0")
|
testLibrary("com.linecorp.armeria:armeria-junit5:1.14.0")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val latestDepTest = findProperty("testLatestDeps") as Boolean
|
||||||
|
protobuf {
|
||||||
|
protoc {
|
||||||
|
val protocVersion = if (latestDepTest) "4.28.2" else "3.19.2"
|
||||||
|
artifact = "com.google.protobuf:protoc:$protocVersion"
|
||||||
|
}
|
||||||
|
plugins {
|
||||||
|
id("grpc") {
|
||||||
|
val grpcVersion = if (latestDepTest) "1.43.2" else "1.68.1"
|
||||||
|
artifact = "io.grpc:protoc-gen-grpc-java:$grpcVersion"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
generateProtoTasks {
|
||||||
|
all().configureEach {
|
||||||
|
plugins {
|
||||||
|
id("grpc")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
afterEvaluate {
|
||||||
|
// Classpath when compiling protos, we add dependency management directly
|
||||||
|
// since it doesn't follow Gradle conventions of naming / properties.
|
||||||
|
dependencies {
|
||||||
|
add("compileProtoPath", platform(project(":dependencyManagement")))
|
||||||
|
add("testCompileProtoPath", platform(project(":dependencyManagement")))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package example;
|
||||||
|
|
||||||
|
service Greeter {
|
||||||
|
rpc SayHello (Request) returns (Response) {
|
||||||
|
}
|
||||||
|
|
||||||
|
rpc SayMultipleHello (Request) returns (stream Response) {
|
||||||
|
}
|
||||||
|
|
||||||
|
rpc Conversation (stream Response) returns (stream Response) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
message Request {
|
||||||
|
string name = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Response {
|
||||||
|
string message = 1;
|
||||||
|
}
|
Loading…
Reference in New Issue