Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 1.9 KB

README.md

File metadata and controls

55 lines (41 loc) · 1.9 KB

Dagger2Kotlin

Dagger2

A fast dependency injector for Android.

Dagger is a compile-time framework for dependency injection. It uses no reflection or runtime bytecode generation, does all its analysis at compile-time, and generates plain Java source code.

Dagger is actively maintained by the same team that works on [Guava]. Snapshot releases are auto-deployed to Sonatype's central Maven repository on every clean build with the version HEAD-SNAPSHOT. The current version builds upon previous work done at [Square][square].

Demo

Dagger2Kotlin

Dagger2 Installation

Android Gradle

// Add Dagger dependencies
dependencies {
  compile 'com.google.dagger:dagger:2.x'
  annotationProcessor 'com.google.dagger:dagger-compiler:2.x'
}

Kotlin Coroutine

Kotlin 1.1 introduced coroutines, a new way of writing asynchronous, non-blocking code (and much more).Coroutines not only open the doors to asynchronous programming, but also provide a wealth of other possibilities such as concurrency, actors, etc

Coroutine Installation

dependencies {
    ...
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.1.1"
}

Prerequisites

  • Android Studio 3.0
  • Android Device with USB Debugging Enabled

Built With

Thanks for reading this repo. Be sure to click ★ below to recommend this repo if you found it helpful. It means a lot to me.

For more about programming, follow me on Medium

Also, Let’s become friends on Linkedin