KoinApplication

open class KoinApplication

Koin Application Help prepare resources for Koin context

Author

Arnaud Giuliani

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val koin: Koin

Functions

Link copied to clipboard
fun allowOverride(override: Boolean)

Allow definition override or not, in a global manner

Link copied to clipboard
fun close()
Link copied to clipboard

Create eager instances (single with createdAtStart)

Link copied to clipboard

Load properties from environment

Link copied to clipboard
fun KoinApplication.fileProperties(fileName: String = "/koin.properties"): KoinApplication

Load properties from file

Link copied to clipboard

Includes other KoinConfiguration in the current KoinApplication

Link copied to clipboard

Set Koin Logger

Link copied to clipboard

Compiler Plugin Stub - Load the module generated from a single @Module annotated class into this KoinApplication. The compiler plugin transforms this call to inject the module generated from the type parameter T via IR.

Link copied to clipboard
fun modules(vararg modules: Module): KoinApplication

Load definitions from modules

Link copied to clipboard
fun KoinApplication.modules(vararg modules: KClass<*>)

Compiler Plugin Stub - Load modules generated from multiple @Module annotated classes into this KoinApplication. The compiler plugin transforms this call to inject the modules generated from the provided KClass references via IR.

Link copied to clipboard
fun options(vararg optionValue: Pair<KoinOption, Any>): KoinApplication

Activate Koin Feature Flag options

Link copied to clipboard
fun printLogger(level: Level = Level.INFO): KoinApplication

Set Koin to use PrintLogger, by default at Level.INFO

Link copied to clipboard

Load properties from Map

Link copied to clipboard

Definition override has to be explicit on teh definition using the "override" DSL same as allowOverride(false)

Link copied to clipboard
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.

Link copied to clipboard
fun KoinApplication.withConfigurationWith(modules: List<Module>, appDeclaration: KoinAppDeclaration? = null)

Compiler Plugin Support Function - Apply configuration with the provided list of modules to an existing KoinApplication. This function is called by the compiler plugin after transforming withConfiguration().