Use google's annotations.proto

Hi,
how can i setup and use AkkaGrpcPlugin in a way to extract and import google/api/*.proto like

import "google/api/annotations.proto";
...
service SchemaService {
    rpc AskToto(Empty) returns (TotoResponse) {
        option (google.api.http) = {
            get: "/api/askToto"
       };
    }
}

For the moment i have sbt compilation error

google/api/annotations.proto: File not found.
schema_toto.proto: Import "google/api/annotations.proto" was not found or had errors.

even i use dependency "com.google.api.grpc" % "googleapis-common-protos" % "0.0.3"

Hi,

you need to add the dependency under the protobuf configuration, so it becomes:

"com.google.api.grpc" % "googleapis-common-protos" % "0.0.3" % "protobuf"

Also, feel free to take a look at the Alpkakka Google Cloud Pub/Sub gRPC connector for inspiration that uses Akka gRPC and pulls in the Google proto files from the jar as well.

1 Like

Thankā€™s Martynas,
it work fineā€¦ as expected :ok_hand: