Calling gradle sync from Idea plugin programmatically
Answered
Hi
Our plugin overwrites some gradle files, e.g. sets non-default build variants.
How to programmatically call gradle sync from plugin so that the user does not need to manually click on this yellow banner
Unfortunately http://stackoverflow.com/q/28185682 does not help in my case.
Thank you
Please sign in to leave a comment.
For me
worked perfectly fine for Android Studio and it perfectly suits my purpose.
also worked somehow even with the Idea, but it updated the build variants only when I clicked on these to change.
Спасибо!
You can try the following api: com.intellij.openapi.externalSystem.util.ExternalSystemUtil#refreshProject
Vladislav Soroka: In latest APIs GradleConstants is not present. Can you share updated snippet please?
org.jetbrains.plugins.gradle.util.GradleConstants is part of Gradle plugin