koin v2.1.0 Release Notes

Release Date: 2020-02-24 // about 4 years ago
  • Core

    • ⚡️ [UPDATED] - introduce the KoinContextHandler component that is responsible to manage GlobalContext from startKoin. This will allow us to unlock new kind of context for Koin MP & better isolation (not directly a object that we pass around). To get your Koin instance, now use KoinContextHandler.get(), once you have started it. koinApplication { } users have to register manually to KoinContextHandler if needed

    beta-3

    • ⚡️ doc updates

    Test

    • [ADDED] - CheckModule category

    Gradle_PLugin

    • 🔌 [ADDED] - CheckModule Gradle Plugin

    beta-1

    Core

    • [ADDED] - Enum class can be used as Qualifier: named(MyEnum.MyValue)

    alpha-11

    Core

    • 🛠 [FIXED] - stopKoin closes scopes #702

    AndroidX-ViewModel

    • 🛠 [FIXED] - added/fixed for better State ViewModel getStateViewModel and by stateViewModel() API

    Android

    • [ADDED] - KoinAndroidApplication to let you create a KoinApplication instance with Android context, and let you use KoinApplication DSL

    alpha-10

    Core

    • ⚡️ [UPDATED] - updated + oprator for modules
    • [ADDED] - Scope Links, to link scope to another and help resolve shared instances

    alpha-8

    📄 Docs

    • ⚡️ [UPDATED] - updated koin-core Scope section
    • [ADDED] - inject on a setter property with inject()

    Android-Scope

    • ⚡️ [UPDATED] - updated currentScope to use lifecycleScope instead
    • 🛠 [FIXED] - ScopeCompat for Java compat function

    AndroidX-Scope

    • ⚡️ [UPDATED] - updated currentScope to use lifecycleScope instead
    • 🛠 [FIXED] - ScopeCompat for Java compat function

    AndroidX-Factory

    • 🛠 [FIXED] - Fragment declaration in a scope

    Core

    • [ADDED] - DSL declare a scope with type directly with scope<MyType> { ... }
    • 👍 [ADDED] - smarter better API to use scope from an object instance (getOrCreateScope ...)
    • [ADDED] - scope property to any instance, to get tied declared scope
    • [ADDED] - inject on a setter property with inject()

    Core-Ext

    • [ADDED] - inject all setter property with inject() on an instance

    alpha-7

    Android-ViewModel

    • ⚡️ [UPDATED] - updated ViewModelParameter API around to help integrate it more easily with 3rd party access

    AndroidX-ViewModel

    • ⚡️ [UPDATED] - updated ViewModelParameter API around to help integrate it more easily with 3rd party access

    AndroidX-Factory

    • [ADDED] - KoinFragmentFactory API to setup Fragment injection

    Core

    • ⚡️ [UPDATED] - Reworked all resolution engine to use immutable BeanDefinition & base the resolution on Scope & ScopeDefinition
    • ⚡️ [UPDATED] - Locking Strategy to avoid usage of ConcurrentHashMap
    • ⚡️ [UPDATED] - Replace BeanRegistry with InstanceRegistry & ScopeRegistry
    • ⚡️ [UPDATED] - added closed status to Scope
    • 🛠 [FIXED] - Fixed bugs related to closed scopes
    • 🛠 [FIXED] - Can now allow to resolve different types with same Qualifer
    • [ADDED] - Module loaded property in order to allow later "reloading"
    • [ADDED] - Java helpers are now part of the koin-core project
    • [ADDED] - bind() oeprator on a definition, that use reified Type
    • [ADDED] - q() operator to declare a String or a Type

    Java

    • 🚚 [REMOVED] - project is now part of koin-core

    Test

    • ⚡️ [UPDATED] - Check modules with checkModules { } that open an KoinApplication declaration
    • 🤡 [ADDED] - MockProviderRule & MockProvider to manually provide mocking capacity, absed of the desired mocing framework
    • 🚚 [REMOVED] - Link to Mockito library

    📚 Documentation

    • 📚 [UPDATED] - New documentation system based on docisfy, to help deploy easily markdown doc. Documentation is now in /docs folder