Sometimes I need to install a dependency into user project programmatically.
I use the inheritors of JavaProjectModelModifier for that, method addExternalLibraryDependency. In most cases AndroidJavaGradleProjectModelModifier is used for Gradle projects. However, when user disables Android plugin in his project, this modifier can't be used any more.
When IdeaProjectModelModifier is used, it installs the dependency into Idea project model, but does not modify Gradle scripts.
How can I install a dependency into Gradle project with the disabled Android plugin via intellij.openapi?