Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
Loading