Follow these steps to add Anko to your project using the Gradle build system:
- The easiest way to set up Anko with Gradle is do it by adding the following lines in your build.gradle file:
compile "org.jetbrains.anko:anko:$anko_version"
- You can replace $anko_version with the latest version of Anko, which is 0.10.1 when this book was written.
- The preceding compile statement will add all available features (including Commons, Layouts, SQLite) into your project at once. If you don't want that, and would prefer adding them separately as needed, here are the compile statements:
- anko-commons: This library contains a lot of helpers for Android SDK for Intents, Dialogs and Toasts, Logging, and Resource and Dimension:
compile ...