Skip to content

Instantly share code, notes, and snippets.

@romainbsl
Created June 1, 2020 14:13
Show Gist options
  • Save romainbsl/79e881d69b79911d9573b5184ea9eecc to your computer and use it in GitHub Desktop.
Save romainbsl/79e881d69b79911d9573b5184ea9eecc to your computer and use it in GitHub Desktop.
// Bindings
val diContainer = DI {
bind() from singleton { MyController() }
constant("creator") with ("Salomon BRYS")
constant("maintainer") with ("Romain BOISSELLE")
}
// Kodein Aware application
class DemoApplication(override val di: DI)
: Application(), DIAware {
// ...
}
// "Usage"
fun main() { DemoApplication(diContainer) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment