Bug P3
Status Update
Comments
vi...@google.com <vi...@google.com>
ko...@google.com <ko...@google.com> #2
This is a good suggestion - we'll track this internally as a cleanup.
Description
After adding Android (Java) project, I got a weird compilation error:
androidx.car.app:app:1.4.0-beta02
dependency into mywhere
Worker
isandroidx.work.Worker
.I have the following dependencies in
build.gradle
:./gradlew app:dependencies
(seegradle-app-dependencies.txt
attached) shows thatcom.google.guava:listenablefuture:1.0
is replaced by9999.0-empty-to-avoid-conflict-with-guava
, which is probably an empty stub that doesn't have the actual implementation.Further googling brought me tohttps://developer.android.com/jetpack/androidx/releases/concurrent#concurrent-listenableFuture-1.0.0-beta01 :
It sounds like
com.google.common.util.concurrent.ListenableFuture
has been extracted toandroidx.concurrent:concurrent-listenablefuture-callback
and there is no need to depend on entirecom.google.guava:guava:31.1-android
for that.I greppedhttps://github.com/androidx/androidx/tree/androidx-main/car/app/app for
com.google.common
that found just few usages of the guava library:It looks like that apart from
ListenableFuture
(which is already extracted by a separate library) onlyImmutableMap
from guava is used. IsImmutableMap
worth it? Guava is a huge monolith library full of bugs and vulnerabilities (see CVE-2023-2976 CVE-2020-8908). I would prefer not to have my project rely on Guava library.Please consider removing all minor usages of
com.google.guava:guava
(besidesListenableFuture
) fromandroidx.car.app:app
to make life easier for all Android developers.ListenableFuture
is already available fromandroidx.concurrent:concurrent-listenablefuture-callback
, which is alsoandroidx
and probably even hosted in the same repository asandroidx.car.app:app
.