Learning Android Development

Isolate Koin Within an Android Module

Enable different dependencies management frameworks across modules.

Image by InvisiblePower on Pexel.com

Sometimes when we work on a module (or library), we want to have some way to manage our dependencies. We have to be careful that our dependency management framework is not affecting other modules (or libraries) or even the main App that includes our module (or library)

In our example diagram above, when using Dagger 2 in a module (independently from the App), we can generate its own Component. But to use Koin in a module (independently from the App), how can we do it?

Note: this is different from setting up multi module App with Koin. The multi module App with Koin is setup with Koin for the entire App and it’s modules as shown in the article below.

The Issue With Normal Way Starting Koin

We have some guide provided on how to start our Koin in the official documentation.

--

--