withConfiguration

fun <T : Any> KoinApplication.withConfiguration(appDeclaration: KoinAppDeclaration? = null)

Compiler Plugin Stub - Apply configuration with modules discovered from @KoinApplication annotated class to an existing KoinApplication. The compiler plugin transforms this call to inject modules based on the @Configuration tags associated with type parameter T.

Usage:

startKoin {
printLogger()
}.withConfiguration<MyApp>()

Parameters

T

Type annotated with @KoinApplication

appDeclaration

Optional Koin application configuration block