Change Log
Version 2.1.0 / 2025-11-12
- BREAKING CHANGES
StringAdapterno long returns a nullString, and requires a non-nullStringdefaultRxSharedPreferences.getString()no longer returnsPreference<String?>and instead returnsPreference<String>StringSetAdapterno longer returns a nullSet<String?>, and requires a non-nullSet<String?>defaultRxSharedPreferences.getStringSet()no longer returnsPreference<Set<String?>?>and instead returnsPreference<Set<String?>>ConverterAdapterno longer returns a null type, and requires a non-null type as defaultRxSharedPreferences.getObject()no longer returnsPreference<Any?>and instead returnsPreference<Any>Preference.asOptional()andOptionalConverterare removed, as nothing returns a Preference with a nullable generic now- LINT UPDATES
RxSharedPreferences.getObjectNonNull()will now cause a lint error- Other changes include:
- Update of Gradle and several plugins
- Update of Kotlin to v2.2.20
- Update of various libraries
- Cleanup of code for lint warnings/errors
Version 2.0.1 / 2024-10-07
- Add license to PreferenceUtil.kt
- Fix crash "IllegalStateException: Recursive update" on Coroutines library (#23)
- Deprecates getObjectNonNull() function (#24)
- Correct the exception message when incorrect sharedprefereces is listened to (#26)
- Add in docs and website for Rx-Preferences (#25)
- Deprecates
RxSharedPreferences.getObjectNonNull()in favor ofRxSharedPreferences.getObject()
Version 2.0.0 / 2024-09-30
- Breaking Change release
- Use extension functions for Rx libraries
- This removes the uses of the various
*SharedPreferenceclasses, and provides a singleRxSharedPreferencesclass - This also removes the various
*Preferenceclasses in favor of a singlePreferenceclass - All reactive frameworks are now accessible as extension functions against the
Preferenceclass.- Java will have util classes to provide the access to extension functions
- Update CI to build against latest android images
- Update several dependencies
- Remove deprecated APIs from rx-sharedpreferences
- Add in utility to convert
Preference<T>toPreference<Optional<T>>for reactive frameworks that don't allownull.
Version 1.1.0 / 2023-10-03
- Update dependencies
- Move to compile sdk 34
- Use vanniktech for maven publishing
- Update CI script so that publishing occurs via CI now
- Remove build health checks from CI (for now)
Version 1.0.0 - ALL / 2023-03-27
- Fork of f2prateek/rx-preferences
- Due to group ID change and package change, this project will start the versioning at
1.0.0for all libraries. rx2- Initial release
- Contains fix for f2prateek/rx-preferences#141
rx3- Initial release
- Fix for f2prateek/rx-preferences#135
coroutines,livedata,core,bom- Initial release
=== Migration to com.frybits.rx.preferences ===
Version 2.0.1 (18-09-2020)
Promotes 2.0.1-beta1 to a stable release.
Version 2.0.1-beta1 (15-04-2020)
-
Fix: Improve handling for
nullvalues stored in preferences. -
Improvement: Update dependencies and tools.
Version 2.0.0 (22-04-2018)
Promotes 2.0.0-RC3 to a stable release. If you are migrating from v1, please refer to the changelog for earlier RC versions to see what has changed.
Version 2.0.0-RC3 (13-08-2017)
-
New: Add ability to clear preferences via
RxSharedPreferences. -
Fix: The default value for
RxSharedPreferences#getObjectmay not be null, but was incorrectly annotated as@Nullable. This corrects the annotation to@NonNull.
Version 2.0.0-RC2 (27-04-2017)
This release includes multiple breaking changes.
- New: Replace
AdapterwithConverter. AConverteris a simpler interface that only deals with serialization, and abstracts away the complexity of working withSharedPreferencesorSharedPreferences.Editor.
/**
* Converts instances of {@code T} to be stored and retrieved as Strings in {@link
* SharedPreferences}.
*/
interface Converter<T> {
/**
* Deserialize to an instance of {@code T}. The input is retrieved from {@link
* SharedPreferences#getString(String, String)}.
*/
@NonNull T deserialize(@NonNull String serialized);
/**
* Serialize the {@code value} to a String. The result will be used with {@link
* SharedPreferences.Editor#putString(String, String)}.
*/
@NonNull String serialize(@NonNull T value);
}
-
New: Disallow null values from being emitted by the Preference observable. Specifically
RxSharedPreferences#getEnumandRxSharedPreferences#getObjectdo not allow null values to be used as a default value. -
New: Make
Preference#setonly accept non null values. Trying to callsetwith a null value will now throw an exception. -
New: Make the
Set<String>returned byRxSharedPreferences#getStringSetunmodifiable. -
Improvement: Use
@RequiresApiinstead of@TargetApi.
Version 2.0.0-RC1 (25-12-2016)
rx-preferences has been updated to support RxJava 2.0. The Preference type is now an interface, but the core itself is mostly unchanged. 2.0.0-RC1 does not handle backpressure yet.
Because the release includes breaking API changes, we're changing the project's package name from com.f2prateek.rx.preferences to com.f2prateek.rx.preferences2. The maven group has also changed to com.f2prateek.rx.preferences2. This should make it possible for large applications and libraries to migrate incrementally.
Version 1.0.2 (15-06-2016)
- Remove custom backpressure support in favor of RxJava 1.1's built-in buffer latest.
Version 1.0.1 (28-10-2015)
- Add support for backpressure.
- Use reasonable defaults for creating Preferences that store primitives.
Version 1.0.0 (23-08-2015)
Initial release.