All Versions
61
Latest Version
Avg Release Cycle
62 days
Latest Release
792 days ago
Changelog History
Page 6
Changelog History
Page 6
-
v3.0.0-beta3 Changes
July 03, 2016FEATURES
kodein.container.bindings.description
now uses simple type names, which makes it easier to read. You can usekodein.container.bindings.fullDescription
to show full type names.- Both descriptions now print type names in a "kotlin-esque" way. Because Kodein does not depends on
kotlin-reflect
, it uses javaType
objects that do not contains nullability informations. As such, the type display does not include nullability. Still, it's easier to read. - Kotlin
1.0.3
BREAKING CHANGES
- Scopes are no more (weird) functions but object implementing the
Scope
orAutoScope
interfaces. - Android's
ActivityScopeLifecycleManager
is nowactivityScope.lifecycleManager
.
- Scopes are no more (weird) functions but object implementing the
BETA FEATURE CHANGES
typeToken
won't throw an exception when used with aTypeVariable
type argument, however, the same exception will still be thrown at binding, whether or not using the inline function,typeToken
or a simple type. In other words, if you try to bind any type that contains aTypeVariable
type argument,Kodein
will throw an exception.
INTERNAL
- Android's
activityScope
is now an object.
- Android's
-
v3.0.0-beta2 Changes
June 30, 2016FEATURES
KodeinInjected
can usekodein()
instead ofinjector.kodein()
.- Android
instanceForContext
that works exactly likeinstanceForClass
, but for aContext
. - Android module, wisely named
androidModule
that provides a lot of factories with aContext
arguments (seeAndroidModule.kt
).
BREAKING CHANGES
typeToken
(and thereforeTypeReference
) will throw an exception when build with aTypeVariable
type argument. This is to prevent "accidental" binding of a type with TypeVariable which will be later impossible to retrieve.
BETA FEATURE CHANGES
instanceForClass
uses JavaClass<*>
andinstanceForKClass
uses KotlinKClass<*>
.
-
v3.0.0-beta1 Changes
June 29, 2016BREAKING CHANGES
JKodein
is replaced byTKodein
which is meant to use by both Kotlin & Java.TKodein
allows you to access a type consistent API withoutinline
methods. Each method can be used withType
,TypeToken
, orClass
. To access aTKodein
, simply usekodein.typed
.- The
typeToken
function now returns aTypeToken
interface. This allows to keep type consistency & checking whileType
objects. If you were usingval t = typeToken<T>()
in Kodein 2, the replacement is simplyval t = typeToken<T>().type
. kodein.bindingsDescription
becomeskodein.container.bindings.description
.kodein.registeredBindings
becomeskodein.container.bindings
.- All
inline
functions that usereified
to get the type are now extension functions, which means that they need to be imported! Your code will be all red until you resolve those import. Don't panic! The API itself has not changed, just its imports.
FEATURES
- Introducing
kodein.container
which enables you to query the Kodein container directly withKodein.Key
orKodein.Bind
objects. kodein.container.bindings
now gives aMap<Kodein.Key, Factory<*, *>>
. Which means that you can do all sorts of introspection and debug (like know which types are bounds to which factories, etc.). To help you with those tasks, several extension functions are proposed to thisMap
(in the filebindings.kt
).- Better bindings description: now displays the bound type and the created (real) type.
- Introducing the
KodeinAware
andKodeinInjected
interfaces. If a class implements one of those interfaces, the injection feels "native":instance()
instead ofkodein.instance()
. - Introducing
instanceForClass()
andproviderForClass()
: those methods can be passed aKodein
orKodeinInjector
object to inject an instance by using a factory that takes aKClass<*>
as parameter. Those functions can be used without parameter on aKodeinAware
orKodeinInjected
class (which is where they reach their full potential!). - Introducing
Kodein.global
which is a global Kodein instance for all. It is on its module and is not proposed by default. To use it, you must declare the dependencyorg.kodein:kodein-global:3.0.+
. You can add modules to it withKodein.global.addImport(module)
. After that, you can useKodein.global
as a regular Kodein object. Be aware that once you have injected / retrieved the first value withKodein.global
, then adding modules to it will throw an exception. - When using
Kodein.global
, you can use theKodeinGlobalAware
interface, which enables you all the goodness ofKodeinAware
, but usingKodein.global
, and without any config. - Kotlin
1.0.2-1
- Introducing
INTERNAL
- All providers & factories are represented by their classes.
Kodein
,TKodein
andKodeinContainer
are now very simple interfaces, which enables easy wrapping.
-
v2.8.0 Changes
June 14, 2016- Eager singletons: ask kodein to instanciate the singleton object as soon as kodein is ready.
KodeinInjector
is now thread safe.- The
KodeinInjector.onInjected
callback is directly called if the injector has already been injected. - Gradle
2.13
-
v2.7.1 Changes
June 02, 2016- Overriding exceptions now print the affected key
- New syntax for binding without specifying the type:
bind() from scope
-
v2.7.0 Changes
May 23, 2016- Kotlin
1.0.2
. - Overriding restrictions and policies (overrides must now be explicit).
- Scoped singleton system.
- Android Activity scope binding syntax.
*
kodein.with
that makes it easier to deal with factory bindings (better thantoProvider
andtoInstance
). - Factories arguments can be nullable.
- Kotlin
-
v2.6.0 Changes
February 19, 2016- Kotlin
1.0.0
.
- Kotlin
-
v2.5.0 Changes
February 04, 2016- Kotlin
1.0.0-rc-1036
.
- Kotlin
-
v2.4.1 Changes
January 11, 2016- Kotlin
1.0.0-beta-4584
KodeinInjector
can inject theKodein
object.KodeinInjector
has aonInjected
callback.- Android:
lazyKodeinFromApp
andappKodein
support forView
,AbstractThreadedSyncAdapter
andLoader
.
- Kotlin
-
v2.3.1 Changes
November 06, 2015- Container extension: allows to
import
a kodein object's binding into another kodein object.
- Container extension: allows to