Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile failure when used with Firebase Firestore #27

Open
Prometheus3k opened this issue Jan 19, 2024 · 1 comment
Open

Compile failure when used with Firebase Firestore #27

Prometheus3k opened this issue Jan 19, 2024 · 1 comment

Comments

@Prometheus3k
Copy link

Prometheus3k commented Jan 19, 2024

I see there is an issue when you combine this library with firebase (bom 31.5.0 but happens with various newer/older versions of firebase bom).

This library uses protobuf (whether you use it or not) and firebase uses protobuf too. But quite some time ago they made changes to use protobuf-javalite (I think). In any case you cannot mix protobuf-java with protobuf-javalite hence the compile error when merging dependencies.
I'm not using the protobuf parts of this wrapper but this library depends on it.

Here are the posts describing the issue

Suggestions:

  • Upgrade protobuf usage to play nice with firestore
  • separate json and protobuf into optional packages so we import igdb-core and igdb-json or igdb-proto

Steps to repro:

  1. create a project, import firebase bom and firestore
  2. Import this IGDB wrapper (1.1.0)

Build and observe compile errors (there are two)

> Task :app:mergeDebugJavaResource FAILED
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
......

(See attached for full logs of the above... it's a lot!) log_1.txt

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugJavaResource'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
   > 2 files found with path 'google/protobuf/field_mask.proto' from inputs:
      - /Users/username/.gradle/caches/modules-2/files-2.1/com.google.protobuf/protobuf-java/3.24.3/8e0f08a59c21e3f17121667489a005a8df091af0/protobuf-java-3.24.3.jar
      - /Users/username/.gradle/caches/modules-2/files-2.1/com.google.protobuf/protobuf-javalite/3.21.7/82b692be08383107fd1c6d44474b56df411edd27/protobuf-javalite-3.21.7.jar
@cvalera18
Copy link

Same problem here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants