Koin - a smart Kotlin injection library
to keep you focused on your app, not on your tools
Just use Koin
Declare 
Use the Koin DSL
to describe your components definitions
// Given some classesclass Controller(val service: BusinessService)class BusinessService()// just declare itval myModule = module {singleOf(::Controller)singleOf(::BusinessService)}
Start 
Just run startKoin
function in your application
- Kotlin
- Android
fun main(vararg args: String) {// start Koin!startKoin {// declare modulesmodules(myModule)}}
Inject Constructors 
Instances are resolved
from your modules
// Controller & BusinessService are declared in a moduleclass Controller(val service: BusinessService) {fun hello() {// service is ready to useservice.sayHello()}}
Easy for Android 
Just inject
into your Android classes
// Just inject in a simple Activityclass MyActivity() : AppCompatActivity() {// inject BusinessService into propertyval service: BusinessService by inject()}