I am using Gradle plugin. In apply function I have added
DependencyResolutionListener , and in
beforeResolve method I am adding for example a dependency to a project:
After that I have iterated over the dependencies for
compile Configuration, and I can see that dependency exists, but I can not see it in External Libraries in IDEA. Also if I manually refresh gradle file, but changing something in
build.gradle, then dependency is there.
Is there a way to programmatically force gradle to refresh dependencies, or maybe a better way to add dependencies as explained above.