plugins { id "com.google.protobuf" } description = 'OpenTelemetry Examples for gRPC' ext.moduleName = "io.opentelemetry.examples.grpc" dependencies { compile "io.opentelemetry:opentelemetry-api" compile "io.opentelemetry:opentelemetry-sdk" compile "io.opentelemetry:opentelemetry-exporter-logging" compile "io.grpc:grpc-protobuf" compile "io.grpc:grpc-stub" compile "io.grpc:grpc-netty-shaded" if (JavaVersion.current().isJava9Compatible()) { // Workaround for @javax.annotation.Generated // see: https://github.com/grpc/grpc-java/issues/3633 compileOnly "javax.annotation:javax.annotation-api:1.3.2" } } protobuf { protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" } plugins { grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" } } generateProtoTasks { all()*.plugins { grpc {} } } } // Inform IDEs like IntelliJ IDEA, Eclipse or NetBeans about the generated code. sourceSets { main { java { srcDirs 'build/generated/source/proto/main/grpc' srcDirs 'build/generated/source/proto/main/java' } } }