All Versions
61
Latest Version
Avg Release Cycle
62 days
Latest Release
792 days ago

Changelog History
Page 6

  • v3.0.0-beta3 Changes

    July 03, 2016
    • FEATURES

      • kodein.container.bindings.description now uses simple type names, which makes it easier to read. You can use kodein.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 java Type 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 or AutoScope interfaces.
      • Android's ActivityScopeLifecycleManager is now activityScope.lifecycleManager.
    • BETA FEATURE CHANGES

      • typeToken won't throw an exception when used with a TypeVariable 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 a TypeVariable type argument, Kodein will throw an exception.
    • INTERNAL

      • Android's activityScope is now an object.
  • v3.0.0-beta2 Changes

    June 30, 2016
    • FEATURES

      • KodeinInjected can use kodein() instead of injector.kodein().
      • Android instanceForContext that works exactly like instanceForClass, but for a Context.
      • Android module, wisely named androidModule that provides a lot of factories with a Context arguments (see AndroidModule.kt).
    • BREAKING CHANGES

      • typeToken (and therefore TypeReference) will throw an exception when build with a TypeVariable 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 Java Class<*> and instanceForKClass uses Kotlin KClass<*>.
  • v3.0.0-beta1 Changes

    June 29, 2016
    • BREAKING CHANGES

      • JKodein is replaced by TKodein which is meant to use by both Kotlin & Java. TKodein allows you to access a type consistent API without inline methods. Each method can be used with Type, TypeToken, or Class. To access a TKodein, simply use kodein.typed.
      • The typeToken function now returns a TypeToken interface. This allows to keep type consistency & checking while Type objects. If you were using val t = typeToken<T>() in Kodein 2, the replacement is simply val t = typeToken<T>().type.
      • kodein.bindingsDescription becomes kodein.container.bindings.description.
      • kodein.registeredBindings becomes kodein.container.bindings.
      • All inline functions that use reified 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 with Kodein.Key or Kodein.Bind objects.
      • kodein.container.bindings now gives a Map<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 this Map (in the file bindings.kt).
      • Better bindings description: now displays the bound type and the created (real) type.
      • Introducing the KodeinAware and KodeinInjected interfaces. If a class implements one of those interfaces, the injection feels "native": instance() instead of kodein.instance().
      • Introducing instanceForClass() and providerForClass(): those methods can be passed a Kodein or KodeinInjector object to inject an instance by using a factory that takes a KClass<*> as parameter. Those functions can be used without parameter on a KodeinAware or KodeinInjected 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 dependency org.kodein:kodein-global:3.0.+. You can add modules to it with Kodein.global.addImport(module). After that, you can use Kodein.global as a regular Kodein object. Be aware that once you have injected / retrieved the first value with Kodein.global, then adding modules to it will throw an exception.
      • When using Kodein.global, you can use the KodeinGlobalAware interface, which enables you all the goodness of KodeinAware, but using Kodein.global, and without any config.
      • Kotlin 1.0.2-1
    • INTERNAL

      • All providers & factories are represented by their classes.
      • Kodein, TKodein and KodeinContainer 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 than toProvider and toInstance).
    • Factories arguments can be nullable.
  • v2.6.0 Changes

    February 19, 2016
    • Kotlin 1.0.0.
  • v2.5.0 Changes

    February 04, 2016
    • Kotlin 1.0.0-rc-1036.
  • v2.4.1 Changes

    January 11, 2016
    • Kotlin 1.0.0-beta-4584
    • KodeinInjector can inject the Kodein object.
    • KodeinInjector has a onInjected callback.
    • Android: lazyKodeinFromApp and appKodein support for View, AbstractThreadedSyncAdapter and Loader.
  • v2.3.1 Changes

    November 06, 2015
    • Container extension: allows to import a kodein object's binding into another kodein object.