Tricky Android

Android tips, tricks and everything I found interesting

  1. 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

  2. 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

  3. 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

  4. 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

  5. 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

  6. Gradle tip #2: understanding syntax

    Part 1 Part 3 In the Part 1 we talked about tasks and different stages of the build lifecycle. But after I published it I realized that before we jump into Gradle specifics it is very important to understand what we are dealing with - understand its syntax and stop…

    on android, gradle