Tricky Android

Android tips, tricks and everything I found interesting

  1. Android resources and attributes cheatsheet

    Few days ago I stumbled upon one of my early-Android-dev-days cheatsheet I created for understanding different syntax when dealing with Android resources and theme attributes. Surprisingly, I found it quite useful now, so I decided to make it more blogpost-ready and share with others. Just so you understand what I…

    on android, style

  2. Using Mockito with Kotlin

    Warning After I published this article (thanks to all people who provided their feedback), I realized that approach I suggested is less than ideal and doesn't really solve anything - see updates at the bottom of the article. I will still keep it published though, so other people can learn…

    on testing, android, kotlin, mockito

  3. Android Test tricks - Sharing code between UI & unit tests

    In this series of posts I would like to share some useful tricks I learned over the last few years related to testing on Android. The first trick will be really short Sharing code between unit tests and integration tests At the moment the most common Android testing layout includes…

    on android, gradle, testing

  4. The dark side of Jack and Jill

    Last year Google released new toolchain - Jack (Java Android Compiler Kit) and Jill (Jack Intermediate Library Linker) which is intended to replace existing javac + dx pipeline. In this article I will try to gather my thoughts and concerns regarding this new toolchain. But before I start digging deeper into…

    on android, gradle, jack, jill, build

  5. Gradle tip #4: Log unit test execution events into console

    Today's tip will be really short (but hopefully useful). I personally run Android unit tests manually from command line really often (./gradlew test) - just a habit I believe. However, by default, gradle just silently runs unit test suite w/o communicating progress. Essentially it just fails if some of…

    on android, gradle, protip, tasks

  6. Gradle tip #3: Tasks ordering

    Part 1 Part 2 I noticed that the quite often problem I face when I work with Gradle - is tasks ordering (either existing or my custom ones). Apparently my build works better when my tasks are executed at the right moment of the build process :) So let's dig deeper…

    on android, gradle, tasks