Badges: [UPDATED]
, [FIXED]
, [NEW]
, [DEPRECATED]
, [REMOVED]
, [BREAKING]
, [Experimental]
- Update to update
koin-ktor
to3.5.1
- Fix Ktor Koin plugin with the right start process by @arnaudgiuliani in #1657
- Bump BOM & koin-ktor to 3.5.1 by @arnaudgiuliani in #1658
- Create BOM for Koin
io.insert-koin:koin-bom
to cover koin projects, by @arnaudgiuliani in 73acbcf0bee45388aef83a2c03040db7002459bc, Fix #1519
Version upgrades
- Kotlin update to
1.9.0
by @arnaudgiuliani in cc44d818e4184607d77d3a3e587c582966cba318 - JUnit 5 update to
5.9.3
& stately-concurrency to1.2.5
by @arnaudgiuliani in 0e9ec2c072b2d4d45392c04f799e03eb338f5634 - Coroutines lib updates to
1.7.3
by @arnaudgiuliani in 217e2cb97f83ed81163a24efe1602df3b9fbfc7b
Updates
- Type alias NoBeanDefFoundException to NoDefinitionFoundException & KoinAppAlreadyStartedException to ApplicationAlreadyStartedException by @arnaudgiuliani in 901b0cccddc96cd2a9fb096bc31ec58a30a715e3
- Remove old native memory management by @arnaudgiuliani in 313f6dc00d934dbc6bfe185d4d4189010b7d3612
- Remove deprecated use of native time API by @arnaudgiuliani in 0a91bceaba452c8e45aa409b90b10297bc74b299
- Open K2 compiler experiment by @arnaudgiuliani in d7382d92b232296eb37a4adfec4366378d60db47
- Protect Logger internal API by @arnaudgiuliani in 565f642e2ee2e3baf4ab8ffd241eaa6f32575864
- add optional boolean "createEagerinstances" to
loadKoinModules
function, to let decide to create eager instances or not by @arnaudgiuliani in 4477082c00b8a7603b3dcd7b033eddc6a8918946 - Update case of Scope source type shadowing by @arnaudgiuliani in #1595
- Allow includes to take Collection by @DebitCardz in #1632
- update start message by @arnaudgiuliani in 9c7d8d344c71b5da000bafa9eeb426645d29420c
Fixes
- Fixing race condition in Scope - Fixed for 3.5.0 by @octa-one and @arnaudgiuliani in #1643
- Allow to run koinApplication and specify if eager instances are created or not, with
createEagerInstances : Boolean = true
parameter, by @arnaudgiuliani in bbd18decab33a8879d2b4443d760dafcbb668780 - Clean up
verify()
API logs by @arnaudgiuliani in 088d8da2c715bf22bf81a04e8065ca40707866b4 Scope
class is no longer a data class by @arnaudgiuliani in 1110c2a7a1d9173c520565f32623ae411478e357- Improve formatting. by @johnjohndoe in #1608
- Fix number of type parameters for scopedOf dsl by @floatdrop in #1641
- perf The module flattening function can reduce GC using MutableSet by @KAMO030 in #1640
Version upgrades
- android lib updates:
androidx.activity:activity-ktx:1.7.2
,androidx.fragment:fragment-ktx:1.6.1
,androidx.navigation:navigation-fragment-ktx:2.7.1
by @arnaudgiuliani in 1fb1193e5caf565dc5b387a5ae1e67502ec294ba
Fixes
- Fix #1631, Disable BuildConfig for android modules by @5peak2me in #1642
- Dont ignore getviewmodel key by @lammertw and @arnaudgiuliani in #1644
- Fix Java compat for ViewModel creation extras by @arnaudgiuliani #1584
- androidContext redundant bind by @GrzegorzBobryk in #1648
Version upgrades
- ktor
2.3.3
by @arnaudgiuliani in aff4f42ca9afaad3bec1c7d7f3907eb0ea4388c2
Updates
- Koin context isolation for Ktor by @zakhenry in fff847ea9f6a1131c5f39b62f7bd0fb0f8142109
- Koin Request Scope for Ktor by @arnaudgiuliani in 280fdfeb79a5108225dd8c87e72e76405a41ddb8 2e491fb0977be9bcaec2ec95be90751d3ae9456a dc46cec44a14bea61aa7183bb803db59f0eeb920
Version upgrades
- Jetpack & Jetbrains Compose compiler to
1.5.0
by @arnaudgiuliani in ea90be4d94dfa244744704e726793edd4c7bd12a - Android lib update for compose -
androidx.compose.runtime:runtime:1.5.0
,androidx.navigation:navigation-compose:2.7.1
by @arnaudgiuliani in ea90be4d94dfa244744704e726793edd4c7bd12a
New Features
- Compose
KoinIsolatedContext
to help run child composables using a isolated Koin context by @arnaudgiuliani in 8ca591b53e75ad75e08eaf301559bef98db8b2f6 - add KoinContext & KoinAndroidContext with check over CompositionLocalProvider to avoid outdated link to Koin scope - Fix #1557 by @arnaudgiuliani and @jjkester in 61a88bbf79d593c9ed777f5b1acb07caa5e6db2e
Fixes
- koin-compose - Fix #1601 with stable parameter definition holder by @arnaudgiuliani in deb1253d92a723a46acfa76127a5b9c255e3ea64
- Pointed to correct dependancy for koin-test-junit5 in docs by @MarcusDunn in #1610
- Fixed a typo in context-isolation.md by @Deishelon in #1602
- docs: Fix a typo in the context isolation reference by @sschuberth in #1620
- [bugfix] dls documentation by @GrzegorzBobryk in #1645
- Workaround for module include compile issue - Fix #1341 doc note by @arnaudgiuliani in 57c84c3773880b76e1da73837fc93b924c14e42d
- Doc update for Compose features - KoinContext KoinAndroidContext and KoinIsolatedContext by @arnaudgiuliani in 11397b23aacb51ef51454eacfc68246918ee1c33
- Add CodeQL workflow by @jorgectf in #1615
- Use more gradle-build-action by @Goooler in #1628
- Add binary API check format by @arnaudgiuliani in c839ae16fd693f4538202e4808ac45058bc18449
- @MarcusDunn made their first contribution in #1610
- @Deishelon made their first contribution in #1602
- @Goooler made their first contribution in #1628
- @sschuberth made their first contribution in #1620
- @jorgectf made their first contribution in #1615
- @floatdrop made their first contribution in #1641
- @5peak2me made their first contribution in #1642
- @KAMO030 made their first contribution in #1640
- @DebitCardz made their first contribution in #1632
Full Changelog: https://github.com/InsertKoinIO/koin/compare/core-3.4.3...3.5.0
[UPDATED]
-koin-core
3.4.3[FIXED]
- Revert scope Id/name reified update - #1600[FIXED]
- parametersOf is using indexed values + fallback on value for type -
[UPDATED]
-koin-core
3.4.3
[UPDATED]
-koin-core
3.4.3[UPDATED]
- updated to Ktor2.3.2
[UPDATED]
-koin-compose
1.0.4[UPDATED]
- updated libraries - androidx.compose.runtime:runtime:1.4.3, androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1
[FIXED]
- Fixed native target for Compose[UPDATED]
- Compose Compiler to1.4.8
[UPDATED]
-koin-core
3.4.3[UPDATED]
-koin-android
3.4.3
[UPDATED]
-koin-core
3.4.2[FIXED]
- Revert scope Id/name reified update - #1600
[UPDATED]
-koin-core
3.4.2
[UPDATED]
-koin-core
3.4.2[UPDATED]
- updated to Ktor2.3.0
--
[FIXED]
- Fix broken APIworkerOf
andworker
- #1582 #1554[UPDATED]
- Remove borken imports in sample - PR #1577 - Thanks to @pedrofsn[FIXED]
- Fix java static overload - #1579[FIXED]
- Fix Fragment Scope to allow fetch parent scope explicitly withuseParentActivityScope
parameter inFragment.createFragmentScope(useParentActivityScope : Boolean = true)
- #1580[UPDATED]
- lib updateandroidx.fragment:fragment-ktx:1.5.7
[UPDATED]
- lib updateandroidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1
[UPDATED]
- lib updateandroidx.lifecycle:lifecycle-common-java8:2.6.1
[UPDATED]
- lib updateandroidx.work:work-runtime-ktx:2.8.1
[FIXED]
- Fix kotlin files duplication issues, when importing to an Android project[UPDATED]
- coroutines update1.7.1
[UPDATED]
- PR for Documentation updates - #1558 #1587 #1591 #1575 #1555 #1553 #1528 #1520 #1514 #1524 - Thanks to @Pitel @GrzegorzBobryk @lammertw @zsmb13 @christxph @sezikim @enzosego @igorwojda @lalnuo @mecoFarid[FIXED]
- AllowgetScopeId
&getScopeName
to use reified type - Fix for #1536[UPDATED]
- Better error message forcheckModules
- PR #1569 - Thanks @mreichelt[UPDATED]
- Injected parameters are now consumed in order and Ctor DSL can now handle cascade parameetr injection - f92a4c43779280f7a6ca6ca04856468d1484da49 45c3b1229bd1c35d2b1af9e735db41a6b10f2403[UPDATED]
- Kotlin1.8.21
[UPDATED]
-koin-compose
1.0.3[UPDATED]
-koin-androidx-compose
3.4.5[UPDATED]
- lib updateandroidx.compose.runtime:runtime:1.4.3
[FIXED]
- Redeploy all native targets for Compose Multiplatform
--
androidx-compose-3.4.4 - 2023-03-24
[UPDATED]
-koin-compose
1.0.1[UPDATED]
- updated libraries - androidx.compose.runtime:runtime:1.4.1, androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1
compose-1.0.1 - 2023-04-18
[FIXED]
- Fixed native target for Compose[UPDATED]
- Compose Compiler to1.4.0
--
ktor-3.4.0 -2023-03-24
[UPDATED]
-koin-core
3.4.0[UPDATED]
- updated to Ktor 2.2.4
compose-1.0.0 - 2023-03-24
[NEW]
- Koin Jetbrains Compose project[NEW]
- based onorg.jetbrains.compose
in1.3.1
[NEW]
- Compose API -koinInject
to inject Koin dependency into a Composable[NEW]
- Compose API -KoinApplication
to create Koin application as a Composable[NEW][Experimental]
- Compose API -rememberKoinScope
andKoinScope
to handle Koin Scope in a Composable, follow up current to close scope once Composable is ended[NEW][Experimental]
- Compose API -rememberKoinModules
load Koin modules and remember on current Composable
androidx-compose-navigation-3.4.3 - 2023-03-24
[NEW]
- Koin Jetpack Compose Navigation project[NEW]
- handle ViewModel and Navigation withkoinNavViewModel()
function
androidx-compose-3.4.3 - 2023-03-24
[UPDATED]
-koin-android
3.4.0[UPDATED]
- Compose compiler1.4.2
[UPDATED]
- lib updateandroidx.compose.runtime:runtime:1.3.3
[UPDATED]
- lib updateandroidx.lifecycle:lifecycle-viewmodel-compose:2.6.0
[ADDED]
-koin-androidx-compose-navigation
to handlekoinNavViewModel()
function[ADDED]
-koin-compose
1.0 as base project for fundamental feature
android-test-3.4.0 - 2023-03-24
[NEW]
- Koin Android Test project[NEW][Experimental]
- Verify() API with default Android types - withModule.verify
orModule.androidVerify
androidx-workmanager-3.4.0 - 2023-03-24
[UPDATED]
- lib updateandroidx.work:work-runtime-ktx:2.8.0
android-3.4.0 - 2023-03-24
[UPDATED]
-koin-core
3.4.0[UPDATED]
- lib updateandroidx.appcompat:appcompat:1.6.1
[UPDATED]
- lib updateandroidx.activity:activity-ktx:1.6.1
[UPDATED]
- lib updateandroidx.fragment:fragment-ktx:1.5.5
[UPDATED]
- lib updateandroidx.lifecycle:lifecycle-viewmodel-ktx:2.6.0
[UPDATED]
- lib updateandroidx.lifecycle:lifecycle-common-java8:2.6.0
[FIXED]
- Merged PR to add android test coverage #1457 - Thanks @pedrofsn[FIXED]
-SavedStateHandle
injection with #1480[FIXED]
-AndroidScopeComponent
fixed withonCloseScope()
function, to be override to handle content before scope is destroyed #1518
core-coroutines-3.4.0 - 2023-03-24
[NEW]
- Koin Coroutines Engine Extension[NEW]
- usesorg.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4
[NEW][Experimental]
- Background module loading thanks to Kotlin coroutines withlazyModules()
KoinApplication DSL functions.awaitKoinStart()
suspend function to wait background completetion. JVMwaitKoinStart()
function is using runBlocking to wait for completion.[NEW][Experimental]
- Koin Lazy Module, as a Module that don't not trigger any resources preparation. ThelazyModule { }
function help declare suchLazy<Module>
[NEW][Experimental]
- API functions to run Koin function after start:runOnKoinStarted
andonKoinStarted
test-3.4.0 - 2023-03-24
[UPDATED]
- update core-3.4.0[UPDATED]
- verify() now handle centralized types declaration and default types, toavoid having to redeclareextraTypes
each time.[UPDATED]
- verify() now detect circular dependencies
core-3.4.0 - 2023-03-24
[UPDATED]
- update Kotlin 1.8.10[UPDATED]
- Koin DSL Detetction (DSL Compilation check in IDE)[NEW]
- Koin Extension manager to allow extend Koin features[FIXED]
- Merged PR to fix scope source resolution #1503 - Thanks @fesc7420[FIXED]
- Fix resolution log to debug #1520[NEW]
-KoinPlatform
Infrastructure API to help use default context and Koin instance API in a more simple way for Multiplatform.KoinPlatform.getKoin()
returns the current Koin instance.KoinPlatform.startKoin(modules,loggerLevl)
allow to start Koin directly.
androidx-compose-3.4.2 - 2022-02-07
[UPDATED]
-koin-android
3.3.3
androidx-compose-3.4.1 - 2022-12-28
[UPDATED]
-koin-android
3.3.2
androidx-compose-3.4.0 - 2022-12-14
[koin-androidx-compose]
[UPDATED]
- lib update - Kotlin1.7.20
[UPDATED]
-koin-android
3.3.1[UPDATED]
- compose compiler 1.3.2[UPDATED]
- compose runtime 1.3.2
android-3.3.3 - 2022-02-07
[UPDATED]
-koin-core
3.3.3[FIXED]
- #1500 Fix ViewModel Factory to resolve against qualifier[FIXED]
- #1445 ShareViewModelCompat owner fix[FIXED]
- #1494 viewModelOf arguments until 22[UPDATED]
- androidx.fragment:fragment-ktx to 1.5.5[UPDATED]
- androidx.navigation:navigation-fragment-ktx to 2.5.3
ktor-3.3.1 - 2022-02-07
[UPDATED]
-koin-core
3.3.3[UPDATED]
- Ktor 2.2.3
core-3.3.3 - 2022-02-07
[FIXED]
- fix #1479 with new eager instances index
--
ktor-3.3.0 - 2022-12-28
[UPDATED]
-io.ktor:ktor-server-core
2.2.1[UPDATED]
-koin-core
3.3.2
android-3.3.2 - 2022-12-28
[UPDATED]
-koin-core
3.3.2
core-3.3.2 - 2022-12-28
[UPDATED]
- technical update version to 3.3.2
android-3.3.1 - 2022-12-14
[koin-android]
[FIXED]
-SavedStateHandle
injection is now fixed to allow R8/Proguard obfuscation[FIXED]
- #1406 - better useverify()
fucntionModule
to verify all Koin configuration[UPDATED]
- Use of KoinDsl marker to protect the Koin DSL
core-3.3.0 - 2022-12-14
[koin-core]
[UPDATED]
- lib update - Kotlin1.7.21
[FIXED]
- #1306 #1016 - Add native Module extensions to allow add defintions without inlined type[FIXED]
- #834 - ensureonClose
is called when unloading module or closing Koin[FIXED]
- #1353 - parameters stack is now secured with call synchronization[UPDATED]
- #1359 - constructor DSL udpate to take until 22 parameters into account[FIXED]
- #1463 - Fix to allow binding of same type in the current module[UPDATED]
- Documentation update - #1469 #1438[UPDATED]
- Logger API inlined and cleand out - #1271[FIXED]
- Engine resolution race condition #1465[UPDATED]
- Use of KoinDsl marker to protect the Koin DSL
[koin-test]
[NEW]
-verify()
on aModule
to verify all constructors injection with current Koin configuration (static verification). This comes as a replacement proposal forcheckModules
, as a more convenient way to verify a configuration with static verification, more than sandbox running with mocks
android-3.3.0 - 2022-10-19
[koin-android]
[UPDATED]
- lib update -androidx.appcompat:appcompat:1.5.1
[UPDATED]
- lib update -androidx.activity:activity-ktx:1.5.1
[UPDATED]
- lib update -androidx.fragment:fragment-ktx:1.5.3
[UPDATED]
- lib update -androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1
[UPDATED]
- lib update -androidx.lifecycle:lifecycle-common-java8:2.5.1
[UPDATED]
- All Koin ViewModel API to use latestViewModelProvider
extras API ViewModel 2.5.1 . API Signature have been changed to keep the existing API. Such API propagates all extras directly toSavedStateHandle
. AddedownerProducer: () -> ViewModelStoreOwner
, andextrasProducer: (() -> CreationExtras)?
parameters to main function.[FIXED]
- FixSavedStateHandle
injection and lifecycle follow up with newKoinViewModelFactory
[UPDATED]
- Sandbox app updated to check new API[DEPRECATED]
- allstateViewModel()
API functions + all related internals[DEPRECATED]
- any use ofstate: BundleDefinition
property in favor ofextrasProducer: (() -> CreationExtras)
. Functions still works, but a conversion from bundle to extras is needed[NEW]
-activityViewModel()
andgetActivityViewModel()
added to replace thesharedViewModel
functions[DEPRECATED]
- allsharedViewModel()
fucntions in favor ofactivityViewModel()
functions[UPDATED]
- Compile SDK level to 32[UPDATED]
- Updated generic APIviewModelForClass
functions to allow usage ofkey
.state
parameters kept, but need conversi onto extras
[koin-android-compat]
[UPDATED]
- Updated with new ViewModel API internals
[koin-androidx-navigation]
[UPDATED]
- Updated with new ViewModel API internals. AddedownerProducer: () -> ViewModelStoreOwner
, andextrasProducer: (() -> CreationExtras)?
parameters
[koin-androidx-compose]
[UPDATED]
- library updateandroidx.lifecycle:lifecycle-viewmodel-compose:2.5.1
[UPDATED]
- library updateandroidx.navigation:navigation-compose:2.5.2
[UPDATED]
- Compile SDK level to 32[UPDATED]
- Update withkoin-android:3.3.0
to realign internal APIs with ViewModel 2.5.1[UPDATED]
- UpdatedkoinViewModel()
andgetViewModel()
functions to present all needed parameters. Addedkey: String
andextras: CreationExtras
parameters.[DEPRECATED]
-getStateViewModel()
function is now deprecated.SavedStateHandle
can be injected directly withkoinViewModel()
andgetViewModel()
functions[UPDATED]
Compose compiler is at "1.2.0"[UPDATED]
Compose libraries at "1.2.1"
ktor-3.2.2 - 2022-09-23
[UPDATED]
- update with Koin 3.2.2 + Fix back compat with Java 8 compilation
ktor-3.2.1 - 2022-09-12
[UPDATED]
- ktor update - 2.0.3
[NEW]
- Koin Ktor extracted project[UPDATED]
- slf4j update - org.slf4j:slf4j-api:1.7.36[UPDATED]
- ktor update - 2.0.1[BREAKING]
- moved Koin ktor plugin to org.koin.ktor.plugin
android-3.2.3 - 2022-10-18
[FIXED]
- Fix Broken Scope API and revert backAndroidScopeComponent
with related API inActivity
&Fragment
. ReworkedactivityScope()
,activityRetainedScope()
andfragmentScope()
. Removed Deprecations. #1443 #1448[FIXED]
- Fix NavGraph scope resolution #1446
3.2.2 - 2022-09-23
[FIXED]
[core]
- Java 8 Compat fix[MERGE]
[test]
- Java 8 Compat fix #1437
3.2.1 - 2022-09-12
[NEW]
- Version split for Koin core & Android, to allow sperate track on core & android topics (dedicated Github milestones & Git branches/tag)[UPDATED]
[core]
- lib update -co.touchlab:stately-concurrency:1.2.2
[UPDATED]
[android]
- lib update -androidx.appcompat:appcompat:1.4.2
[MERGE]
- #1409 - Android Test Instrumentation Contribution[MERGE]
- #1394 - Scope Documentation Fix[FIXED]
[test]
-koin-test
gradle metadata[FIXED]
[android]
-koin-android
gradle metadata[MERGE]
- #1382 - CreateEagerInstances() available forkoinApplication
function[FIXED]
[androidx-navigation]
- addqualifier
tokoinNavGraphViewModel
function - Port of #1397[FIXED]
[android]
- Open ViewModel with KClass access for generic uses - #1402, #1384[UPDATED]
[android]
- New Android Scope API - https://insert-koin.io/docs/reference/koin-android/scope - #1399, #1356, #1328, #1385, #1414[BREAKING]
[android]
- Deprecate Android Scope API to avoid use lazy delegate API
The repository has been splitted for the following sub projects.
koin-ktor
- https://github.com/InsertKoinIO/koin-ktorkoin-androidx-compose
- https://github.com/InsertKoinIO/koin-compose
This allow independant version tracking and updates.
[UPDATED]
[core, android, ktor]
- merge from Koin 3.1.6[FIXED]
[core]
- fix Time API (do not depend anymore on unstable API)[FIXED]
[android]
- fix ViewModel Compat to provide Store owner as Lazy value[FIXED]
[android]
- fix ViewModel API to use default Facctory or state Factory only if needed (state argument passed)[DEPRECATED]
[android]
- Realign current & deprecateViewModelOwnerDefinition
&ViewModelOwner
for replacing withViewModelStoreOwner
(introduceViewModelStoreOwnerProducer
to have() -> ViewModelStoreOwner
). If you have any conflict withViewModelOwner
, just use directlyViewModelStoreOwner
[UPDATED]
[core]
- Kotlin 1.6.21[UPDATED]
[android]
- android lib - androidx.appcompat:appcompat:1.4.1[UPDATED]
[android]
- android lib - androidx.activity:activity-ktx:1.4.0[UPDATED]
[android]
- android lib - androidx.lifecycle:lifecycle-extensions:2.2.0[UPDATED]
[android]
- android lib - androidx.appcompat:appcompat:1.4.1[UPDATED]
[android]
- android lib - androidx.lifecycle:lifecycle-common-java8:2.4.1[UPDATED]
[android]
- android lib - androidx.activity:activity-ktx:1.4.0[UPDATED]
[android]
- android lib - androidx.fragment:fragment-ktx:1.4.1[UPDATED]
[android]
- android lib - androidx.navigation:navigation-fragment-ktx:2.4.2
[ADDED]
[core]
- Constructor DSL (singeOf, factoryOf ...)[ADDED]
[core]
- Module includes()[UPDATED]
[core]
- Kotlin 1.6.10
[FIXED]
[core]
- fix #1146 duplicate bindings with getAll()[FIXED]
[android]
- Require ComponentActivity instead of AppCompatActivity in LifecycleViewModelScopeDelegate for FragmentScenario support[FIXED]
[ktor]
- Fix #1263 Ktor scope closing with ApplicationStopped event listening[FIXED]
[android]
- fix #1207 #1308 - Realign ViewModel API with Google viewModels() API to better register on factories[FIXED]
[ktor]
- downgrade to Ktor 1.6.5 due to link to Kotlin 1.6.x (further versions will follow 3.2.x branch with independant koin-ktor module project)
[FIXED]
[android]
- #1240 - ViewModel scope instance creation fixed[FIXED]
[android]
- #1232 & #1207 - Android minimum dependencies is clean up and should avoid indirect library crash[ADDED]
[android]
- #1250 - Android instrumented test doc[FIXED]
[core]
- #1213 - withInstance() mock instance fixed[FIXED]
[core]
- #1248 - fix createeagerInstances() to be seperated back of modules()[FIXED]
[core]
- checkKoinModules API is fixed / deprecate old signatures[FIXED]
[androidx-compose]
- ViewModelStoreOwner property fixed for Compose[UPDATED]
[androidx-compose]
- Compose 1.0.5[FIXED]
[android]
- fixed scope delegate property to help create scope later for fragment, and bind with parent activity scope
[FIXED]
[core]
- #1149 - Nullable parameter resolution[FIXED]
[docs]
- Documentation fixes #1170 #1160 #1152 #1155 #1169 #1231 #1234 #1222 #1079[FIXED]
[core]
- Bean scope error message fix #1166[FIXED]
[core]
- Java Compat nullable API fix #1175[FIXED]
[core]
- String quotes fix #1199[FIXED]
[android]
- Koin Graph ViewModel added parameters API #1202[FIXED]
[core]
- Dynamic feature module loading #1095[FIXED]
[kmm]
- Apple Silicon Support #1192[FIXED]
[core]
- backport getSource scope API as deprecated fix #1211[FIXED]
[test]
- CheckKoinModules & CheckModules API cleaned up & fixed with right parameters #1197 #1194[FIXED]
[android]
- stateViewModel API rolledback #1214
[UPDATED]
[core]
- Update to Kotlin 1.5.30[UPDATED]
[android]
- Update to latest android ktx[UPDATED]
[android-compose]
- update to jetpack compose 1.0.3[FIXED]
[android]
- ViewModel instances are now reinjected into Koin Android scopes[FIXED]
[android]
- Activity/Fragment are now available in their own scopes (no need of explicit inject from the source)[ADDED]
[android]
- new koin-androidx-navigation package, offeringby koinNavGraphViewModel()
to allow scope a ViewModel for a given navigation graph - https://insert-koin.io/docs/reference/koin-android/viewmodel#navigation-graph-viewmodel-updated-in-313[DEPRECATED]
[android]
-by stateViewModel()
is deprecated.state
parameter is not needed anymore. It's now merged intoviewModel()
, to inject SavedStateHandle[FIXED]
[android]
- Fix from Koin 2.x. ViewModel API get back theowner
property, to allow specify from where we are instanciating ViewModel.[ADDED]
[test]
- Introduce newcheckKoinModules
and DSL to help verify modules - https://insert-koin.io/docs/reference/koin-test/checkmodules[DEPRECATED]
[test]
- deprecate oldcheckModules
function, in favor of new APIcheckKoinModules
[FIXED]
[core]
-createeagerInstances()
is fixed back. It's seperated from module loading process.[FIXED]
[core]
-ParameterHolder.getOrNull
is now checking assignable type
[FIXED]
[core]
- injection parameter resolved in graph[FIXED]
[core]
- parameter injection is not deprecated[FIXED]
[test]
- checkModules API is reverted[UPDATED]
[core]
- Lazy eval logger operator Logger.log(lvl, message)[UPDATED]
[core]
- ParametersHolder getOrNull added[UPDATED]
[androidx-compose]
- update to Beta-09
[NEW]
[core]
- Improved resolution engine with new Module/DSL/Index creation to make faster Index/InstanceFactory allocation at start. Reworked internal architecture for Factory & scope allocations. Should improve greatly startup performances![NEW]
[core-jvm]
- Smarter DSL is now stable, no moreget()
needed. Unlocksingle<MyType>()
builder, for any kind of definition.[BREAKING]
[-ext]
- builder extension are now part of core API[UPDATED]
[core]
- Kotlin 1.5.10[UPDATED]
[ktor]
- Ktor 1.6.0[UPDATED]
[android-compose]
- Compose 1.0.0-Beta08[FIXED]
[core]
- String property import - #1099[FIXED]
[test]
- KoinTestRule close existing Koin isntance before trying to start a new one[FIXED]
[core]
- ScopeJVM.kt bad package - #1094[FIXED]
[android]
- Fix Fragment Scope Lifecycle delegate - #1101[DEPRECATED]
[core]
- Moduleoverride
is now a global option intoKoinApplication
, not a local option to a module. Override strategy is now a global option.[DEPRECATED]
[core]
- injection parameters asdestructured
declaration are deprecated. Instead of writingsingle { (myParam) -> MyClass(param) }
now use injected parameters with get:single { params -> MyClass(params.get()) }
- Update Kotlin 1.5.0
- Clean up Time API
- Update Kotlin 1.5.0
- Update Ktor 1.5.4
- Clean up Time API - 64ceaae94f1084eb708142a6b9fd029390e20714
- Fix Property import quote replace - 94ceed397b10d08e17880a9a0e2ac87d0a272a18
- Fix Definition Param internal values - 067b9d95847b74a6c9b88058a649b27266053013
- KClass for new instance builder - #1093 [email protected]
- WatchOS64 native target - #1091 [email protected]
- Enable IR for JS - #1067 [email protected]
- Koin Gradle Plugin is back
- Fix back Ktor feature starter
- Update Platform tools for default Lazy Mode - #1031
- Relax Typing resolution constraints - #1032
- Update Ktor 1.5.2
- Injection parameters doc update
- Koin Native KClass in hashcode naming - #1036
- Jetpack compose Beta01 - #1037
- Fix getAll operator, to look in linked scopes - #1038
- Ktor check for existing KoinApplication ready - #1023
- Work manager resolution fix - #1018
- Koin Gradle Plugin drop for now (many issues for Android side)
- Maven central publication scripts
- Merge branch 2.2.x & 3.0.0
- New folder modules/strategy
- Merge of main Android modules (koin-androidx-scope, koin-androidx-viewmodel are merged in koin-android)
- Update Gradle dependencies to use proper
api
/implementation
- Refresh Scope API
- first attempt of Koin Multiplatform version
[ADDED]
[android]
FragmentScope class is now linked to its parent ActivityScope class[FIXED]
[core]
fixed back to handle any type of property (not only String). File properties are saved as Strings.[FIXED]
[android]
ViewModel factory use DefaultViewModelFactory by default, StateViewModelFactory ifstate
parameter is used.
[FIXED]
[android]
activityScope & fragmentScope are not injecting source to avoid leak through ViewModel support handler - #953[UPDATE]
[koin-androidx-compose]
version 1.0.0-alpha07
[FIXED]
[core]
GetOrNull hide exceptions - #913[FIXED]
[core]
SingleInstanceFactory concurrency fixed - #914[ADDED]
[core]
addcreateEagerInstances
parameter toKoin.loadModule
,Koin.loadModules
[FIXED]
[core]
@KoinApiExtension is using Warning compiler message, not error[FIXED]
[androidx-compose]
- Remove lazy API, as things are not sure for now about resolving Lazy in a remember block (to be foloowed later). Best is to keep it withget()
&getViewModel()
in @Composable[FIXED]
[core]
Replace back Lazy(None) to standard Lazy delegate - #797[ADDED]
[core]
@KoinInternal to help protect internal components, without reusing @KoinApiExtension - dedicated to KoinComponent[FIXED]
[core]
Scope to drop extra declared definitions - #758[FIXED]
[core]
Allow empty Scope declaration. Allow redeclaration of same scope, to complete it.[FIXED]
[core, android, androidx, test]
Inject is ny default is usingLazyThreadSafetyMode.SYNCHRONIZED
by default[FIXED]
[android, androidx]
by viewModel is usingLazyThreadSafetyMode.NONE
by default[ADDED]
[core, android, androidx, test]
Inject allow to specifymode
, to specifyLazyThreadSafetyMode
[FIXED]
[core]
hide to internal GlobalContext functions, to avoid redundancy with context.* functions: org.koin.core.context.GlobalContext.startKoin -> org.koin.core.context.startKoin[FIXED]
[androidx]
bring back ViewModel compat for androidx
[FIXED]
Fix Scoped Components (ScopeActivity, ScopeFragment & ScopeService) to keepscope
lazy and avoid forced initialisation
[FIXED]
AndroidX ViewModel API merge for stateViewModel. No need anymore to pass Bundle as injected parameters, jsut useget()
[FIXED]
Resolution API to precise generic type toAny
[ADDED]
JetNews Compose app example
Updated to kotlin 1.4.10
koin-androidx-scope
[FIXED]
addedscopeActivity
&requireScopeActivity()
API on ScopeFragment
koin-androidx-compose
[ADDED]
New API to inject Jetpack Compose:get()
,by inject()
,getKoin()
[ADDED]
New API to inject Jetpack Compose with ViewModel:getViewModel()
,by viewModel()
koin-androidx-workmanager
[ADDED]
New API to declare yourListenableWorker
withworker { }
DSL[ADDED]
KoinWorkerFactory wired to the standard WorkManagerFactory, to let build declared component. UseworkManagerFactory()
in yourKoinApplication
DSL to setup the WorkManagerFactory. (nb: tedious to checkModules - as it depends on android internals)
koin-core
[ADDED]
KoinExtensionAPI: annotation for tagging Koin API usage. i.e: KoinComponent requires OptIn, as it's part of Koin API extension[FIXED]
turn all API to internal as possible
koin-test
[FIXED]
revertAutoCloseKoinTest
to class, addClosingKoinTest
interface
koin-androidx-scope
[ADDED]
NewScopeActivity
.ScopeFragment
,ScopeService
to enable Scope API direclty into Android components. Offers injection directly from tied Scope.[BREAKING]
Old Scope API extensions are deprecated:scope
,lifecycleScope
koin-android-scope
[ADDED]
NewScopeActivity
.ScopeFragment
,ScopeService
to enable Scope API direclty into Android components. Offers injection directly from tied Scope.[BREAKING]
Old Scope API extensions are deprecated:scope
,lifecycleScope
koin-androidx-viewmodel
[ADDED]
NewViewModelOwnerDefinition
API definition for lazy define ViewModelStore & SavedStateRegistryOwner[BREAKING]
rewrite ViewModel API to better use StateViewModel factory and allow to useViewModelOwnerDefinition = () -> ViewModelOwner
ViewModelOwner lazy definition. Bundle is now used asstate
lazy attributes,BundleDefinition = () -> Bundle
[ADDED]
verification to help check parameter injection for SavedStateRegistryOwner, as the right argument (misplaced injection param)[ADDED]
NewViewModelOwnerDefinition
API definition for lazy define ViewModelStore & SavedStateRegistryOwner[BREAKING]
rewrite ViewModel API to better use StateViewModel factory and allow to useViewModelOwnerDefinition = () -> ViewModelOwner
ViewModelOwner lazy definition. Bundle is now used asstate
lazy attributes,BundleDefinition = () -> Bundle
[ADDED]
verification to help check parameter injection for SavedStateRegistryOwner, as the right argument (misplaced injection param)
koin-android-viewmodel
[ADDED]
NewViewModelOwnerDefinition
API definition for lazy define ViewModelStore[BREAKING]
rewrite ViewModel API and allow to useViewModelOwnerDefinition = () -> ViewModelOwner
ViewModelOwner lazy definition[ADDED]
NewViewModelOwnerDefinition
API definition for lazy define ViewModelStore[BREAKING]
rewrite ViewModel API and allow to useViewModelOwnerDefinition = () -> ViewModelOwner
ViewModelOwner lazy definition
koin-core
[FIXED]
fixed time API - Kotlin 1.4[ADDED]
NewKoinScopeComponent
to help build component with Koin scopes[REMOVED]
removed generic Scope API extensions, was preivously on any class. Please use nowKoinScopeComponent
[DEPRECATED]
KoinContextHandler in favor of GlobalContext[ADDED]
Better Definition to help further Kotlin Compiler Plugin, simplify Module loading process (API to help declare definition without DSL)[REMOVED]
ScopeDefinition internal from module, and prefer qualifier to avoid create stucture outside of registry[REMOVED]
removed inconsistent synchronized calls[ADDED]
cleaned synchronized API - better call from GlobalContext to ensure synced call[BREAKING]
empty scope is not taken in account anymore, a scope definition is created only if there is at least one scoped definition[ADDED]
Injection parameters can be used directly as a dependency and can be resolved asget()
or directly with builder API[FIXED]
fixed starting context effect (deprecating KoinContextHanlder for GlobalContext)
koin-test
[FIXED]
fixed checkModules to use Mock for injected parameters or default origin value of a Scope[ADDED]
setup detault values for injected parameters, for checkModules[BREAKING]
AutoCloseKoinTest
is now an interface, please remove any constructor[UPDATED]
fixedDefinitionParameters
to add the ability to know the injected type value
koin-test-junit5
[ADDED]
JUnit5 test module
koin-core
[BREAKING]
Disable property type cast #781[FIXED]
Scope issue - Breaking looping linked scopes when first got instance #775[FIXED]
On the fly declaration with primary type fix - #773
koin-androidx-viewmodel
[FIXED]
stateViewModel bundle argument fixed - https://github.com/InsertKoinIO/koin/pull/795/files[ADDED]
addedstateSharedViewModel
extensions forFragment
https://github.com/InsertKoinIO/koin/pull/768/files
koin-androidx-fragment
[FIXED]
Add fallback for instantiate function in FragmentFactory - #742
koin-test
[FIXED]
KoinTestRule test exception handling - #808
koin-gradle-plugin
[FIXED]
Fixed Koin gradle plugin task for Kotlin & Android project. AddedcheckAndroidModules
task - #817
Core
[FIXED]
- declare to use reified type[FIXED]
- Qualifier type as pure string[FIXED]
- docs contribution[UPDATED]
- Kotlin 1.3.71
Ktor
[ADDED]
- Contributions about modules and events
AndroidX-Fragment
[FIXED]
- contribution to help fallback on empty constructor instance for FragmentFactory
Core
[ADDED]
- Scope's source value to return the object instance, source of the scope
[FIXED]
- maven metadata config :(
[UPDATED]
- maven metadata config
Core
[FIXED]
- fixed integration for kotlin.time.* API with 1.3.70
AndroidX-ViewModel
[FIXED]
- shared ViewModel API to get instance from Activity's ViewModelStore + clean of API to use directly ViewModelStoreOwner instead of LifecycleOwner
Android-ViewModel
[FIXED]
- shared ViewModel API to get instance from Activity's ViewModelStore + clean of API to use directly ViewModelStoreOwner instead of LifecycleOwner
Core
[UPDATED]
- introduce theKoinContextHandler
component that is responsible to manageGlobalContext
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 useKoinContextHandler.get()
, once you have started it.koinApplication { }
users have to register manually toKoinContextHandler
if needed
- doc updates
Test
[ADDED]
- CheckModule category
Gradle_PLugin
[ADDED]
- CheckModule Gradle Plugin
Core
[ADDED]
- Enum class can be used as Qualifier:named(MyEnum.MyValue)
Core
[FIXED]
- stopKoin closes scopes #702
AndroidX-ViewModel
[FIXED]
- added/fixed for better State ViewModelgetStateViewModel
andby stateViewModel()
API
Android
[ADDED]
-KoinAndroidApplication
to let you create aKoinApplication
instance with Android context, and let you use KoinApplication DSL
Core
[UPDATED]
- updated+
oprator for modules[ADDED]
- Scope Links, to link scope to another and help resolve shared instances
Docs
[UPDATED]
- updatedkoin-core
Scope
section[ADDED]
- inject on a setter property withinject()
Android-Scope
[UPDATED]
- updatedcurrentScope
to uselifecycleScope
instead[FIXED]
-ScopeCompat
for Java compat function
AndroidX-Scope
[UPDATED]
- updatedcurrentScope
to uselifecycleScope
instead[FIXED]
-ScopeCompat
for Java compat function
AndroidX-Factory
[FIXED]
-Fragment
declaration in a scope
Core
[ADDED]
- DSL declare a scope with type directly withscope<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 withinject()
Core-Ext
[ADDED]
- inject all setter property withinject()
on an instance
Android-ViewModel
[UPDATED]
- updatedViewModelParameter
API around to help integrate it more easily with 3rd party access
AndroidX-ViewModel
[UPDATED]
- updatedViewModelParameter
API around to help integrate it more easily with 3rd party access
AndroidX-Factory
[ADDED]
-KoinFragmentFactory
API to setupFragment
injection
Core
[UPDATED]
- Reworked all resolution engine to use immutable BeanDefinition & base the resolution onScope
&ScopeDefinition
[UPDATED]
- Locking Strategy to avoid usage of ConcurrentHashMap[UPDATED]
- Replace BeanRegistry with InstanceRegistry & ScopeRegistry[UPDATED]
- addedclosed
status to Scope[FIXED]
- Fixed bugs related to closed scopes[FIXED]
- Can now allow to resolve different types with same Qualifer[ADDED]
- Moduleloaded
property in order to allow later "reloading"[ADDED]
- Java helpers are now part of thekoin-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 ofkoin-core
Test
[UPDATED]
- Check modules withcheckModules { }
that open an KoinApplication declaration[ADDED]
-MockProviderRule
&MockProvider
to manually provide mocking capacity, absed of the desired mocing framework[REMOVED]
- Link toMockito
library
Documentation
[UPDATED]
- New documentation system based on docisfy, to help deploy easily markdown doc. Documentation is now in/docs
folder
Android-ViewModel
[ADDED]
- debug logging for VM provider
AndroidX-ViewModel
[ADDED]
- debug logging for VM provider
Core
[FIXED]
- performances update - modules list loading & class naming[BREAKING]
-modules(vararg modules: Module)
inKoinApplication
has been removed for performance reasons. Please usemodules(modules: List<Module>)
[BREAKING]
-modules(modules: Iterable<Module>)
inKoinApplication
has been removed for performance reasons. Please usemodules(modules: List<Module>)
[BREAKING]
-loadKoinModules(vararg modules: Module)
inGlobalContext
has been removed for performance reasons. Please useloadKoinModules(module: Module)
orloadKoinModules(modules: List<Module>)
[BREAKING]
-unloadKoinModules(vararg modules: Module)
inGlobalContext
has been removed for performance reasons. Please useunloadKoinModules(module: Module)
Android
[UPDATED]
- rework startking DSL to add extension in startKoin (androidContext
,androidLogger
)
Android-Scope
[UPDATED]
- rework according to new Scope API (manage complete 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]
- #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]
- #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 order 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[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]
- #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
Android
Android-Scope
[UPDATED]
Better scope management when associated to a lifecycle #235
Android-ViewModel
[FIXED]
Proguard Warning #267
Core
[UPDATED]
- Updated KoinComponent interface to allow easily add a custom Koin instance #224[UPDATED]
- Allow nullable injection params #242[UPDATED]
- Add instance for a dedicated scope #277[FIXED]
Documentation Typo fixed #263[FIXED]
Fixed Scope toString in debug #240
Core-Ext
[FIXED]
Add scopeId param in experimental API builder #252
Test
[UPDATED]
Review declareMock to add mock lambda expression #243[FIXED]
Fixed params injection with checkModules #274
Android
[FIXED]
-koin-android-viewmodel
&koin-androidx-viewmodel
parameter & factory review - #236
Core_
[UPDATED]
- compilation with Kotlin 1.2.70[ADDED]
- new Scope API[FIXED]
- fixed scope visibility resolution - #228[FIXED]
-koin-android-viewmodel
parameters leak
Core-Ext
[ADDED]
- Renamedkoin-reflect
tokoin-core-ext
Android
[FIXED]
-koin-android-viewmodel
parameters leak fixed - #220[ADDED]
-koin-android-viewmodel
addedviewModel
automatic builder keyword[FIXED]
-koin-android
added backandroidApplication()
[ADDED]
-koin-android-scope
updatedbindScope
function now bind aScope
Test
[FIXED]
-check()
renamed tocheckModules()
Scripts
[UPDATED]
- rework all gradle structure and scripts - #126[ADDED]
- asciidoc integration - #127[ADDED]
- CI integration with CircleCI
Core
[UPDATED]
- compilation with Kotlin 1.2.50[UPDATED]
- Update DSL keywords:module
&single
(replacesapplicationContext
,context
&bean
) - #131[FIXED]
- Fixed Scope API, aka module visibility resolution[ADDED]
- SLF4J Logger implementation (koin-logger-slf4j
), used bykoin-spark
&koin-ktor
- #130[FIXED]
- Resolution & error check/catch for display - #110[FIXED]
- BeanDefinition equals()[FIXED]
- Instance creation error display - #124[UPDATED]
- logging tree resolution (with debug data if needed)[ADDED]
- asciidoc doc updated - #121 - #100 - #102 - #103[UPDATED]
- Injection parameter API with destructured declaration - #133[ADDED]
- Preload instances withcreateAtStart
- #141[UPDATED]
- Explicit bean/module override - #123[FIXED]
- bind operator check assignable types
Test
[ADDED]
- asciidoc doc[ADDED]
- check() feature to check all configuration (does not create instances like dryRun)[ADDED]
- declare mock or other definition out of the box withdeclareMock
&declare
- #151 - #119
Android
[BREAKING]
- Package & project renaming ->koin-android
,koin-android-scope
&koin-android-viewmodel
- #144[REMOVED]
- bindString(), bindBool() & bindInt()[ADDED]
- asciidoc doc[ADDED]
- support AndroidX packages withkoin-androidx-scope
&koin-androidx-viewmodel
- #138 - #122 - #154[ADDED]
- scoping feature with Android lifecycle withkoin-android-scope
- #142[UPDATED]
- Open startKoin() for other Android context & useContext
instead ofApplication
- #156[FIXED]
- ViewModel factory instance creation bugfix - #145[FIXED]
- ViewModel factory injection params leak - #149[UPDATED]
- androix version to2.0.0-beta01
Ktor
[ADDED]
- asciidoc doc[ADDED]
- usekoin-logger-slf4j
[UPDATED]
- ktor0.9.2
[ADDED]
- addRoute
&Routing
class extensions - #128
Spark
[ADDED]
- asciidoc doc[ADDED]
- usekoin-logger-slf4j
[UPDATED]
-controller
keyword now need your class to extendSparkController
Java
[ADDED]
- addkoin-java
project - #106[ADDED]
- asciidoc doc
Reflect
[ADDED]
- addkoin-reflect
project[ADDED]
- addbuild()
DSL function to allow smarter way of building definition[ADDED]
- asciidoc doc
Website
[ADDED]
- Doc integration[ADDED]
- Getting started integration[FIXED]
- Kotlin slack URL - #125
Samples
[ADDED]
- Addedexamples
folder, gathering examples application[ADDED]
- Thermosiphon example - #116
Gradle & Continuous Integration
version published with new build chain
Core
[UPDATED]
build updated to Kotlin 1.2.31[UPDATED]
dissociate overload with dynamic parameters onget()
andinject()
for better autocomplete suggestions[FIXED]
fixstartKoin()
property loading from booleanloadProperties
[FIXED]
inject by name take now care of injected type #92
Android
[FIXED]
startKoin()
doesn't break RestrictMode anymore and you can avoid properties load directly from koin.properties #96[UPDATED]
dissociate overload with dynamic parameters onget()
andinject()
for better autocomplete suggestions
Android Architecture
[UPDATED]
dissociate overload with dynamic parameters onviewModel(),
getViewModel()and
getSharedViewModel()` for better autocomplete suggestions[UPDATED]
now exclude gradle dependency againstLiveData
Samples
FIXED
Ktor hello appp sample
DSL
[FIXED]
Parameter propagation - You can now reuse params inget()
to propagate it #66
Core
[ADDED]
Parameters are now expressed via Kotlin function to allow lazy evaluation #67[UPDATED]
Parameter propagation #66[FIXED]
Stack resolution engine fixed #72[FIXED]
Better Logs, Error & Stacktraces[FIXED]
Properties loading from externalproperties
file can read values as String/Integer/Float
Android
[ADDED]
get()
direct dependency eager fetching function for Activity/Fragment/Service #78
Android Architecture
[ADDED]
To help misuse the Koin ViewModel API, we introduce thegetSharedViewModel()
andsharedViewModel()
from Fragment, to reuseViewModel
from parentActivity
.getViewModel()
andviewModel()
now createsViewModel
instance (noFromActivity
parameter anymore)[UPDATED]
ViewModel factory logs to see what Activity/Fragment is gettingViewModel
instance
DSL
[DEPRECATED]
-provide
- can be directly replace withbean
[UPDATED]
-bean
andfactory
can now usebind
[ADDED]
- defintion function insidebean
orfactory
can now have parameters
Core
[FIXED]
Context resolution and modulePath isolation reworked - now fully functionnal[FIXED]
Stack resolution[ADDED]
StandAloneContext
functionloadKoinModules
to load Koin modules whether Koin is already started[ADDED]
StandAloneContext
functionloadProperties
to load Koin properties whether Koin is already started[ADDED]
by inject()
function handle parameters to definition (#59)[FIXED]
Logging with class name need introspection[ADDED]
Context lifecycle notification callback - to allow a callback whenreleaseContext()
is called on a context. You can register withStandAloneContext.registerContextCallBack()
(#58)
Android
[FIXED]
StartKoin have alogger
parameter, with default as AndroidLogger(), to allow specify logging implementation to use with Koin (#50) - allow no logging at startKoin of logger is set toEmptyLogger()
[ADDED]
by inject()
function handle parameters to definition (#49)
Android Architecture
[FIXED]
fix viewModel extensions rewritten fromLifecycleOwner
interface[FIXED]
fixby viewModel()
API to allow use KClass object argument instead of type inference - offers nowgetViewModelByclass()
andviewModelByClass()
(#56)[ADDED]
by viewModel()
function handle parameters to definition (#49)[ADDED]
by viewModel()
function handle key instance for Android ViewModelFactory (#49)
Core
- fix internal instance registry due to compat error with Kolin
1.1.61
&1.2.21
- broke Koin API for app using jdk 7 under the hood - issue #43
Android Architecture
by viewModel()
lazy function call thegetViewModel()
function and allowval
attribute declaration of yourViewModel
(like withby inject()
) - (issue #37)- Better support to share
ViewModel
between Activity and Fragments android.arch.lifecycle:extensions
updated to1.1.0
Spark
startSpark {}
has been renamed tostart {}
and have amodules
arguments to list all of your modulesstart()
andstartKoin
has been merged tostart( modules = <List of modules>)
stopSpark{}
has been renamed tostop {}
and includecloseKoin()
Core
- Kotlin
1.2.21
- Internal fixes around Bean definition lookup / Duplicated defintion (issue #39)
- Fixed loading from koin.properties (for embedded jar)
Android Architecture
viewModel
DSL keyword (specializedprovide
alias for ViewModel), to declare an Architecture Components ViewModelgetViewModel()
function in Activities and Fragments, to get and bind ViewModel components
Spark
controller {}
DSL keyword (specializedprovide
alias), to declare Spark controllers classesstart() {}
function to start Spark server (optional port number) - lambda expression to allow the start of Koin and any controller instantiationrunControllers()
function to instantiate all spark controllers, declared withcontroller
keyword DSL
Core
- Better logging and error display
- Some fixes about internals resolution for bound types
Kotlin compilation has been updated to 1.1.61
Core
- Simplified DSL modules: no more need of
Module
class. Now use directly theapplicationContext
function - Default Koin Logger to
PrintLogger
instead ofEmptyLogger
- a definition can be overridden (with a definition same name and type)
- DSL
provide
aliases withbean
andfactory
- direct interface binding writing style (avoid to use
bind
keyword) - Koin instances resolution is now thread safe and compatible with coroutines
- starter chain reviewed to allow better extension of
startKoin()
- better logs to display how instance and resolution are made
- Context isolation disabled by default. Can be activated later
Android
- Default Koin Logger to
AndroidLogger
instead ofEmptyLogger
- No need anymore of
AndroidModule
, just useapplicationContext
to declare a module - Android extensions have been reworked to avoid need of support Library
androidApplication()
is a DSL extension to provide AndroidApplication
resolution (can also be done withget<Application>()
)
Samples
- Updated Android weather app, with multiple Activity and better demo for property usage
- Simple Kotlin app sample added
## [0.6.1]()
Core
- Added context/sub-contexts visibility checks
startKoin()
is now part of standAloenContextcloseKoin()
now close actual Koin contextKoinComponent
hasget()
andgetProperty()
Android
- reworked
starKoin()
function - reviewed android base extensions to find high-level extension point
Samples
- added kotlin-simpleapp - sample application for pure Kotlin
- added ktor-starter - for demoing Koin for Ktor web app development
Ktor
- koin-ktor module has been started
The target of this release was to simplify and make clearer the syntax of Koin.
DSL
getProperties
can now have a default value
Core
-
Stand alone complex & KoinComponent have been reviewed
-
renamed startContext functions to
startKoin()
-
KoinComponent
- inject/property
- setProperty
- release context or properties
- startKoin
-
Koin can load properties from koin.properties file or system properties
-
startKoin()
have now aproperties
parameter to give additional properties at startup
KoinTest
- directly extends
KoinComponent
- context assert/test tools & extensions
dryRun()
is usable in a Kointest component, after astartKoin
Android
- fix/better extensions for Android
bindProperty()
renamed tosetProperty()
startAndroidContext()
has been renamed tostartKoin()
- ContextAware Components can be configured for drop strategy (onDestroy or onPause). Default method is onPause
- load assets/koin.properties if present
Core
getProperty()
can provide a default value if key property is missingprovide()
can be use on a KoinContext directly, to declare on component
Android
applicationContext
has been renamedandroidApplication
Core
- property value set does not allow Any? value
- starters builder have been moved to [test] & [android]
- removed base starter
Android
- starter builder extension for Application class only
Tests
- starter builder extension for KoinTest class only
javadoc is now generated with Dokka
Core
- Koin now provide a stand alone context support to provide koin context in an agnostic way
startContext
function to start a Koin context- property injection/resolution is now strict. Property injection is not nullable anymore
koinContext.removeProperties()
remove properties by their keys- Simple logger to help logging/debugging
Android
startAndroidContext
function to start an Android Koin contextKoinContextAware
interfaces have been removed- Koin/Android extensions greatly simplified
- packages have been moved - need reimport for AndroidModule,
by inject
andby property
ContextAwareActivity
&ContextAwareFragment
are components to help you automatically release contexts - don't hesitate to do it manually
Tests
- Creation of 'org.koin:koin-test:' module, provide testing feature about Koin
Koin DSL has been reviewed to be more easy to understand, and allow easy writing of modules. No need anymore of several module classes, you can now include subcontexts in one module. You can now provide factory components, and bind is simpler to write.
The dry run feature, allows to run all of you modules in order to check if dependency graph is complete.
DSL
- replaced
declareContext{}
has been renamedapplicationContext{}
, and behind gives a better idea that you are describing your application context (the root context of your app) - Updated
modulePath(){}
has been dropped forcontext(){}
- context describes a sub context of your application, has a a name and can have also sub context itself (sub contexts are hierarchical) - Updated
bind{}
doesn't need lambda anymore to declare your bound class, but just the class in argument:bind()
- Added
provideFactory
is a DSL keyword to provide a factory definition instead of singleton
Core
- Updated
KoinContext.release()
is now called with context's name, no owner class instance - Added
KoinContext.dryRun()
help to run your modules and check if every dependency can be injected
Sample App & Android
- updated for the new core update
Core
- Kotlin 1.1.51
- Removed all loggers - rethinking of better Log/API
Android
- KoinContext function builders : newKoinContext & lazyKoinContext
- KoinContextAware interface now has a property, instead of a getter - better to overload
Sample App
- moved to folder koin-sample-app
Core
- Kotlin 1.1.50
- KoinContext / Context - simplified operator injection (removed all nullable inject/get)
- KoinContext.get() can make Injection by name
- Koin.build() can now build a list of Module
DSL
- Context.get() can now provide a definition with a name
- Context.get() operator have a bind property, to specify list of compatible interfaces to bind - is an alternative to bind {} operator
Android
- Merge android & android-support modules
- inject() can't be null anymore
- inject() can inject component by its name
- property() can do property injection - can be nullable data
Sample App
- Sample app (Weather demo application) has been reviewed to be more complete : Full MVP example, RxJava Scheduling, Unit Tests with partial modules loading & mocks
Koin & Koin-Android project has meen merged
DSL
- Module/AndroidModule class must now give a
context()
function implementation, to return a Context object. ThedeclareContext
function unlock the Koin DSL to describe dependencies and injection:
class MykModule : Module() {
override fun context() = declareContext { ... }
}
- You can now bind additional types for provided definitions
class MykModule : Module() {
override fun context() = declareContext {
provide { Processor() } bind { ProcessorInterface::class}
}
}
Scope
- You can declare/reuse paths in your modules, with
modulePath {}
operator. See paths section - Release modulePath instances with
release()
on a KoinContext
class MainActivityModule : Module() {
override fun context() =
declareContext {
// Scope MainActivity
modulePath { MainActivity::class }
// provided WeatherService
provide { WeatherService(get()) }
}
}
Android
KoinAwareContext
interface used to setup Android application (KoinApplication & KoinMultidexApplication are removed)
class MainApplication : Application(), KoinContextAware {
/**
* Koin context
*/
lateinit var context: KoinContext
/**
* KoinContextAware - Retrieve Koin Context
*/
override fun getKoin(): KoinContext = context
override fun onCreate() {
super.onCreate()
// insert Koin !
context = Koin().init(this).build(MyModule())
// ...
}
}
by inject<>()
function operator to inject any dependency in any Activity or Fragment
class MainActivity : AppCompatActivity() {
// inject my WeatherService
val weatherService by inject<WeatherService>()
}
Koin
- Koin builder takes module instances (instead of module classes):
// fill applicationContext for Koin context
val ctx = Koin().init(applicationContext).build(Module1(),Module2()...)
Internal rework for simpler use with Scopes:
Koin().build()
return KoinContext- factory, stack operators have been removed, for the modulePath fatures
- delete/remove replaced with
release()
Scope operation - import is replaced with module instances load
- All reflection & kotlin-reflect code have been removed