Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/damianpetla/kotlin-dagger-example
Example of Android project showing integration with Kotlin and Dagger 2
https://github.com/damianpetla/kotlin-dagger-example
Last synced: 12 days ago
JSON representation
Example of Android project showing integration with Kotlin and Dagger 2
- Host: GitHub
- URL: https://github.com/damianpetla/kotlin-dagger-example
- Owner: damianpetla
- Created: 2014-12-14T12:39:37.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-02-12T11:47:46.000Z (over 6 years ago)
- Last Synced: 2024-08-01T01:30:53.117Z (3 months ago)
- Language: Kotlin
- Size: 127 KB
- Stars: 535
- Watchers: 22
- Forks: 57
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-kotlin-libraries-for-android - Kotlin Dagger Example - Example of Android project showing integration with Kotlin and Dagger 2. (<a name="projects"></a>Projects <sup>[Back ⇈](#contents)</sup> / <a name="franeworks"></a>Frameworks <sup>[Back ⇈](#contents)</sup>)
- awesome-kotlin - kotlin-dagger-example
- awesome-kotlin-android - kotlin-dagger-example - Dagger 2 和 Kotlin 结合例子 🔥🔥🔥 (DEMO / 测试)
README
kotlin-dagger-example
=====================This project demonstrate how to setup an Android Project with Kotlin and Dagger 2.
It's based on Dagger 2 [example](https://github.com/google/dagger/tree/master/examples/android-simple)
##Known issues/limitations
When `lateinit` modifier is used, your variable cannot be used in `init{}` block. It will not compile. So in that case I suggest to move code from that block into a separate function and then call that function from `init{}` block.
##More than Dagger
This sample project includes some more dependencies which are very usefull. It's like a base setup for almost every project using Kotlin.
So you will find there Anko libraries. You can uncomment Anko's DSL libraries if you need them.
There is also a set of Rx dependencies. Rx works really great with Kotlin.
At last but not least there my favourite networking dependencies from Square.