0

Wrt a scala application for interacting with firestore's RPC apis, and using scalapb proto compiler /akka-grpc middleware, how to import the firestore RPC API's definitions in the .proto files? Eg. how to import the Document definition?

Trying to plainly say import "google.firestore.v1beta1.Document"; gives error.

sidnt
  • 170
  • 10

1 Answers1

1

take a look at https://github.com/thesamet/sbt-protoc/blob/master/examples/multi-with-external-jar/build.sbt
You need to add libraryDependencies += "com.google.api.grpc" % "proto-google-cloud-firestore-v1beta1" % "0.37.0" % "protobuf", which will make sbt-protoc extract the protos into a subdirectory of target/protobuf_external If you want ScalaPB to generate Scala classes for them, then also add PB.protoSources in Compile += target.value / "protobuf_external" / "com" / "google"

sidnt
  • 170
  • 10