Probably not necessarily the right place, but is t...
# coroutines
u
Probably not necessarily the right place, but is there a reason that
kotlinx-coroutines-play-services
is still using a ~6 year out of date version of
com.google.android.gms:play-services-tasks
? Shouldn't that be updated?
đź‘€ 2
a
Generally speaking, if library A (
kotlinx.coroutines
in this case) depends on another library B (
play-services-tasks
), and library A doesn’t need anything from newer version of library B, it can be safest for library A to just keep depending on an older version and defer to the consumer of both library A and library B to keep versions more up to date than that if they want to. If
kotlinx.coroutines
updated to require the newest version of
play-services-tasks
, that would transitively require the newest version of
play-services-tasks
to be used by everyone downstream. That can cause cascading dependency issues for potentially no real benefit: If an additional library C doesn’t work with the newest version of
play-services-tasks
yet for some reason, and
kotlinx.coroutines
requires that version transitively, now using both library C and the latest version of
kotlinx.coroutines
together won’t work.
If an end application wants to use a more recent version of
play-services-tasks
, then you can always specify that directly.
u
So, if we want to remove jetifier we're safe to just constrain the
play-services-tasks
library to a version that doesn't reference the legacy support library? That's why I looked into this (because that 6 year old version of
play-services-tasks
has references to legacy support library). Granted, looks like the entirety of the interesting implementation of
kotlinx-coroutines-play-services
is contained in a single file that would be easy enough for us to easily bring into our project on it's own. Also, FYI there is a CVE that impacts that version of the library via transitive dependency.
Or is our jetifier thing already a non issue because of the exclude in the dependency?
Copy code
api("com.google.android.gms:play-services-tasks:$tasksVersion") {
        exclude(group="com.android.support")
    }
👍 1
a
With that, you shouldn’t run into issues if you specify a dependency on a newer version of
play-services-tasks