I have a Gradle plugin, which is applied in both settings.gradle[.kts]
and build.gradle[.kts]
, and I’m writing an Intellij plugin to accompany it. I would like to display a warning when the user has an out-of-date version of the Gradle plugin to let them know that not all features of the Intellij utilities will be available.
I depend on org.jetbrains.plugins.gradle
plugin to access the ExternalProject
classes and such, and it provides utility to get project libraries through DataNode<LibraryData>
, however it doesn’t include applied plugins.
Is there a way to get Gradle plugin list for a project?
Unfortunately, this is quite involved.
If you want to extract the data from arbitrary Gradle’s application
plug-in configuration, you will have to implement a pipeline of a Model + org.jetbrains.plugins.gradle.tooling.ModelBuilderService
(works in Daemon) + org.jetbrains.plugins.gradle.service.project.GradleProjectResolverExtension
+ com.intellij.openapi.externalSystem.service.project.manage.AbstractProjectDataService