Releases: ffgiraldez/reactive-mvvm-android
3.0.0 : 🔥 rx-java and 🔀 to kotlinx-coroutines
Remove rx-java dependency and replace it with KotlinX-Coroutines
⬆️ Keep dependencies up to date
This release tackle some update migrations like moving from kotlintest to kotest and arrow Option deprecations.
Apart from that, just minor changes in order to be up to date with other libraries.
Cover by tests
Key layers have been unit tested using multiple tecniques
- ViewModels and UI Layer using property based testing via kotlintest
- Data layer using parameterized test via Junit 5 Parameterized test
Simplify ViewModels
Simplify ViewModel in order to only have one LiveData (aka query property) and one LiveData (aka state property).
Move handling state logic to subscriber layer, aka the UI, simplify binding with only one state_change
binding per required view
This change tries to simplify the testing effort
Migration to AndroidX
Migrate support library to AndroidX, this introduces breaking changes but not add nothing so only increase minor version.
Also, update other libs and tools to their last stable version.
Handle error state
Create a new property on QueryViewModel error to describe an error on UI
Create a new QueryViewState error to model the state
To not duplicate code on data sources, errors are handled on ComicRepository
Model error using Either<ComicError, List>
Empty results on ComicLocalDataSource produce EmptyResultsError
Any network error produce NetworkError
Suggestions will display error as a single suggestion
A search will display error as text on the screen, hiding result list
Error suggestions do not propagate search results
split monolithic Koin context into modules
Extract common data logic
create ComicLocalDataSource & ComicRemoteDataSource polymorphic on T
refactor ComicRepository to use ComicLocalDataSource & ComicRemoteDataSource and polymorphic on T
create specific datasources & repository for Suggestion
create specific datasources & repository for Search
reorganise packages to reflect data common feature.
Use Common ViewModel/ViewState
create QueryViewModel as base ViewModel class for suggestion and search.
create QueryViewState to handle QueryViewModel states.
SuggestionViewModel, only defines how to go from Flowable to Flowable<List>
SuggestionViewModel, only defines how to go from Flowable to Flowable<List>
reorganise packages to reflect query common feature.
Use ViewState to Handle ViewModels
Keep into a ViewState all possible state of a ViewModel.
Fix LiveData nullability on BindingAdapters