Koin 0.8.2 — Improvements, Bugfixes and crash fix

Arnaud Giuliani
Feb 2, 2018 · 2 min read

Hi Koin users :) We begin this month of February with some cool improvements and bug fixes thanks to your feedback. At the agenda of this last release: core fixes, android-architecture and spark feature upgrades!

compile "org.koin:koin-android-architecture:0.8.2"

In koin-android-architecture you can now easily setup your ViewModel in your Activity or Fragment in a lazy manner with “by getViewModel()” :

Image for post
Image for post
ViewModel lazy declaration

This declaration style allows you to easily share your ViewModel between Activity and Fragment:

Image for post
Image for post
ViewModel sharing

Be default, ViewModel declared in Fragment will try to reuse one from parent Activity.

The module uses now the android.arch.lifecycle:extensions in version 1.1.0

compile "org.koin:koin-spark:0.8.2"

In the `koin-spark` module, we have merged the start() function with Koin start. Now we have a more compact syntax:

Image for post
Image for post
Spark and Koin now merged in start

The stop() function also include the closeKoin().

Under the hood, the koin-core module has been fixed for several issues :

  • Bean definition lookup and duplicated definition (issue #39)
  • Fix properties loading with embedded koin.properties, to allow read it from a jar (spring-boot like)
  • The upgrade of our compilation chain to Kotlin 1.2.21 broke our API when running in JDK7 (issue #43).

The website reference documentation has been completed. Check it here https://insert-koin.io/docs/1.0/reference/

The last news updates are also available from our website: https://insert-koin.io/docs/1.0/updates/

I’m currently writing an Android developer guide to help you daily develop with Koin (recipes, strategies, architecture guides …).

Thanks for your feedback and help :) Hope you’ll enjoy this release!

Stay tuned 👍

Koin developers

Latest news about Koin

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store