dagger android 支持 proguard 规则

dagger android support proguard rules

我正在使用 Dagger2 android-support 库和 Proguard 但我无法编译我的项目,因为此错误:

Warning:dagger.android.AndroidInjector: can't find referenced class com.google.errorprone.annotations.DoNotMock
Warning:dagger.android.AndroidInjector$Builder: can't find referenced class com.google.errorprone.annotations.DoNotMock
Warning:dagger.android.AndroidInjector$Factory: can't find referenced class com.google.errorprone.annotations.DoNotMock
Warning:dagger.android.DaggerApplication: can't find referenced class com.google.errorprone.annotations.ForOverride
Warning:dagger.android.DispatchingAndroidInjector: can't find referenced class com.google.errorprone.annotations.CanIgnoreReturnValue
Warning:there were 5 unresolved references to classes or interfaces.

我使用的 Dagger 版本是 2.11

问题是我应该为 Dagger2 android-支持库使用什么 Proguard 规则?

应该是:

-keep class com.google.errorprone.annotations.** { *; }

更新: 大概只有下面的规则就够了,不需要添加前面的规则。

-dontwarn com.google.errorprone.annotations.**