Skip to content

Commit

Permalink
Fix armeria-grpc latest dep test (#12734)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit authored Nov 15, 2024
1 parent 6bafd2b commit 805ce0a
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import com.google.protobuf.gradle.*

plugins {
id("otel.javaagent-instrumentation")
id("com.google.protobuf")
}

muzzle {
Expand All @@ -18,6 +21,35 @@ dependencies {
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
testInstrumentation(project(":instrumentation:grpc-1.6:javaagent"))

testImplementation(project(":instrumentation:grpc-1.6:testing"))
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")))
}
}
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 805ce0a

Please sign in to comment.