What language can I write my Plugin in?

Hi folks,

I'm curious in which languages I can actually write plugins? I found Kotlin and Groovy in the docs. I'm fairly used to Java but not at all to the other two.

Which on is easier to learn/will feel more natural for a Java and mainly web development guy? Are there any advantages/disadvantages in using one over the other despite the languages itself? I mean are there APIs I can't use with Kotlin/Groovy or sth? What would you recommend?

Is there a good reference project using Gradle/Groovy resp. Kotlin? I guess it will be beneficial to have a gradle build, right? 




Hello Christian,

Java is an easier choice. Plugins can be built pretty much from the menu (build project, prepare plugin for deployment).


You should definitely use Gradle, the tooling with the IntelliJ plugin is very nice and IMO is a better workflow than using the IDE commands. You can use that with any JVM language.

You can use whichever JVM language you like. I use a mix of Clojure, Java and Kotlin in Cursive, and the Scala plugin uses Scala. There are now numerous plugins using Kotlin. I wouldn't recommend Groovy for the main plugin because it's slow, but a lot of the IntelliJ platform tests are written in Groovy since it's quite expressive and performance isn't such an issue there.

I recommend taking a look at Kotlin. IMO it's much nicer than Java, and as a Java dev you can be productive in a couple of days, and you'll figure new things out as you go. It's very nice and the tooling is pretty good - not as good as Java but the nicer language helps a lot. I'm using it for all new code that I can't write in Clojure, and migrating my Java code bit by bit as I work on it.


I'd highly recommend to use the provided Gradle support when creating new plugin http://www.jetbrains.org/intellij/sdk/docs/tutorials/build_system.html


is it possible to use Plugin SDK with Idea 2016.1?

for some reason, after upgrading Idea from 15.0.2 to 2016.1 Plugin SDK seems to be broken.


ok, switch to gradle went well. As per Yann's link, 1.3 Add Gradle support to an existing plugin


intellij {
//    version 'IC-14.1.4' //IntelliJ IDEA dependency

I could not guess the version that would work so I commented it out as above


gradle cleanIdea

gradle runIdea did not work but did not seem to be necessary


after these steps was able to add Plugin SDK as before. Plugin SDK home path is Idea installation home.


You can see the versions at https://www.jetbrains.com/intellij-repository/releases - if you do not supply a version it will default to using the latest EAP build. runIdea should work, and will be required if you want to test and debug your plugin. If you're using Gradle with the IntelliJ plugin you do not need a plugin SDK nor does your module have to be a plugin module (in fact, it won't be because it will be created by Gradle).


interesting. I tried to specify version in a few ways but neither worked. Well the latest version is good too.

I am used to plugin SDK and wary of Gradle so will stick to plugin SDK for as long as it works. 

Gradle seems to be good. Configuring Gradle for the first time though is painful without working examples. As with many other rich featured tools, basic tasks are very difficult.

not sure why runIdea failed. I'd tried to run it before updating Plugin SDK configuration. Debugging works though - even without runIdea.



Please sign in to leave a comment.