Programatically Update Plugin Version in Gradle Build File

Answered

I'm looking to write an action that updates the version of a framework plugin in the gradle.build or gradle.build.kts file for the user when a newer version is available (which my IntelliJ IDEA plugin monitors for). I was looking through the Gradle Plugin code to see if there was a provided mechanism doing this, but I could not find one.

Is there a provided way to update the version of a plugin or dependency in the Gradle build file? Or do I need to use the PSI framework to find and then edit the declaration in the gradle build file.

0
1 comment

There's experimental API com.intellij.externalSystem.DependencyModifierService, but it does not include plugins (yet).

1

Please sign in to leave a comment.