How to add external dependencies to an IntelliJ plugin project?


I'm creating an IntelliJ Idea custom plugin for the first time and I want to re-use some code in it, which is located in external dependencies, i. e. my local Maven repository.

How can I attach those libraries to the plugin project?

Thanks in advance





When I try to run the application as explained in the tutorial, I get this error:

17:27:16: Executing external task 'runIdea'...

The newly created daemon process has a different context than expected.
It won't be possible to reconnect to this daemon. Context mismatch:
Java home is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.1\jre,daemonRegistryDir=C:\Users\pisarenko\.gradle\daemon,pid=null,idleTimeout=null,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1251,,-Duser.language=ru,-Duser.variant]
Actual: DefaultDaemonContext[uid=08be58d2-627a-4355-a847-6e7db73c63b8,javaHome=C:\Program Files\Java\jre1.8.0_66,daemonRegistryDir=C:\Users\pisarenko\.gradle\daemon,pid=7536,idleTimeout=60000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1251,,-Duser.language=ru,-Duser.variant]

17:27:17: External task execution finished 'runIdea'.

My JVM settings can be found here:

What do I need to change to fix that error?


Hi Dmitri,

I don't think this error message is related to gradle-intellij-plugin or IDEA project configuration, looks like it's problem of gradle itself. Please check your daemon settings at `~/.gradle/`.


Hello, Alexander!

I don't see in C:\Users\pisarenko\.gradle.

Is this a problem?


No, it's ok, but now I don't know how to help. I found these issues: and Maybe workarounds from that topics would be helpful.


Please sign in to leave a comment.