googlesamples/android-custom-lint-rules

Can't depend on Android classes

chickenbane opened this issue · 1 comments

I want to write a rule for a RecyclerView Adapter (specifically https://issuetracker.google.com/issues/63573979)

However, as this project is a Java project, not an Android project, I am unable to add an Android dependency like: compile "com.android.support:recyclerview-v7:25.3.0"
(This appears to add an aar which won't resolve any classes.)

I tried to depend on the Android Gradle plugin, but that fails to work with the Java plugin and the current task to package a jar.

How can I depend on an Android or Support Library class?