Updates

New features, API Changes etc …

The Koin modules

  // For Android
  compile "org.koin:koin-android:0.8.2"
  // for Android Architetcure Components
  compile "org.koin:koin-android-architecture:0.8.2"
  // for Kotlin
  compile "org.koin:koin-core:0.8.2"
  // For testing with JUnit
  compile "org.koin:koin-test:0.8.2"
  // For SparkKotlin
  compile "org.koin:koin-spark:0.8.2"
  // For Ktor
  compile "org.koin:koin-ktor:0.8.2"


Changes in 0.8.2

Core

Changes in 0.8.1

Android Architecture

Spark

Core

Changes in 0.8.0

Android Architecture

Spark

Core


Changes in 0.7.1

Kotlin compilation has been updated to 1.1.61

Core

Android

Samples


Changes in 0.6.1

Core

Android

Samples

Ktor

Changes in 0.6.0

The target of this release was to simplify and make clearer the syntax of Koin.

DSL

Core

No more getKoin() !

KoinTest

Android

Changes in 0.5.2

Core

Android

Changes in 0.5.1

Core

Android

Tests

javadoc is now generated with Dokka

Changes in 0.5.0

Core

Android

Tests

Changes in 0.4.0

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

Core

Sample App & Android

Changes in 0.3.1

Core

Android

Sample App

Changes in 0.3.0

Core

DSL

Android

Sample App

Changes in 0.2.x

Koin & Koin-Android project has meen merged

DSL

class MykModule : Module() {
    override fun context() = declareContext { ... }
}

Scope

class MainActivityModule : Module() {
    override fun context() =
            declareContext {
                // Scope MainActivity
                scope { MainActivity::class }
                // provided WeatherService
                provide { WeatherService(get()) }
            }
}

Android

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()) 
        // ...
    }
}
class MainActivity : AppCompatActivity() {

    // inject my WeatherService 
    val weatherService by inject<WeatherService>()
}

Koin

// fill applicationContext for Koin context
val ctx = Koin().init(applicationContext).build(Module1(),Module2()...)

Internal rework for simpler use with Scopes: