kotfee

Google's Dagger 2 coffee maker example in Kotlin

View the Project on GitHub

kotfee ☕️

Google’s Dagger 2.13 coffee maker example in Kotlin using Gradle (instead of Maven, like in Google’s example).

How-to

Run in IDE

Make sure you run Gradle task kaptKotlin before running directly from your IDE (e.g. IntelliJ IDEA). This task runs Kotlin’s annotation processor and generates stubs that otherwise may not be found by your IDE, resulting in an error.

Run from command line

./gradlew jar # Also runs kaptKotlin before putting it all into a jar
java -jar build/libs/kotfee.jar