How to create an empty IntelliJ IDEA plugin project?


I want to create a plugin for IntelliJ IDEA. I install the Intellij IDEA 2021.3 and the Oracle OpenJDK 17.0.1.

I try to create an empty plugin project following this instruction. I select the Gradle, then check the IntelliJ Platform Plugin and chois the OpenJDK 17 in the Project SDK list. Then I press next->finish.

The new empty project is opening and after a few seconds I look at the message "my_plugin:test: Could not find org.jetbrains:annotations:22.0.0."

Also I tride to create an empty IDEA plugin project wih the IDEA 2021.3 and the Oracle OpenJDK 15. And with the IDEA 2021.1.3 and the Oracle OpenJDK 15. The result is the same.

Why does the Gradle not creating a project automatically? And how can I create an empty IntelliJ IDEA plugin project correctly?

P.S. Your recommendation (wich last updat is 08 March 2021) says: "To add the library with annotations to a Gradle project, add the compile 'org.jetbrains:annotations:16.0.2' dependency to the build.gradle file". But the answer on StackOverflow (with links to says that "the compile, runtime, testCompile, and testRuntime configurations introduced by the Java plugin have been deprecated since Gradle 4.10 (Aug 27, 2018), and were finally removed in Gradle 7.0 (Apr 9, 2021)"

Is this the reason of my problem? If yes, will you correct your documentation? And what shall I do to solve the problem?


I have tried the Java 11. The result is the same.


Please check Preferences | Build, Execution, Deployment | Build Tools | Gradle setting "Gradle JVM" is also set to Java 11.

Please also check it's using Gradle as defined gradle/wrapper/ which should point to Gradle 7.x


I checked the Gradle JVM. It set to the Java 11 automatically. Also I checked the There is the Gradle-7.1. The problem is still there. Thank you for your really fast answers. But may I ask if you have test the creating an empty plugin project on the freshly installed IntelliJ IDEA 2021.3 ?


Please check VM options for your IDE ( and remove this entry if existing



The Help | Edit Custom VM Options opens the idea64.exe.vmoptions file. In my case its content is:


The idea64.exe.vmoptions file content from the ../bin directory is:


There is no Djsse.enableSNIExtension.


I also replaced the power cable of my desktop and wash my screen with wet wipes. But it does'n help.


Please add this snippet in build.gradle before "intellij { ....}"


repositories {

Thank you very much!! It works!

I wonder why does the modern industry is so awkward? I have tried to use the IDEA 2020.3, and there is an error in the build.gradle file too but different kinde. It seemse than it is't very hard to create a virtual machine with pure OS and a freshly installed new IDEA before release and then try to create base projects such as empty plugins project. I think next step to the hell are non-buildable examples from the help :) I understand that it is not a unique JetBrains feature. It is the problem of all industry. But how did it get to this?


Please sign in to leave a comment.