The framework is available in several artifacts. This lets you pick and choose the features that you need in your project instead of having to pull in everything at once.
The currently available artifacts are listed below - you can get them all from MavenCentral.
repositories {
mavenCentral()
}
implementation "co.zsmb:rainbow-cake-core:1.6.0"
The essentials of the architecture library: the view state mechanisms and the configuration entry points.
This dependency is required to use RainbowCake.
You will probably also want to include at least one of the dependency injection artifacts below, though you can also use your own DI solution. See the Dependency Injection page for more details about DI in RainbowCake in general.
implementation "co.zsmb:rainbow-cake-dagger:1.6.0"
The primary, recommended way of performing dependency injection when using RainbowCake, using Dagger 2. For details, see Dagger support.
implementation "co.zsmb:rainbow-cake-hilt:1.6.0"
Support for using Dagger Hilt as your DI solution. For details, see Hilt support.
implementation "co.zsmb:rainbow-cake-koin:1.6.0"
An alternative dependency injection solution, powered by Koin 2.0. For details, see Koin support.
testImplementation "co.zsmb:rainbow-cake-test:1.6.0"
Testing helpers for RainbowCake projects. See the Testing page for more details.
implementation "co.zsmb:rainbow-cake-navigation:1.6.0"
Navigation and argument handling features: navigator
, SimpleNavActivity
, and more. See Navigation for details.
If you’re using a solution such as the Jetpack Navigation component, you don’t need this.
Note: the Channels artifact is DEPRECATED, and will not be present in future RainbowCake versions. To get continuous updates from lower layers, prefer using coroutine Flows.
implementation "co.zsmb:rainbow-cake-channels:0.7.0"
Version 0.7.0
of RainbowCake was the last version that shipped with this Channel support. If you use this, downgrade all other artifacts to 0.7.0
as well.
implementation "co.zsmb:rainbow-cake-timber:1.6.0"
You only need this artifact if you want the framework to log about its internal events (exceptions caught by RainbowCakeViewModel
, unhandled events), and you want it to do so using Timber. For more details, see Configuration.