I'm creating a plugin for IntelliJ and Android Studio. I want my plugin first download a jar to local folder and next adds it as a dependency to opened project (module). For IntelliJ I've created a code for this, but I have a problem with Android Studio projects. What I know is that it uses Gradle for this purposes. Is there any way to connect to current Gradle and add a dependency programmatically from my plugin?
Thanks for help!