Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Road to ~100% Kotlin Android

Road to ~100% Kotlin Android

Friday Talk by Codigo

Nyi Nyi Zaw

October 18, 2019
Tweet

More Decks by Nyi Nyi Zaw

Other Decks in Technology

Transcript

  1. Anko • Anko is a Kotlin library which makes Android

    application development faster and easier. It makes your code clean and easy to read, and lets you forget about rough edges of the Android SDK for Java. • What consist of : ◦ Anko Commons: a lightweight library full of helpers for intents, dialogs, logging and so on; ◦ Anko Layouts: a fast and type-safe way to write dynamic Android layouts; ◦ Anko SQLite: a query DSL and parser collection for Android SQLite; ◦ Anko Coroutines: utilities based on the kotlinx.coroutines library.
  2. Add dependencies plugs in all available features (including Commons, Layouts,

    SQLite) If you only need some of the features, you can reference any of Anko's parts:
  3. Groovy to Kotlin DSL Why? • Very poor IDE assistant

    when writing a Groovy DSL script • Performance issues* • Errors at build runtime instead of compile time • Painful build script debugging experience • Refactoring is a pain in
  4. Preparation • The right (and the latest) IDE • Update

    to Gradle Wrapper 5.0 or higher (Android Gradle Plugin 3.4+) • Update all your Gradle plugins • Stop Gradle auto-sync (optional) • Fix ALL String quotes • Rename file (setting.gradle, app module build gradle, project module build gradle)