Navigate to Gradle dependencies programmatically Follow
Answered
Hello,
In our plugin, I need to open the Gradle dependencies programmatically. For example, we use the next source code to open Maven dependencies
val file = mavenProject.getFile
val artifact = mavenProject.findDependencies(group, name).asScala.head
val navigation = MavenNavigationUtil.createNavigatableForDependency(project, file, artifact)
navigation.navigate(true)
Gradle is an external system and I'm trying to understand how to make similar functionality for the Gradle dependencies.
Very grateful for any help!
Best regards,
Alexander.
Please sign in to leave a comment.
Hello Alexandr,
Unfortunately, there is no way to generate such Navigatable automatically with the Gradle plugin.
I'm afraid that you'll have to find proper PsiElement in the Gradle build file by your own - i.e., with