koin v2.0.0 Release Notes
Release Date: 2019-05-27 // almost 5 years ago-
Android
- ⚡️
[UPDATED]
- rework startking DSL to add extension in startKoin (androidContext
,androidLogger
)
Android-Scope
- ⚡️
[UPDATED]
- rework according to new Scope API (manage compelte Scope Lifecycle) [ADDED]
-currentScope
property scope tied to current Activity or Fragment[ADDED]
-currentScope
is aware of anyKoinComponent
& currentScope override- ⚡️
[UPDATED]
- ScopeID generation
Android-ViewModel
- 👍
[ADDED]
- support for new Scope API - 🏗
[REMOVED]
- removed koin-ext builder API - ⚡️
[UPDATED]
- make the API open to Koin instance isolation - 🛠
[FIXED]
- https://github.com/InsertKoinIO/koin/issues/452 - Named qualifier does not work with view models - Now take qualifier as ViewModel's Tag - 🛠
[FIXED]
- by viewModel & getViewModel with clazz version - 🛠
[FIXED]
- ViewModel definition in scope
AndroidX-Scope
- ⚡️
[UPDATED]
- update API regarding the changes inkoin-android-scope
- ⚡️
[UPDATED]
- ScopeID generation
AndroidX-ViewModel
- ⚡️
[UPDATED]
- update API regarding the changes inkoin-android-viewmodel
- 🛠
[FIXED]
- https://github.com/InsertKoinIO/koin/issues/452 - Named qualifier does not work with view models - Now take qualifier as ViewModel's Tag - 🛠
[FIXED]
- by viewModel & getViewModel with clazz version - 🛠
[FIXED]
- ViewModel definition in scope
Core
- ⚡️
[UPDATED]
- startKoin replaced with startKoin DSL and koin in global context - 🐎
[UPDATED]
- complete internals rewritten for performances optimisation (startup & injection) - ⚡️
[UPDATED]
-KoinComponent
now can overridegetKoin()
to target a custom Koin instance ¤tScope()
to target a Scope that is used for all injections [ADDED]
- koinApplication function to help declare an instance for a local context, in ordoer to help isolated Koin instances- 🚀
[UPDATED]
- rework Scope API (multiple instances definitions, properties, release, callback ...) - ⚡️
[UPDATED]
- rework Scope DSL (scope/scoped) & lock single/factory - ⚡️
[UPDATED]
- rework internals to use root Scope & separate Scope instances, with different bean registry - 🚀
[ADDED]
- onClose, onRelease DSL on single/factory/scoped to execute code when releasing instance or stopping container - 0️⃣
[ADDED]
- getProperty with default value - ⚡️
[UPDATED]
- Kotlin 1.3.21 [ADDED]
- Qualifiers withnamed()
function to replace old string names. Allow to use Types[ADDED]
-getOrNull()
andinjectOrNull()
to safely resolve potential components and get null of not present- ⚡️
[UPDATED]
- additional binding API, withgetAll<S>()
&bind<P,S>()
operator to look for instances regarding secondary type definition [ADDED]
-declare()
on Koin & Scope, to help declare an instance on the fly- 🛠
[FIXED]
- Factory declaration in scope
✅ Test
- ⚡️
[UPDATED]
- rework testing API, codebase detached from internal core tests - ⚡️
[UPDATED]
- checkModules now rely on pure Kotlin & withcreate
parameters DSL
Java
- ⚡️
[UPDATED]
- updatedKoinJavaComponent
for the new API - 🛠
[FIXED]
- https://github.com/InsertKoinIO/koin/issues/451 - No longer possible to get objects from a scope in Java code -scope
parameter to allow resolve a dependency from this scope instance - 🛠
[FIXED]
- Get access to scope instance
Ktor
- ⚡️
[UPDATED]
- rework startking DSL to add extension in startKoin [ADDED]
- Koin as a Ktor feature
Spark
- 🚚
[REMOVED]
project non ported to Koin 2.0
- ⚡️