android / android/cose-lib

Guava 32.1.1 dependency conflict

Open
#24 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
8
Forks
23
PR merge metrics
No merged PRs in 30d

Description

When `cose-lib` is added to an Android application that also depends on `com.google.guava:listenablefutures:1.0`, Gradle build fails with error:

```
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkDevDebugAarMetadata'.
> Could not resolve all files for configuration ':app:devDebugRuntimeClasspath'.
> Could not resolve com.google.guava:listenablefuture:1.0.
Required by:
project :app > androidx.camera:camera-camera2:1.3.0
project :app > androidx.camera:camera-lifecycle:1.3.0
project :app > androidx.camera:camera-view:1.3.0
project :app > androidx.camera:camera-camera2:1.3.0 > androidx.camera:camera-core:1.3.0
project :app > androidx.compose.ui:ui-test-manifest:1.5.4 > androidx.activity:activity:1.8.0 > androidx.profileinstaller:profileinstaller:1.3.1
project :app > androidx.camera:camera-camera2:1.3.0 > androidx.concurrent:concurrent-futures:1.1.0
> Module 'com.google.guava:listenablefuture' has been rejected:
Cannot select module with conflict on capability 'com.google.guava:listenablefuture:1.0' also provided by [com.google.guava:guava:32.1.1-android(androidRuntimeElements)]
> Could not resolve com.google.guava:guava:32.1.1-android.
Required by:
project :app > com.google.cose:cose:20230908
> Module 'com.google.guava:guava' has been rejected:
Cannot select module with conflict on capability 'com.google.guava:listenablefuture:1.0' also provided by [com.google.guava:listenablefuture:1.0(runtime)]
```

This seems very similar to https://github.com/google/guava/issues/6642. In fact, when `cose-lib` is updated to use `com.google.guava:guava:32.1.2-android`, compiled and used as a dependency from local Maven repository, the error goes away.

Would it be possible to update the dependency and release a new version of the library?

Contributor guide

Open the contributing guide

Research direction

Inspect the repository's dependency configuration to find where cose-lib declares com.google.guava:guava:32.1.1-android. Compare the resolution behavior with 32.1.2-android, then verify the Android library builds and that its published dependency metadata no longer conflicts with listenablefuture:1.0; releasing a new version is also requested.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
build-system, mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.