How to add external dependencies to an IntelliJ plugin project?

Hello,

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

Dmitri

5 comments

Hello,

Thanks.

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.country=RU,-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.country=RU,-Duser.language=ru,-Duser.variant]

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



My JVM settings can be found here: http://imgur.com/a/3UFgb

What do I need to change to fix that error?

0

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/gradle.properties`.

1

Hello, Alexander!

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

Is this a problem?

0

No, it's ok, but now I don't know how to help. I found these issues: https://youtrack.jetbrains.com/issue/IDEA-150625 and http://stackoverflow.com/questions/30642954/gradle-in-android-studio-giving-error-project-sync-failed. Maybe workarounds from that topics would be helpful.

0

Please sign in to leave a comment.