android-apt で アノテーションを便利に

このプラグインを追加すると、gradle のソースフォルダとして認識される場所に Butter Knife で生成されるコードが格納されます。
そのため、Butter Knife で生成されたクラスも Lint から見えるようになり、Lint が怒らなくなります。やったー。

Y.A.M の 雑記帳: Butter Knife のフィールドやメソッドが Lint に Unused declaration と言われないようにする方法

JakeWharton commented on Sep 26
If you use the android-apt plugin then Android Studio can see the generated code and the method will not show up as unused.

Lint: Unused resource · Issue #356 · JakeWharton/butterknife

Bitbucket で公開されています.

The android-apt plugin assists in working with annotation processors in combination with Android Studio. It has two purposes:
Allow to configure a compile time only annotation processor as a dependency, not including the artifact in the final APK or library
Set up the source paths so that code that is generated from the annotation processor is correctly picked up by Android Studio.

hvisser / android-apt — Bitbucket

「APT」て何?

Annotation Processing Boilerplate Destruction (Droidcon NYC 2014) // Speaker Deck

Butter Knife 以外にも使えるのか.

わーい.