Setup of the development environment

Prepare for developing for the IntelliJ AsciiDoc plugin.

Choosing a Java Version and Distribution

Starting with IntelliJ 2022.3, JDK 17 is required to build the plugin, as IntelliJ uses JDK 17. See the JDK 17 announcement in the JetBrains blog for details.

The AsciiDoc plugin uses only language features of Java 11 to allow the built plugin to run with earlier versions of IntelliJ as well.

JetBrains recommends Amazon Corretto JDK for development, but other distributions based on OpenJDK should work as well.

For the Gradle build tool to pick up the Java version, point the environment variable JAVA_HOME to the folder with the JDK:

Setting the environment variable on Linux/MacOS
export JAVA_HOME=...
Setting the environment variable on Windows
JAVA_HOME=c:\workspace\...

Verify the environment

Developers can check their environment using the following command in the root folder of the project:

Linux/MacOS command
./gradlew --version
Windows command
gradlew --version

The output should be similar to:

------------------------------------------------------------
Gradle ...
------------------------------------------------------------

Build time:   ...
Revision:     ...

Kotlin:       ...
Groovy:       ...
Ant:          ...
JVM:          17.0.x (Amazon.com Inc. 17.0....)
OS:           ...