Releases: tomczyn/ellipse
Releases · tomczyn/ellipse
Update Kotlin 1.8, Compose 1.4
Update Kotlin 1.7, Compose 1.2
Updated dependencies in the app, most notably Kotlin 1.7 and Compose 1.2.1
Replace Nothing with Unit in processor state
Coroutines 1.6 changed internal implementation of StateFlow and now it's impossible to implement StateFlow with Nothing type. Workaround is to use Unit type instead of Nothing to represent no meaningful state in processor.
Migration
Replace Nothing with Unit
val processor: Processor<MyEvent, Nothing, MyEffect> = processor(
prepare = { ... },
onEvent = { ... }
)val processor: Processor<MyEvent, Unit, MyEffect> = processor(
prepare = { ... },
onEvent = { ... }
)Kotlin 1.6 support
Kotlin 1.6 support (#8) * Versions bump, kotlin 1.6 * Migrated tests to new Coroutines 1.6 API * Tweaked compose extension for collectAsState * Migrated internal processor tests to new coroutines test API * .gitignore changes * Fixed detekt * Added better test support for intermediate states with UnconfinedTestDispatcher * Updated detekt config * Refactor * Added more complex prepare testing scenario * Added more complex samples with testing strategies * Added more test explanation * Fixed hilt
Allow to send multiple events
Changed processor.sendEvent(event) to allow for vararg input processor.sendEvent(event1, event2, ...)
Add EllipseContext for easier EffectsCollector management
Migration:
- Replace
sendEffect(...)witheffects.send(...)
Thanks to this change you can now do cleaner functions extraction from the onEvent lambda, e.g.
val processor: Processor<...> = processor(
...
onEvent = {
foo(effects)
}
)
private fun foo(effects: EffectsCollector<...>) { ... }Add Effect cache when no subscribers
Merge pull request #2 from mtomczynski/feature/effect_cache Add cache for effects when there're no subscribers
Initial release
Breaking changes from alpha:
- Replaced StateProcessor, StateEffectProcessor and EffectProcessor with single interface
Processor. To migrate putNothingin generic type if you don't need some values from the the API - Changed argument name in
processorTestmethod for processor, fromgiventoprocessor.givenright now is for additional setup in the test
Alpha 9.4
0.09.4 Moved compose definition to build.gradle for each module
Alpha 9.3
0.09.3 Downgraded kotlin version to 1.5.21