How to inspect build.grade

Hi,

I'm trying to build a plugin for AndroidStudio that will inspect the dependencies in build.gradle file.
The results will be highlighted and shown message if mouse hover.
Like this one:
ec4288068b9261e62c00e9ea61bb60b2.png
For *.java file I found that I can do inspect by extending "BaseJavaLocalInspectionTool" class.
However I could not find the alternative class for Gradle files...

Can someone point me in the right direction for this functionality ?

Thank you !

2 comments
Comment actions Permalink

You can use org.jetbrains.plugins.groovy.codeInspection.GroovySuppressableInspectionTool (need to add groovy-plugin JARs to your IntelliJ Platform SDK).
Make sure to check current is actually a .gradle file to avoid inspecting .groovy files (see org.jetbrains.plugins.gradle.codeInspection.MultipleRepositoryUrlsInspection for sample)

0
Comment actions Permalink

Thank you very much !

0

Please sign in to leave a comment.