Koin 0.9.1 — Bug fixes, improvements & bug fixes ⚒

Arnaud Giuliani
Mar 13, 2018 · 2 min read

Hello Koin users! Here is the first fix of the 0.9.x version, bringing some fixes and improvements to help you, in your daily use Koin. Thank you for your feedback. As you may see in the changelog, lots of points come from issues and PR from the community. Let’s go 👍

Don’t forget to update your package as well:

compile "org.koin:koin-core:0.9.1"compile "org.koin:koin-android:0.9.1"compile "org.koin:koin-android-architecture:0.9.1"...

We continue here to improve the koin-android-architecture API on the following point.

Clearer ViewModel API

  • getViewModel() / by viewModel() — create an instance for given Activity or Fragment
  • getSharedViewModel() / by sharedViewModel() — allow a Fragment to share a ViewModel with its Activity.

We don’t have to use any “fromActivity” parameter anymore to force instance creation for Fragment.

Android eager injection

Use the get() function for more local/specific actions and if you don’t need to keep your dependency in a class property.

Dynamic parameters now functional

Now just declare your parameters in a lambda like this:

And your parameters will be lazily evaluated for your Koin bean definition. We don’t need to fill parameters in “parameters” parameter from inject() anymore.

Propagate dynamic parameters

The get() DSL function can now embed parameters to propagate. Use it with lambda.

Important Core fixes

README & Website cleanup

We are in maintenance of the 0.9.x branch version of Koin. We won’t plan any new feature, as we estimate that have reached an interesting amount of features and API. We want to stabilize Koin as well 🚑.

We are on the road to stable 1.0 ⚒. Any new feature will be planned after 1.0 on the new roadmap. Hope you’ll enjoy this new version 🙂

Koin developers

Latest news about Koin

Koin developers

Koin developers Blog

Arnaud Giuliani

Written by

Software Engineer — Tech Speaker & Writer — Kotlin Google Dev Expert — Open Source Maker

Koin developers

Koin developers Blog