Open
Description
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
- https://stackoverflow.com/questions/59838700/java-lang-runtimeexception-duplicate-class-com-google-protobuf-abstractmessagel
protobuf-java
andprotobuf-javalite
conflict protocolbuffers/protobuf#8104
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:
- create a project, import firebase bom and firestore
- 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
Metadata
Metadata
Assignees
Labels
No labels