I have a custom linter that is included into the project as follows:
dependencies {
implementation("cz.thorovsky.android.mylint:mylint-lint:1.23")
}
This setup worked fine until I upgraded to Android Studio Dolphin. With Dolphin it does not run the custom lint check even with Code -> Inspect code
. It does not show up in the inspections and it is not found even when specifying its id through Code -> Analyze Code -> Run Inspection by Name
dialog.
After gradle-sync it shows up in the External Libraries and it also works fine when running ./gradlew lint
from console.
I am using Gradle 7.5.1 with AGP 7.1.0-rc01
I've tried including and running other custom linters and they work fine out of the box. I've also tried upgrading Android Studio to Electric Eel 2022.1.1 rc3
, but it did not help either.
I've used a different machine (clean gradle cache, fresh install of android studio and freshly cloned project), but the problem persists. I've also tried using the lintChecks
in gradle, but that did not work either.
Anybody knows what might be happening? Why did it work in previous versions of AS? Why do other linters work out of the box. Why does it work correctly when I run it in console?
Thanks
CodePudding user response:
After going through the steps mentioned in this issue on the google issue tracker: https://issuetracker.google.com/issues/192776762 I've finally managed to make it work again.
The solution was to use android gradle plugin version 8.0.0-alpha10
and running the linter from the console.