when do we need to use
annotationProcessor "android.arch.lifecycle:compiler:1.1.1"
AFAIK, that’s only needed if you have lifecycle-related annotations in your code, specifically @OnLifecycleEvent.
Or implementation “android.arch.lifecycle:common-java8:1.1.1” since we are using Java 8?
Same thing. The docs state “If your app uses Java 8, we recommend using this library instead of android.arch.lifecycle:compiler.”