File tree Expand file tree Collapse file tree 2 files changed +55
-1
lines changed
instrumentation/armeria/armeria-grpc-1.14/javaagent Expand file tree Collapse file tree 2 files changed +55
-1
lines changed Original file line number Diff line number Diff line change 1+ import com.google.protobuf.gradle.*
2+
13plugins {
24 id(" otel.javaagent-instrumentation" )
5+ id(" com.google.protobuf" )
36}
47
58muzzle {
@@ -18,6 +21,35 @@ dependencies {
1821 testInstrumentation(project(" :instrumentation:netty:netty-4.1:javaagent" ))
1922 testInstrumentation(project(" :instrumentation:grpc-1.6:javaagent" ))
2023
21- testImplementation(project(" :instrumentation:grpc-1.6:testing" ))
2224 testLibrary(" com.linecorp.armeria:armeria-junit5:1.14.0" )
2325}
26+
27+ val latestDepTest = findProperty(" testLatestDeps" ) as Boolean
28+ protobuf {
29+ protoc {
30+ val protocVersion = if (latestDepTest) " 4.28.2" else " 3.19.2"
31+ artifact = " com.google.protobuf:protoc:$protocVersion "
32+ }
33+ plugins {
34+ id(" grpc" ) {
35+ val grpcVersion = if (latestDepTest) " 1.43.2" else " 1.68.1"
36+ artifact = " io.grpc:protoc-gen-grpc-java:$grpcVersion "
37+ }
38+ }
39+ generateProtoTasks {
40+ all().configureEach {
41+ plugins {
42+ id(" grpc" )
43+ }
44+ }
45+ }
46+ }
47+
48+ afterEvaluate {
49+ // Classpath when compiling protos, we add dependency management directly
50+ // since it doesn't follow Gradle conventions of naming / properties.
51+ dependencies {
52+ add(" compileProtoPath" , platform(project(" :dependencyManagement" )))
53+ add(" testCompileProtoPath" , platform(project(" :dependencyManagement" )))
54+ }
55+ }
Original file line number Diff line number Diff line change 1+ syntax = "proto3" ;
2+
3+ package example ;
4+
5+ service Greeter {
6+ rpc SayHello (Request ) returns (Response ) {
7+ }
8+
9+ rpc SayMultipleHello (Request ) returns (stream Response ) {
10+ }
11+
12+ rpc Conversation (stream Response ) returns (stream Response ) {
13+ }
14+ }
15+
16+ message Request {
17+ string name = 1 ;
18+ }
19+
20+ message Response {
21+ string message = 1 ;
22+ }
You can’t perform that action at this time.
0 commit comments