I noticed that my plugin become incompatible from build 252.x because the org.jetbrains.plugins.gradle.dependency.updater
is no longer resolved. For me, it looks like it is no longer a bundled plugin, which makes very limited sense.
What happened to the dependency updater, and what is the migration path?
We use:
- Platform Version: IC, 2023.3.8
- org.jetbrains.intellij.platform:2.2.1
- no custom pinned versions
And we are compatible from 233 to 251.
Hi, it became a sub-module of Gradle for Java
plugin intellij-community/plugins/gradle/gradle-dependency-updater/resources/intellij.gradle.dependencyUpdater.xml at master · JetBrains/intellij-community · GitHub
Probably you can still depend on it via:
<dependencies>
<module name="intellij.gradle.dependencyUpdater"/>
</dependencies>
ID of plugin for build classpath - org.jetbrains.plugins.gradle
I’d also recommend using com.intellij.externalSystem.ExternalDependencyModificator
and get GradleDependencyModificator
indirectly from com.intellij.externalSystem.ExternalDependencyModificator#EP_NAME
instead of depending on this module, it never meant to be used as API.
Hi, thanks alot it is compatible again, but now we have a logical problem. I get two instances when calling com.intellij.externalSystem.ExternalDependencyModificator#EP_NAME.getInstances(project)
one for gradle one for maven. How do I determine the correct one, efficient?
Either there is a hidden mechanism I was unable to find, or I have to determine it based on the module/project configuration, I suspect.
And another small question, which module is to use if the File which needs the dependency is a scratch file?
Here is how you can determine if GRADLE is used for a Module
.
String externalSystemId = ExternalSystemModulePropertyManager.getInstance(module)
.getExternalSystemId();
And you ask ExternalDependencyModificator.supports(Module)
to know which provider supports it.
and what is the correct module for a scracht file?
I have no idea, but it is also incorrect way of using scratch files. They are considered fully independent
It looks different in the documentation Scratch files | IntelliJ IDEA Documentation. What’s described here is precisely our use case for scratch files.
Our plugin generates an OpenRewrite imperative recipes based on a selection. These recipes are not intended to be part of the code base under development but live next to it for a period of time. Because most productive code bases have no dependency to OpenRewrite we have to add the dependency on the fly.
Because it’s documented how to archive this manually, I wonder if there is a way to do it manually.