[Firestore] duplicate entry issue when using google/type proto files #3109

118 views
Skip to first unread message

Mouna Cheikhna

unread,
Nov 7, 2021, 11:40:42 PM11/7/21
to Firebase Google Group

Hi,  we're using firestore in our android app, and using protobuf for the app's server-client communication, google/type proto files are bundled with our backend proto files that we fetch and generate models for, we're also using wire (https://github.com/square/wire) to generate models (and not protoc).

the problem i'm running into is that protolite-well-known-types (by including a dependency that bundles google/type) contains the same google/type proto files and as a result when building a release variant i get a duplicated class issue from google/type proto classes.

this issue is fixed with:

implementation(Deps.Firebase.firestore) { 
  exclude(module = "protolite-well-known-types") 
}

but i want to make sure that won't break firestore usage, we're only using firestore to get real time updates from a collection and do some custom logic using the ids we get from this and nothing else.

so wanted to know what does firestore use protolite-well-known-types for ? and is it fine to exclude this dependency if i'm only using firestore for the use case above.

also if there's a better approach to solve this problem i can try it.

thank you

Reply all
Reply to author
Forward
0 new messages