Releases: pedroql/mvflow
1.0.2
Summary of changes
This release is functionally the same as 1.0.1 except that it is hosted on Maven Central repository.
In order to use this release just add maven central if you haven't already and update MVFlow dependency to 1.0.2
.
Currently there are no plans to move previous versions of the library to Maven Central.
Full list of commits
1.0.1
Summary of changes
This update only changes internals. There are no new features nor expected behaviour changes. The updates are:
- Updated kotlin version
- Using shared flow instead of a channel as the underlying mechanism to propagate external effects
Full list of commits
1.0.0
Summary of changes
There are no formal changes to the API, this is the 0.0.3 release graduating to the first complete version of the library!
Full list of commits
0.0.3
Summary of changes
This new version brings many changes (and improvements) to the API. We are confident this is getting closer to what a first stable release will be like!
Main changes:
- Dropped all observer methods (
observe(Actions|Mutations|State)()
in favour of a single new concept of externalEffect
(a generic class). As a replacement, now you can callmvflow.observeExternalEffects()
from a new interfaceMVFlowWithEffects
.
This is an improvement because it makes it explicit what things might be exposed externally from one MVFlow object. Making this explicit will make it obvious if something external is relying on implementation details (and turn it to an explicit dependency).
-
Related with the change above, now you can write a
HandlerWithEffects
which is similar to the oldHandler
except it receives one additional lambda that you can call when you want to emit one effect. -
Another big change is changing the way you call
takeView
. Now this method is a suspend function and additionally you need to pass a scope. Internally this scope is used to launch some internal coroutines (one for pushing updates to the view and another to get actions from the view). -
MVFlow
is now just an interface instead of being a class. But you can still callMVFlow(...)
and you get one instance of it although the actual class returned is a private detail and can be different depending on the parameters you send.
Full list of commits
0.0.2
Summary of changes
This version introduces the ability to observe the actions, mutations, and state events that are happening inside the MVFlow
object.
For example, this enables the following functionality:
mvflow.observeActions().filterIsInstance<Action.ButtonClicked>().collect { // it: Action.ButtonClicked
analyticsTracker.log("submit_button", "clicked")
}
Be careful with observing these events as this is breaking the MVI pattern and if you are not careful, you may lose a lot of the benefits this architecture brings.
Here's a full list of the methods that were added to the MVFlow
class:
fun observeActions(): Flow<Action>
// For convenience you can also observe actions together with the state as of when the action was handled
fun observeActionsWithState(): Flow<Pair<Action, State>>
fun observeMutations(): Flow<Mutation>
fun observeState(): Flow<State>
Full list of commits:
cdff955
- Add maven publishing and upload to Bintray (#2)a0a4044
- Add dokka to projecte775ed5
- Add dokka-generated documentation5e4fcd9
- Add API validation plugin2ea142a
- Add kotlinter and fix current issuese15cf2c
- Add files to share project settingsf31d580
- Update to gradle wrapper with sourcesd002642
- Add detektcca171c
- Adding flags to make builds more performant9d2a402
- Add compiler flag to opt-in to experimental coroutines...0a4a348
- Don't require Bintray properties to be in the system9ff13c3
- Adding github actions (#4)b5af6f3
- Workaround hardcoded/absolute paths being written by dokka plugin (#5)5e4c075
- Add listeners functionality (#6)