Kotlin Flow version of rx-preferences -- Coroutines support for Android SharedPreferences
@ExperimentalCoroutinesApi
! https://github.com/tfcporciuncula/flow-preferences/commit/cf116749468d19fb3bc66898765d78175109db89
We're now on Maven Central with a new group id:
repositories {
mavenCentral()
}
dependencies {
implementation 'com.fredporciuncula:flow-preferences:1.5.0'
}
The package has also been updated from com.tfcporciuncula.flow
to com.fredporciuncula.flow.preferences
.
Besides that, this release is mainly just updating Kotlin and coroutines to 1.5.0 (https://github.com/tfcporciuncula/flow-preferences/commit/7bb14c8f008d09453059970d24d2518f0c91217d). We're now taking advantage of the new trySend()
API and no longer require the now gone offerCatching()
workaround.
✨ everything is 1.5.0 now, including us ✨
keyFlow
as a SharedPreferences
extension so clients can use it — it works just as SharedPreferences.OnSharedPreferenceChangeListener
but it's a flow instead of a callback https://github.com/tfcporciuncula/flow-preferences/commit/f13aaf73435a02cd031786b3adfc9166b16f9141 https://github.com/tfcporciuncula/flow-preferences/issues/12
JobCancellationException
in some specific scenarios https://github.com/tfcporciuncula/flow-preferences/pull/11 https://github.com/tfcporciuncula/flow-preferences/issues/1
Update coroutines to 1.4.0 https://github.com/tfcporciuncula/flow-preferences/commit/dc6f457ec611fb7e22f62bfd2ede06008746f68e
groupId
on README https://github.com/tfcporciuncula/flow-preferences/commit/561f392f7a53e1af62fdc833dd454ed5ad294879
Instead of depending on:
com.github.tfcporciuncula:flow-preferences:1.3.2
You should depend on:
com.github.tfcporciuncula.flow-preferences:flow-preferences:1.3.2
No code changes are needed and things should still work fine if you don't update this, but going with the "correct" groupId
will get you a proper POM that includes useful information (like license, so the oss-licenses
plugin works).