├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── Bug_report.md │ └── Feature_request.md ├── stale.yml └── workflows │ ├── build.yml │ ├── codeql.yml │ ├── release.yml │ ├── test.yml │ └── weekly.yml ├── .gitignore ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.adoc ├── LICENSE ├── README.md ├── docs ├── img │ ├── koin_main_logo.png │ └── sponsors │ │ ├── stream-logo-2x.png │ │ └── stream-logo.png ├── quickstart │ ├── android-annotations.md │ ├── android-compose.md │ ├── android-viewmodel.md │ ├── android.md │ ├── cmp.md │ ├── junit-test.md │ ├── kmp.md │ ├── kotlin.md │ ├── ktor-annotations.md │ └── ktor.md ├── reference │ ├── introduction.md │ ├── koin-android │ │ ├── compose.md │ │ ├── dsl-update.md │ │ ├── fragment-factory.md │ │ ├── get-instances.md │ │ ├── instrumented-testing.md │ │ ├── modules-android.md │ │ ├── scope.md │ │ ├── start.md │ │ ├── viewmodel.md │ │ └── workmanager.md │ ├── koin-compose │ │ ├── compose.md │ │ └── isolated-context.md │ ├── koin-core │ │ ├── context-isolation.md │ │ ├── definitions.md │ │ ├── dsl-update.md │ │ ├── dsl.md │ │ ├── extension-manager.md │ │ ├── injection-parameters.md │ │ ├── koin-component.md │ │ ├── lazy-modules.md │ │ ├── modules.md │ │ ├── scopes.md │ │ └── start-koin.md │ ├── koin-ktor │ │ ├── ktor-isolated.md │ │ └── ktor.md │ ├── koin-mp │ │ └── kmp.md │ └── koin-test │ │ ├── checkmodules.md │ │ ├── testing.md │ │ └── verify.md ├── setup │ ├── koin.md │ ├── migrate.md │ └── why.md └── support │ ├── api-stability.md │ ├── embedded.md │ ├── index.md │ └── releases.md ├── examples ├── README ├── android-perfs │ ├── Benchs │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── org │ │ │ │ └── koin │ │ │ │ └── sample │ │ │ │ └── android │ │ │ │ └── main │ │ │ │ ├── MainActivity.kt │ │ │ │ └── MainApplication.kt │ │ └── res │ │ │ ├── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── drawable │ │ │ └── ic_launcher_background.xml │ │ │ ├── layout │ │ │ ├── main_activity.xml │ │ │ └── mvp_activity.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── koin │ │ └── benchmark │ │ └── TestPerfRunner.kt ├── androidx-samples │ ├── build.gradle │ ├── gradle.properties │ └── src │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── assets │ │ │ └── koin.properties │ │ ├── java │ │ │ └── org │ │ │ │ └── koin │ │ │ │ └── sample │ │ │ │ └── sandbox │ │ │ │ ├── MainApplication.kt │ │ │ │ ├── MainJavaApplication.java │ │ │ │ ├── components │ │ │ │ ├── Constants.kt │ │ │ │ ├── main │ │ │ │ │ ├── DumbServiceImpl.kt │ │ │ │ │ ├── RandomId.kt │ │ │ │ │ ├── SimplePresenter.kt │ │ │ │ │ ├── SimpleService.kt │ │ │ │ │ └── SimpleServiceImpl.kt │ │ │ │ ├── mvp │ │ │ │ │ ├── FactoryPresenter.kt │ │ │ │ │ └── ScopedPresenter.kt │ │ │ │ ├── mvvm │ │ │ │ │ ├── AbstractVM.kt │ │ │ │ │ ├── MyScopeViewModel.kt │ │ │ │ │ ├── MyScopeViewModel2.kt │ │ │ │ │ ├── Presenters.kt │ │ │ │ │ ├── SavedStateBundleViewModel.kt │ │ │ │ │ ├── SavedStateViewModel.kt │ │ │ │ │ ├── SharedVM.kt │ │ │ │ │ └── SimpleViewModel.kt │ │ │ │ ├── scope │ │ │ │ │ └── Session.kt │ │ │ │ └── sdk │ │ │ │ │ ├── CustomSDK.kt │ │ │ │ │ ├── SDKActivity.kt │ │ │ │ │ ├── SDKService.kt │ │ │ │ │ └── SDKVIewModel.kt │ │ │ │ ├── di │ │ │ │ └── AppModule.kt │ │ │ │ ├── main │ │ │ │ └── MainActivity.kt │ │ │ │ ├── mvp │ │ │ │ └── MVPActivity.kt │ │ │ │ ├── mvvm │ │ │ │ ├── MVVMActivity.kt │ │ │ │ └── MVVMFragment.kt │ │ │ │ ├── navigation │ │ │ │ ├── NavActivity.kt │ │ │ │ ├── NavFragmentA.kt │ │ │ │ ├── NavFragmentB.kt │ │ │ │ ├── NavViewModel.kt │ │ │ │ └── NavViewModel2.kt │ │ │ │ ├── scope │ │ │ │ ├── ScopedActivityA.kt │ │ │ │ ├── ScopedActivityB.kt │ │ │ │ └── ScopedFragment.kt │ │ │ │ ├── sdk │ │ │ │ └── HostActivity.kt │ │ │ │ ├── utils │ │ │ │ └── NavigateExt.kt │ │ │ │ └── workmanager │ │ │ │ ├── SimpleWorker.kt │ │ │ │ ├── SimpleWorkerService.kt │ │ │ │ └── WorkManagerActivity.kt │ │ └── res │ │ │ ├── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── drawable │ │ │ └── ic_launcher_background.xml │ │ │ ├── layout │ │ │ ├── host_activity.xml │ │ │ ├── main_activity.xml │ │ │ ├── mvp_activity.xml │ │ │ ├── mvvm_activity.xml │ │ │ ├── mvvm_fragment.xml │ │ │ ├── nav_activity.xml │ │ │ ├── nav_fragment_a.xml │ │ │ ├── nav_fragment_b.xml │ │ │ ├── scoped_activity_a.xml │ │ │ ├── scoped_activity_b.xml │ │ │ ├── sdk_activity.xml │ │ │ └── workmanager_activity.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── navigation │ │ │ └── main_nav.xml │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── test │ │ └── java │ │ └── CheckModulesTest.kt ├── build.gradle ├── clean.sh ├── coffee-maker │ ├── build.gradle │ ├── check_modules.sh │ └── src │ │ ├── main │ │ └── kotlin │ │ │ └── org │ │ │ └── koin │ │ │ └── example │ │ │ ├── CoffeeApp.kt │ │ │ ├── CoffeeAppModule.kt │ │ │ ├── CoffeeMaker.kt │ │ │ ├── ElectricHeater.kt │ │ │ ├── Heater.kt │ │ │ ├── Pump.kt │ │ │ └── Thermosiphon.kt │ │ └── test │ │ └── kotlin │ │ └── org │ │ └── koin │ │ └── example │ │ ├── CheckCoffeeModuleTest.kt │ │ └── CoffeeMakerTest.kt ├── gradle.properties ├── gradle │ ├── versions.gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── hello-ktor │ ├── api │ │ └── hello-ktor.api │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── kotlin │ │ │ └── org │ │ │ │ └── koin │ │ │ │ └── sample │ │ │ │ ├── AppModule2.kt │ │ │ │ ├── Application.kt │ │ │ │ ├── Components.kt │ │ │ │ └── KoinAppModule.kt │ │ └── resources │ │ │ ├── application.conf │ │ │ └── logback.xml │ │ └── test │ │ └── kotlin │ │ └── org │ │ └── koin │ │ └── sample │ │ └── ApplicationJobRoutesTest.kt ├── jvm-perfs │ ├── benchmark.sh │ ├── benchmark.txt │ ├── build.gradle.kts │ └── src │ │ └── main │ │ └── kotlin │ │ └── org │ │ └── koin │ │ └── benchmark │ │ ├── BenchmarkClass.kt │ │ ├── PerfRunner.kt │ │ ├── classes.kt │ │ ├── module_400.kt │ │ ├── module_400_fu.kt │ │ ├── module_400_fu_lazy.kt │ │ └── nestedModules.kt ├── multimodule-ktor │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── main │ │ │ └── kotlin │ │ │ │ └── org │ │ │ │ └── koin │ │ │ │ └── samples │ │ │ │ └── multi_module │ │ │ │ └── app │ │ │ │ └── application.kt │ │ │ └── test │ │ │ └── kotlin │ │ │ └── org │ │ │ └── koin │ │ │ └── samples │ │ │ └── multi_module │ │ │ └── app │ │ │ └── ApplicationTest.kt │ ├── build.gradle │ ├── common │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ └── kotlin │ │ │ └── org │ │ │ └── koin │ │ │ └── samples │ │ │ └── multi_module │ │ │ └── common │ │ │ └── IService.kt │ ├── module-a │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ └── kotlin │ │ │ └── org │ │ │ └── koin │ │ │ └── samples │ │ │ └── multi_module │ │ │ └── module_a │ │ │ ├── ModuleAService.kt │ │ │ └── moduleA.kt │ └── module-b │ │ ├── build.gradle │ │ └── src │ │ └── main │ │ └── kotlin │ │ └── org │ │ └── koin │ │ └── samples │ │ └── multi_module │ │ └── module_b │ │ ├── ModuleBService.kt │ │ └── moduleB.kt ├── sample-android-compose │ ├── api │ │ └── sample-android-compose.api │ ├── build.gradle │ ├── gradle.properties │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── org │ │ │ └── koin │ │ │ └── sample │ │ │ └── androidx │ │ │ └── compose │ │ │ ├── App.kt │ │ │ ├── MainActivity.kt │ │ │ ├── MainApplication.kt │ │ │ ├── SDKComposable.kt │ │ │ ├── UIComponents.kt │ │ │ ├── data │ │ │ ├── MyFactory.kt │ │ │ ├── MyScoped.kt │ │ │ ├── MySingle.kt │ │ │ ├── User.kt │ │ │ ├── UserRepository.kt │ │ │ └── sdk │ │ │ │ └── SDKData.kt │ │ │ ├── di │ │ │ ├── IsolatedContext.kt │ │ │ └── appModule.kt │ │ │ └── viewmodel │ │ │ ├── SSHViewModel.kt │ │ │ └── UserViewModel.kt │ │ └── res │ │ └── values │ │ ├── colors.xml │ │ └── styles.xml ├── sample-desktop-compose │ ├── api │ │ └── sample-desktop-compose.api │ ├── build.gradle.kts │ └── src │ │ └── main │ │ └── kotlin │ │ └── org │ │ └── koin │ │ └── sample │ │ └── compose │ │ └── desktop │ │ └── Main.kt ├── settings.gradle └── test.sh ├── license_header.txt └── projects ├── android ├── koin-android-compat │ ├── api │ │ └── koin-android-compat.api │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── org │ │ └── koin │ │ └── android │ │ └── compat │ │ ├── GetViewModelCompat.kt │ │ ├── ScopeCompat.kt │ │ ├── SharedViewModelCompat.kt │ │ └── ViewModelCompat.kt ├── koin-android-test │ ├── api │ │ └── koin-android-test.api │ ├── build.gradle.kts │ └── src │ │ ├── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── org │ │ │ └── koin │ │ │ └── android │ │ │ └── test │ │ │ └── verify │ │ │ └── AndroidVerify.kt │ │ └── test │ │ └── java │ │ └── org │ │ └── koin │ │ └── test │ │ └── android │ │ └── AndroidModuleTest.kt ├── koin-android │ ├── api │ │ └── koin-android.api │ ├── build.gradle.kts │ └── src │ │ ├── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── org │ │ │ └── koin │ │ │ ├── android │ │ │ ├── error │ │ │ │ └── MissingAndroidContextException.kt │ │ │ ├── ext │ │ │ │ ├── android │ │ │ │ │ ├── AndroidKoinScopeExt.kt │ │ │ │ │ └── ComponentCallbackExt.kt │ │ │ │ └── koin │ │ │ │ │ ├── KoinExt.kt │ │ │ │ │ └── ModuleExt.kt │ │ │ ├── java │ │ │ │ └── KoinAndroidApplication.kt │ │ │ ├── logger │ │ │ │ └── AndroidLogger.kt │ │ │ └── scope │ │ │ │ ├── AndroidScopeComponent.kt │ │ │ │ ├── ComponentCallbacksExt.kt │ │ │ │ ├── ScopeService.kt │ │ │ │ └── ServiceExt.kt │ │ │ └── androidx │ │ │ ├── fragment │ │ │ ├── android │ │ │ │ ├── ActivityExt.kt │ │ │ │ └── KoinFragmentFactory.kt │ │ │ ├── dsl │ │ │ │ ├── FragmentOf.kt │ │ │ │ ├── ModuleExt.kt │ │ │ │ ├── ScopeFragmentOf.kt │ │ │ │ └── ScopeSetExt.kt │ │ │ └── koin │ │ │ │ └── KoinApplicationExt.kt │ │ │ ├── scope │ │ │ ├── ComponentActivityExt.kt │ │ │ ├── FragmentExt.kt │ │ │ ├── RetainedScopeActivity.kt │ │ │ ├── ScopeActivity.kt │ │ │ ├── ScopeFragment.kt │ │ │ ├── ScopeHandlerViewModel.kt │ │ │ └── ScopeViewModel.kt │ │ │ └── viewmodel │ │ │ ├── dsl │ │ │ ├── ModuleExt.kt │ │ │ ├── ScopeSetExt.kt │ │ │ ├── ScopeViewModelOf.kt │ │ │ └── ViewModelOf.kt │ │ │ └── ext │ │ │ └── android │ │ │ ├── ActivityStateVM.kt │ │ │ ├── ActivityVM.kt │ │ │ ├── FragmentActivityVM.kt │ │ │ ├── FragmentSharedStateVM.kt │ │ │ ├── FragmentSharedVM.kt │ │ │ ├── FragmentStateVM.kt │ │ │ ├── FragmentVM.kt │ │ │ └── ViewModelLazy.kt │ │ └── test │ │ └── java │ │ └── org │ │ └── koin │ │ └── test │ │ ├── android │ │ ├── AndroidModuleTest.kt │ │ ├── DSLExtendedTest.kt │ │ ├── IncludedModuleTest.kt │ │ ├── ModuleA.kt │ │ ├── ModuleB.kt │ │ ├── ModuleC.kt │ │ ├── error │ │ │ └── MissingAndroidContextExceptionTest.kt │ │ ├── ext │ │ │ ├── android │ │ │ │ ├── AndroidKoinScopeExtTest.kt │ │ │ │ └── ComponentCallbackExtTest.kt │ │ │ └── koin │ │ │ │ ├── KoinExtTest.kt │ │ │ │ └── ModuleExtTest.kt │ │ ├── helper │ │ │ ├── FakeContent.kt │ │ │ ├── FakeContentImpl.kt │ │ │ └── Helper.kt │ │ ├── logger │ │ │ └── AndroidLoggerTest.kt │ │ ├── scope │ │ │ ├── ComponentCallbacksExtTest.kt │ │ │ └── ServiceExtTest.kt │ │ └── viewmodel │ │ │ └── ViewModelKeyTest.kt │ │ └── androidx │ │ └── viewmodel │ │ └── GetViewModelTest.kt ├── koin-androidx-navigation │ ├── api │ │ └── koin-androidx-navigation.api │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── org │ │ └── koin │ │ └── androidx │ │ └── navigation │ │ └── NavGraphExt.kt ├── koin-androidx-startup │ ├── api │ │ └── koin-androidx-startup.api │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── org │ │ └── koin │ │ └── androix │ │ └── startup │ │ ├── KoinInitializer.kt │ │ └── KoinStartup.kt └── koin-androidx-workmanager │ ├── api │ └── koin-androidx-workmanager.api │ ├── build.gradle.kts │ └── src │ ├── main │ ├── AndroidManifest.xml │ └── java │ │ └── org │ │ └── koin │ │ └── androidx │ │ └── workmanager │ │ ├── dsl │ │ ├── ModuleExt.kt │ │ ├── ScopeDSLExt.kt │ │ ├── ScopeWorkerOf.kt │ │ └── WorkerOf.kt │ │ ├── factory │ │ └── KoinWorkerFactory.kt │ │ └── koin │ │ └── KoinApplicationExt.kt │ └── test │ └── java │ └── org │ └── koin │ └── androidx │ └── workmanager │ ├── Classes.kt │ ├── KoinWorkerFactoryTest.kt │ └── ScopeDSLExtKtTest.kt ├── benchmark.sh ├── bom └── koin-bom │ └── build.gradle.kts ├── build.gradle.kts ├── clean.sh ├── compose ├── koin-androidx-compose-navigation │ ├── api │ │ └── koin-androidx-compose-navigation.api │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── org │ │ └── koin │ │ └── androidx │ │ └── compose │ │ └── navigation │ │ ├── NavViewModel.kt │ │ └── NavViewModelInternals.kt ├── koin-androidx-compose │ ├── api │ │ └── koin-androidx-compose.api │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── org │ │ └── koin │ │ └── androidx │ │ └── compose │ │ ├── GetExt.kt │ │ ├── KoinAndroidContext.kt │ │ ├── ViewModel.kt │ │ ├── ViewModelInternals.kt │ │ └── scope │ │ └── KoinAndroidScope.kt ├── koin-compose-viewmodel-navigation │ ├── api │ │ └── koin-compose-viewmodel-navigation.api │ ├── build.gradle.kts │ └── src │ │ └── commonMain │ │ └── kotlin │ │ └── org │ │ └── koin │ │ └── compose │ │ └── viewmodel │ │ └── NavViewModel.kt ├── koin-compose-viewmodel │ ├── api │ │ └── koin-compose-viewmodel.api │ ├── build.gradle.kts │ └── src │ │ └── commonMain │ │ └── kotlin │ │ └── org │ │ └── koin │ │ └── compose │ │ └── viewmodel │ │ ├── ViewModel.kt │ │ └── dsl │ │ ├── ModuleExt.kt │ │ ├── ScopeSetExt.kt │ │ ├── ScopeViewModelOf.kt │ │ └── ViewModelOf.kt └── koin-compose │ ├── api │ └── koin-compose.api │ ├── build.gradle.kts │ └── src │ └── commonMain │ └── kotlin │ └── org │ └── koin │ └── compose │ ├── Inject.kt │ ├── KoinApplication.kt │ ├── application │ ├── CompositionKoinApplicationLoader.kt │ └── RememberKoinApplication.kt │ ├── error │ └── UnknownKoinContext.kt │ ├── module │ ├── CompositionKoinModuleLoader.kt │ └── RememberModules.kt │ └── scope │ ├── CompositionKoinScopeLoader.kt │ ├── KoinScope.kt │ └── RememberScopes.kt ├── core ├── benchmark │ ├── api │ │ └── benchmark.api │ ├── build.gradle.kts │ └── src │ │ ├── commonMain │ │ └── kotlin │ │ │ └── org │ │ │ └── koin │ │ │ └── benchmark │ │ │ ├── classes.kt │ │ │ └── module_400.kt │ │ ├── jvmMain │ │ └── kotlin │ │ │ └── org │ │ │ └── koin │ │ │ └── benchmark │ │ │ ├── JvmBenchmark.kt │ │ │ └── StartupBenchmark.kt │ │ └── nativeMain │ │ └── kotlin │ │ └── org │ │ └── koin │ │ └── benchmark │ │ └── NativeBenchmark.kt ├── koin-core-coroutines │ ├── api │ │ └── koin-core-coroutines.api │ ├── build.gradle.kts │ └── src │ │ ├── commonMain │ │ └── kotlin │ │ │ └── org │ │ │ └── koin │ │ │ ├── core │ │ │ ├── KoinApplicationLazyExt.kt │ │ │ ├── KoinLazyExt.kt │ │ │ ├── context │ │ │ │ └── LoadLazyModules.kt │ │ │ ├── coroutine │ │ │ │ └── KoinCoroutinesEngine.kt │ │ │ ├── extension │ │ │ │ └── KoinCoroutinesExtension.kt │ │ │ └── module │ │ │ │ ├── LazyModule.kt │ │ │ │ └── LazyModuleExt.kt │ │ │ ├── dsl │ │ │ └── LazyModuleDSL.kt │ │ │ └── mp │ │ │ └── KoinPlatformCoroutinesTools.kt │ │ ├── commonTest │ │ └── kotlin │ │ │ └── LazyModuleOperatorTest.kt │ │ ├── jsMain │ │ └── kotlin │ │ │ └── org.koin.mp │ │ │ └── KoinPlatformCoroutinesTools.kt │ │ ├── jvmMain │ │ └── kotlin │ │ │ └── org │ │ │ └── koin │ │ │ ├── core │ │ │ ├── KoinWaitExt.kt │ │ │ └── context │ │ │ │ └── ContextWaitJVM.kt │ │ │ └── mp │ │ │ └── KoinPlatformCoroutinesTools.kt │ │ ├── jvmTest │ │ └── kotlin │ │ │ └── org │ │ │ └── koin │ │ │ └── test │ │ │ ├── ExtensionTest.kt │ │ │ ├── LazyModuleOperatorTest.kt │ │ │ ├── PerfsTest.kt │ │ │ ├── classes.kt │ │ │ └── module_400.kt │ │ └── nativeMain │ │ └── kotlin │ │ └── org │ │ └── koin │ │ └── mp │ │ └── KoinPlatformCoroutinesTools.kt ├── koin-core-viewmodel-navigation │ ├── api │ │ └── koin-core-viewmodel-navigation.api │ ├── build.gradle.kts │ └── src │ │ └── commonMain │ │ └── kotlin │ │ └── org │ │ └── koin │ │ └── viewmodel │ │ └── CreationNavExtrasExt.kt ├── koin-core-viewmodel │ ├── api │ │ └── koin-core-viewmodel.api │ ├── build.gradle.kts │ └── src │ │ └── commonMain │ │ └── kotlin │ │ └── org │ │ └── koin │ │ ├── core │ │ └── module │ │ │ └── dsl │ │ │ ├── ModuleExt.kt │ │ │ ├── ScopeSetExt.kt │ │ │ ├── ScopeViewModelOf.kt │ │ │ └── ViewModelOf.kt │ │ └── viewmodel │ │ ├── BundleExt.kt │ │ ├── CreationExtrasExt.kt │ │ ├── GetViewModel.kt │ │ └── factory │ │ ├── AndroidParametersHolder.kt │ │ └── KoinViewModelFactory.kt ├── koin-core │ ├── api │ │ └── koin-core.api │ ├── build.gradle.kts │ └── src │ │ ├── commonMain │ │ └── kotlin │ │ │ └── org │ │ │ └── koin │ │ │ ├── core │ │ │ ├── Koin.kt │ │ │ ├── KoinApplication.kt │ │ │ ├── annotation │ │ │ │ └── KoinAnnotations.kt │ │ │ ├── component │ │ │ │ ├── KoinComponent.kt │ │ │ │ └── KoinScopeComponent.kt │ │ │ ├── context │ │ │ │ ├── DefaultContextExt.kt │ │ │ │ └── KoinContext.kt │ │ │ ├── definition │ │ │ │ ├── BeanDefinition.kt │ │ │ │ ├── Callbacks.kt │ │ │ │ └── KoinDefinition.kt │ │ │ ├── error │ │ │ │ ├── ClosedScopeException.kt │ │ │ │ ├── DefinitionOverrideException.kt │ │ │ │ ├── DefinitionParameterException.kt │ │ │ │ ├── InstanceCreationException.kt │ │ │ │ ├── KoinApplicationAlreadyStartedException.kt │ │ │ │ ├── MissingPropertyException.kt │ │ │ │ ├── MissingScopeValueException.kt │ │ │ │ ├── NoDefinitionFoundException.kt │ │ │ │ ├── NoParameterFoundException.kt │ │ │ │ ├── NoPropertyFileFoundException.kt │ │ │ │ ├── NoScopeDefFoundException.kt │ │ │ │ ├── ScopeAlreadyCreatedException.kt │ │ │ │ └── ScopeNotCreatedException.kt │ │ │ ├── extension │ │ │ │ ├── ExtensionManager.kt │ │ │ │ └── KoinExtension.kt │ │ │ ├── instance │ │ │ │ ├── FactoryInstanceFactory.kt │ │ │ │ ├── InstanceFactory.kt │ │ │ │ ├── ResolutionContext.kt │ │ │ │ ├── ScopedInstanceFactory.kt │ │ │ │ └── SingleInstanceFactory.kt │ │ │ ├── logger │ │ │ │ ├── EmptyLogger.kt │ │ │ │ └── Logger.kt │ │ │ ├── module │ │ │ │ ├── Markers.kt │ │ │ │ ├── Module.kt │ │ │ │ └── dsl │ │ │ │ │ ├── FactoryOf.kt │ │ │ │ │ ├── New.kt │ │ │ │ │ ├── OptionDSL.kt │ │ │ │ │ ├── ScopedFactoryOf.kt │ │ │ │ │ ├── ScopedOf.kt │ │ │ │ │ └── SingleOf.kt │ │ │ ├── parameter │ │ │ │ └── ParametersHolder.kt │ │ │ ├── qualifier │ │ │ │ ├── Qualifier.kt │ │ │ │ ├── StringQualifier.kt │ │ │ │ └── TypeQualifier.kt │ │ │ ├── registry │ │ │ │ ├── InstanceRegistry.kt │ │ │ │ ├── PropertyRegistry.kt │ │ │ │ └── ScopeRegistry.kt │ │ │ ├── scope │ │ │ │ ├── Scope.kt │ │ │ │ └── ScopeCallback.kt │ │ │ └── time │ │ │ │ ├── DurationExt.kt │ │ │ │ ├── Measure.kt │ │ │ │ └── Timer.kt │ │ │ ├── dsl │ │ │ ├── DefinitionBinding.kt │ │ │ ├── KoinApplication.kt │ │ │ ├── KoinConfiguration.kt │ │ │ ├── ModuleDSL.kt │ │ │ └── ScopeDSL.kt │ │ │ ├── ext │ │ │ ├── InjectProperty.kt │ │ │ ├── KClassExt.kt │ │ │ └── StringExt.kt │ │ │ └── mp │ │ │ ├── KoinPlatform.kt │ │ │ ├── KoinPlatformTimeTools.kt │ │ │ ├── KoinPlatformTools.kt │ │ │ └── ThreadLocal.kt │ │ ├── commonTest │ │ ├── kotlin │ │ │ └── org │ │ │ │ └── koin │ │ │ │ ├── Components.kt │ │ │ │ ├── KoinCoreTest.kt │ │ │ │ ├── core │ │ │ │ ├── AttributesTest.kt │ │ │ │ ├── CascadeParamTest.kt │ │ │ │ ├── ClosedScopeAPI.kt │ │ │ │ ├── ConcurrencyTest.kt │ │ │ │ ├── CoroutinesTest.kt │ │ │ │ ├── DeclareInstanceJVMTest.kt │ │ │ │ ├── DeclareInstanceTest.kt │ │ │ │ ├── DefinitionOverrideTest.kt │ │ │ │ ├── DynamicModulesTest.kt │ │ │ │ ├── ErrorCheckTest.kt │ │ │ │ ├── GenericDeclarationTest.kt │ │ │ │ ├── GlobalToScopeTest.kt │ │ │ │ ├── InstanceReleaseTest.kt │ │ │ │ ├── InstanceResolutionTest.kt │ │ │ │ ├── KoinApplicationIsolationTest.kt │ │ │ │ ├── LazyInstanceResolution.kt │ │ │ │ ├── MultipleModuleDeclarationTest.kt │ │ │ │ ├── MultithreadTest.kt │ │ │ │ ├── ObjectScopeTest.kt │ │ │ │ ├── OpenCloseScopeInstanceTest.kt │ │ │ │ ├── OverrideAndCreateatStartTest.kt │ │ │ │ ├── ParameterStackTest.kt │ │ │ │ ├── ParametersHolderTest.kt │ │ │ │ ├── ParametersInjectionTest.kt │ │ │ │ ├── ScopeAPITest.kt │ │ │ │ ├── ScopeInfoTest.kt │ │ │ │ ├── ScopeShadowingTest.kt │ │ │ │ ├── ScopeTest.kt │ │ │ │ ├── SetterInjectTest.kt │ │ │ │ └── SourceScopeTest.kt │ │ │ │ ├── dsl │ │ │ │ ├── AdditionalTypeBindingTest.kt │ │ │ │ ├── CloseDefinitionTest.kt │ │ │ │ ├── ConstructorDSLTest.kt │ │ │ │ ├── CreateOnStart.kt │ │ │ │ ├── EnvironmentPropertyDefinitionTest.kt │ │ │ │ ├── FilePropertyDefinitionTest.kt │ │ │ │ ├── FlattenTest.kt │ │ │ │ ├── KoinAppCreationTest.kt │ │ │ │ ├── ModuleAndPropertiesTest.kt │ │ │ │ ├── ModuleCreationTest.kt │ │ │ │ ├── ModuleDeclarationRulesTest.kt │ │ │ │ ├── ModuleFactoryIsolationTest.kt │ │ │ │ ├── ModuleIncludeTest.kt │ │ │ │ ├── ModuleRestartTest.kt │ │ │ │ ├── ModuleSpecialRulesTest.kt │ │ │ │ ├── NamingTest.kt │ │ │ │ ├── NewDSLTest.kt │ │ │ │ └── PropertyDefinitionTest.kt │ │ │ │ ├── full │ │ │ │ └── TODOAppTest.kt │ │ │ │ ├── koincomponent │ │ │ │ ├── AppTest.kt │ │ │ │ ├── CustomKoinComponentTest.kt │ │ │ │ ├── KoinComponentTest.kt │ │ │ │ └── TODOAppTest.kt │ │ │ │ └── test │ │ │ │ ├── Asserts.kt │ │ │ │ └── KoinApplicationExt.kt │ │ └── resources │ │ │ └── koin.properties │ │ ├── jsMain │ │ └── kotlin │ │ │ └── org │ │ │ └── koin │ │ │ ├── core │ │ │ ├── context │ │ │ │ └── GlobalContext.kt │ │ │ └── logger │ │ │ │ └── PrintLogger.kt │ │ │ └── mp │ │ │ ├── KoinPlatformTools.js.kt │ │ │ ├── PlatformTimeTools.kt │ │ │ ├── PlatformTools.kt │ │ │ └── ThreadLocal.kt │ │ ├── jvmMain │ │ └── kotlin │ │ │ └── org │ │ │ └── koin │ │ │ ├── KoinApplicationExt.kt │ │ │ ├── core │ │ │ ├── context │ │ │ │ └── GlobalContext.kt │ │ │ ├── logger │ │ │ │ └── PrintLogger.kt │ │ │ ├── registry │ │ │ │ └── PropertyRegistryExt.kt │ │ │ └── scope │ │ │ │ └── ScopeJVM.kt │ │ │ ├── java │ │ │ └── KoinJavaComponent.kt │ │ │ └── mp │ │ │ ├── KoinPlatformTimeTools.kt │ │ │ ├── KoinPlatformTools.jvm.kt │ │ │ ├── KoinPlatformTools.kt │ │ │ └── ThreadLocal.kt │ │ ├── jvmTest │ │ └── kotlin │ │ │ └── org │ │ │ └── koin │ │ │ ├── core │ │ │ ├── DebugLogTest.kt │ │ │ ├── ParametersTest.kt │ │ │ ├── StringTest.kt │ │ │ └── instance │ │ │ │ ├── Classes.kt │ │ │ │ ├── CreateAPITest.kt │ │ │ │ ├── ReflectAPITest.kt │ │ │ │ └── ScopedMVPArchitectureTest.kt │ │ │ ├── java │ │ │ ├── ComponentC.java │ │ │ ├── DataFetcher.java │ │ │ ├── KoinJavaComponentTest.kt │ │ │ ├── UnitJavaStuff.kt │ │ │ └── UnitJavaTest.java │ │ │ └── perfs │ │ │ ├── PerfsTest.kt │ │ │ ├── classes.kt │ │ │ └── module_400.kt │ │ ├── nativeMain │ │ └── kotlin │ │ │ └── org │ │ │ └── koin │ │ │ ├── core │ │ │ ├── context │ │ │ │ └── GlobalContext.kt │ │ │ ├── logger │ │ │ │ └── PrintLogger.kt │ │ │ └── module │ │ │ │ └── ModuleExt.kt │ │ │ └── mp │ │ │ ├── KoinPlatformTimeTools.kt │ │ │ ├── KoinPlatformTools.kt │ │ │ ├── KoinPlatformTools.native.kt │ │ │ └── ThreadLocal.kt │ │ └── wasmJsMain │ │ └── kotlin │ │ └── org │ │ └── koin │ │ ├── core │ │ ├── context │ │ │ └── GlobalContext.kt │ │ └── logger │ │ │ └── PrintLogger.kt │ │ └── mp │ │ ├── KoinPlatformTools.wasmJs.kt │ │ ├── PlatformTimeTools.kt │ │ ├── PlatformTools.kt │ │ └── ThreadLocal.kt ├── koin-fu-viewmodel │ ├── api │ │ └── koin-fu-viewmodel.api │ ├── build.gradle.kts │ └── src │ │ ├── jvmMain │ │ └── kotlin │ │ │ └── org │ │ │ └── koin │ │ │ └── dsl │ │ │ └── fu │ │ │ └── KoinFuVIewModelDSL.kt │ │ └── jvmTest │ │ └── kotlin │ │ └── org │ │ └── koin │ │ └── test │ │ └── KoinFunctionalDSLTest.kt ├── koin-fu │ ├── api │ │ └── koin-fu.api │ ├── build.gradle.kts │ └── src │ │ ├── jvmMain │ │ └── kotlin │ │ │ └── org │ │ │ └── koin │ │ │ └── dsl │ │ │ └── fu │ │ │ ├── KoinFu.kt │ │ │ └── KoinFuDSL.kt │ │ └── jvmTest │ │ └── kotlin │ │ └── org │ │ └── koin │ │ └── test │ │ ├── KoinFunctionalDSLTest.kt │ │ ├── classes.kt │ │ ├── module_400.kt │ │ └── module_400_fu.kt ├── koin-test-junit4 │ ├── api │ │ └── koin-test-junit4.api │ ├── build.gradle.kts │ └── src │ │ ├── main │ │ └── kotlin │ │ │ └── org │ │ │ └── koin │ │ │ └── test │ │ │ ├── AutoCloseKoinTest.kt │ │ │ ├── KoinTestRule.kt │ │ │ └── mock │ │ │ └── MockProviderRule.kt │ │ └── test │ │ ├── kotlin │ │ └── org │ │ │ └── koin │ │ │ └── test │ │ │ ├── Components.kt │ │ │ ├── DeclareKoinContextFromRuleTest.kt │ │ │ ├── DeclareMockFromKoinTest.kt │ │ │ ├── DeclareMockTests.kt │ │ │ └── KoinTestRuleTest.kt │ │ └── resources │ │ └── koin.properties ├── koin-test-junit5 │ ├── api │ │ └── koin-test-junit5.api │ ├── build.gradle.kts │ └── src │ │ ├── main │ │ └── kotlin │ │ │ └── org │ │ │ └── koin │ │ │ └── test │ │ │ └── junit5 │ │ │ ├── AutoCloseKoinTest.kt │ │ │ ├── KoinTestExtension.kt │ │ │ └── mock │ │ │ └── MockProviderExtension.kt │ │ └── test │ │ └── kotlin │ │ └── org │ │ └── koin │ │ └── test │ │ └── junit5 │ │ ├── Components.kt │ │ ├── DeclareKoinContextFromExtensionTest.kt │ │ ├── DeclareMockFromKoinTest.kt │ │ └── DeclareMockTests.kt └── koin-test │ ├── api │ └── koin-test.api │ ├── build.gradle.kts │ └── src │ ├── commonMain │ └── kotlin │ │ └── org │ │ └── koin │ │ └── test │ │ ├── KoinTest.kt │ │ ├── check │ │ ├── CheckModules.kt │ │ └── CheckModulesDSL.kt │ │ ├── mock │ │ ├── Declare.kt │ │ ├── DeclareMock.kt │ │ └── MockProvider.kt │ │ └── parameter │ │ └── MockParameter.kt │ ├── commonTest │ ├── kotlin │ │ └── org │ │ │ └── koin │ │ │ └── test │ │ │ ├── Components.kt │ │ │ ├── DeclareTest.kt │ │ │ └── KoinQualifierTest.kt │ └── resources │ │ └── koin.properties │ ├── jvmMain │ └── kotlin │ │ └── org │ │ └── koin │ │ └── test │ │ └── verify │ │ ├── CircularInjectionException.kt │ │ ├── MissingKoinDefinitionException.kt │ │ ├── ParameterTypeInjection.kt │ │ ├── Verification.kt │ │ └── VerifyModule.kt │ └── jvmTest │ └── kotlin │ ├── CheckModulesTest.kt │ ├── Components.kt │ └── VerifyModulesTest.kt ├── deps.txt ├── gradle.properties ├── gradle ├── libs.versions.toml ├── publish-android.gradle.kts ├── publish-java.gradle.kts ├── publish-pom.gradle.kts ├── publish.gradle.kts ├── signing.gradle.kts └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── install.sh ├── ktor ├── koin-ktor │ ├── api │ │ └── koin-ktor.api │ ├── build.gradle.kts │ └── src │ │ ├── main │ │ └── kotlin │ │ │ └── org │ │ │ └── koin │ │ │ └── ktor │ │ │ ├── ext │ │ │ ├── ApplicationCallExt.kt │ │ │ ├── ApplicationExt.kt │ │ │ ├── RouteExt.kt │ │ │ └── RoutingExt.kt │ │ │ └── plugin │ │ │ ├── KoinApplicationEvents.kt │ │ │ ├── KoinIsolatedContextPlugin.kt │ │ │ ├── KoinPlugin.kt │ │ │ └── RequestScope.kt │ │ └── test │ │ └── kotlin │ │ └── org │ │ └── koin │ │ └── ktor │ │ └── ext │ │ ├── KoinFeatureTest.kt │ │ └── KoinPluginRunTest.kt └── koin-logger-slf4j │ ├── api │ └── koin-logger-slf4j.api │ ├── build.gradle.kts │ └── src │ └── main │ └── kotlin │ └── org │ └── koin │ └── logger │ ├── KoinApplicationExt.kt │ └── SLF4JLogger.kt ├── plugins └── koin-gradle-plugin │ ├── api │ └── koin-gradle-plugin.api │ ├── build.gradle.kts │ └── src │ └── main │ ├── java │ └── org │ │ └── koin │ │ └── gradle │ │ └── KoinPlugin.kt │ └── resources │ └── META-INF │ └── gradle-plugins │ └── koin.properties ├── release.sh ├── settings.gradle.kts ├── test-macos.sh └── test.sh /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | # github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 3 | open_collective: koin 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | **Describe the bug** 8 | A clear and concise description of what the bug is. 9 | 10 | **To Reproduce** 11 | Steps to reproduce the behavior: 12 | 1. Go to '...' 13 | 2. Click on '....' 14 | 3. Scroll down to '....' 15 | 4. See error 16 | 17 | **Expected behavior** 18 | A clear and concise description of what you expected to happen. 19 | 20 | **Koin module and version:** 21 | [e.g]: `koin-core:3.4.3` 22 | 23 | **Snippet or Sample project to help reproduce** 24 | Add a snippet or even a small sample project to help reproduce your case. 25 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | If your feature request is a new feature design, please follow [Koin KFIP](https://github.com/InsertKoinIO/KFIP?tab=readme-ov-file) request. 8 | 9 | **Is your feature request related to a problem? Please describe.** 10 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 11 | 12 | **Describe the solution you'd like** 13 | A clear and concise description of what you want to happen. 14 | 15 | **Describe alternatives you've considered** 16 | A clear and concise description of any alternative solutions or features you've considered. 17 | 18 | **Target Koin project** 19 | Specify the Koin project than will embed the feature. 20 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 150 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 7 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - pinned 8 | - security 9 | - status:accepted 10 | - status:checking 11 | - type:issue 12 | - issue 13 | # Label to use when marking an issue as stale 14 | staleLabel: status:wontfix 15 | # Comment to post when marking an issue as stale. Set to `false` to disable 16 | markComment: > 17 | This issue has been automatically marked as stale because it has not had 18 | recent activity. It will be closed if no further activity occurs. Thank you 19 | for your contributions. 20 | # Comment to post when closing a stale issue. Set to `false` to disable 21 | closeComment: false -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | tags: 6 | - '*' 7 | 8 | env: 9 | IS_RELEASE: true 10 | OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} 11 | OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} 12 | SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} 13 | SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} 14 | SIGNING_KEY: ${{ secrets.SIGNING_KEY }} 15 | 16 | jobs: 17 | release: 18 | runs-on: macos-latest 19 | 20 | steps: 21 | - name: Checkout 22 | uses: actions/checkout@v3 23 | 24 | - name: Validate Gradle Wrapper 25 | uses: gradle/wrapper-validation-action@v3 26 | 27 | - name: Set up JDK 28 | uses: actions/setup-java@v3 29 | with: 30 | distribution: 'zulu' 31 | java-version: 17 32 | 33 | - name: Setup Gradle 34 | uses: gradle/actions/setup-gradle@v3 35 | 36 | - name: Install 37 | run: cd projects && ./install.sh 38 | 39 | - name: Release 40 | run: cd projects && ./release.sh 41 | 42 | 43 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Test Examples 2 | 3 | on: 4 | push: 5 | branches: 6 | - '*' 7 | - '*/*' 8 | pull_request: 9 | branches: 10 | - '*' 11 | - '*/*' 12 | 13 | concurrency: 14 | group: test-examples-${{ github.ref }} 15 | cancel-in-progress: true 16 | 17 | jobs: 18 | 19 | run-tests: 20 | runs-on: ubuntu-latest 21 | timeout-minutes: 30 22 | 23 | steps: 24 | - name: Checkout 25 | uses: actions/checkout@v3 26 | 27 | - name: Validate Gradle Wrapper 28 | uses: gradle/wrapper-validation-action@v3 29 | 30 | - name: Set up JDK 31 | uses: actions/setup-java@v3 32 | with: 33 | distribution: 'zulu' 34 | java-version: 17 35 | 36 | - name: Setup Gradle 37 | uses: gradle/actions/setup-gradle@v3 38 | 39 | - name: Install 40 | run: cd projects && ./install.sh 41 | 42 | - name: Test Examples 43 | run: cd examples && ./test.sh 44 | 45 | -------------------------------------------------------------------------------- /.github/workflows/weekly.yml: -------------------------------------------------------------------------------- 1 | name: Weekly Benchmark 2 | 3 | on: 4 | schedule: 5 | - cron: '0 0 * * 0' # sunday weekly 6 | 7 | jobs: 8 | 9 | jvm-benchmark: 10 | runs-on: ubuntu-latest 11 | timeout-minutes: 30 12 | 13 | steps: 14 | - name: Checkout 15 | uses: actions/checkout@v3 16 | 17 | - name: Validate Gradle Wrapper 18 | uses: gradle/wrapper-validation-action@v3 19 | 20 | - name: Set up JDK 21 | uses: actions/setup-java@v3 22 | with: 23 | distribution: 'zulu' 24 | java-version: 17 25 | 26 | - name: Setup Gradle 27 | uses: gradle/gradle-build-action@v2 28 | 29 | - name: Install 30 | run: cd projects && ./install.sh 31 | 32 | - name: Benchmark 33 | run: cd projects && ./benchmark.sh 34 | 35 | 36 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | out/ 2 | build/ 3 | .idea/ 4 | *.iml 5 | .gradle 6 | local.properties 7 | classes/ 8 | .DS_Store 9 | /build 10 | /captures 11 | yarn.lock 12 | .kotlin/ 13 | -------------------------------------------------------------------------------- /docs/img/koin_main_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InsertKoinIO/koin/eb9303c5cf1b4bfad8e81a760e5fac9af2cf5621/docs/img/koin_main_logo.png -------------------------------------------------------------------------------- /docs/img/sponsors/stream-logo-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InsertKoinIO/koin/eb9303c5cf1b4bfad8e81a760e5fac9af2cf5621/docs/img/sponsors/stream-logo-2x.png -------------------------------------------------------------------------------- /docs/img/sponsors/stream-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InsertKoinIO/koin/eb9303c5cf1b4bfad8e81a760e5fac9af2cf5621/docs/img/sponsors/stream-logo.png -------------------------------------------------------------------------------- /docs/reference/introduction.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: What is Koin? 3 | --- 4 | 5 | 6 | Koin is a pragmatic and lightweight dependency injection framework for Kotlin developers. 7 | 8 | `Koin is a DSL, a light container and a pragmatic API` 9 | 10 | -------------------------------------------------------------------------------- /docs/reference/koin-core/extension-manager.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Extension Manager 3 | --- 4 | 5 | Here is a brief description of `KoinExtension` manager, dedicated to add new features inside Koin framework. 6 | 7 | ## Defining an extension 8 | 9 | A Koin extension consist in having a class inheriting from `KoinExtension` interface: 10 | 11 | ```kotlin 12 | interface KoinExtension { 13 | 14 | var koin : Koin 15 | 16 | fun onClose() 17 | } 18 | ``` 19 | 20 | this interface allow to ensure you get passed a `Koin` instance, and the extension is called when Koin is closing. 21 | 22 | ## Starting an extension 23 | 24 | To start an extension, just extend the right place of the system, and register it with `Koin.extensionManager`. 25 | 26 | Below here is how we define the `coroutinesEngine` extension: 27 | 28 | ```kotlin 29 | fun KoinApplication.coroutinesEngine() { 30 | with(koin.extensionManager) { 31 | if (getExtensionOrNull(EXTENSION_NAME) == null) { 32 | registerExtension(EXTENSION_NAME, KoinCoroutinesEngine()) 33 | } 34 | } 35 | } 36 | ``` 37 | 38 | Below here is how we call the `coroutinesEngine` extension: 39 | 40 | ```kotlin 41 | val Koin.coroutinesEngine: KoinCoroutinesEngine get() = extensionManager.getExtension(EXTENSION_NAME) 42 | ``` -------------------------------------------------------------------------------- /docs/reference/koin-ktor/ktor-isolated.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Ktor & Koin Isolated Context 3 | --- 4 | 5 | The `koin-ktor` module is dedicated to bring dependency injection for Ktor. 6 | 7 | 8 | ## Isolated Koin Context Plugin 9 | 10 | To start an Isolated Koin container in Ktor, just install the `KoinIsolated` plugin like follow: 11 | 12 | ```kotlin 13 | fun Application.main() { 14 | // Install Koin plugin 15 | install(KoinIsolated) { 16 | slf4jLogger() 17 | modules(helloAppModule) 18 | } 19 | } 20 | ``` 21 | 22 | :::warning 23 | By using an isolated Koin context you won't be able to use Koin outside Ktor server instance (i.e: by using `GlobalContext` for example) 24 | ::: 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /docs/setup/migrate.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Migration Guides (Deprecated) 3 | --- 4 | 5 | Follow new [Releases Guide](../support/releases.md) to help your migration process 6 | 7 | -------------------------------------------------------------------------------- /examples/README: -------------------------------------------------------------------------------- 1 | # Koin Sandbox Projects 2 | 3 | Use of Java 17 -------------------------------------------------------------------------------- /examples/android-perfs/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/android-perfs/src/main/java/org/koin/sample/android/main/MainApplication.kt: -------------------------------------------------------------------------------- 1 | package org.koin.sample.android.main 2 | 3 | import android.app.Application 4 | import kotlinx.coroutines.runBlocking 5 | import org.koin.benchmark.PerfLimit 6 | import org.koin.benchmark.PerfResult 7 | import org.koin.benchmark.PerfRunner.runAll 8 | import org.koin.benchmark.perfModule400 9 | 10 | class MainApplication : Application() { 11 | override fun onCreate() { 12 | super.onCreate() 13 | 14 | runBlocking { 15 | results = runAll(useDebugLogs = false, module = ::perfModule400) 16 | // results = runAllLazy(useDebugLogs = false, module = ::perfModule400_LazyFu) 17 | results!!.applyLimits(limits) 18 | } 19 | } 20 | 21 | companion object { 22 | val limits = PerfLimit(27.0, 0.150) 23 | var results : PerfResult? = null 24 | } 25 | } -------------------------------------------------------------------------------- /examples/android-perfs/src/main/res/layout/main_activity.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | -------------------------------------------------------------------------------- /examples/android-perfs/src/main/res/layout/mvp_activity.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 |