Setup of the development environment
Prepare for developing for the IntelliJ AsciiDoc plugin.
Choosing a Java Version and Distribution
Starting with IntelliJ 2024.2, JDK 21 is required to build the plugin, as IntelliJ 2024.2 uses JDK 21. The runtime version of the plugin is still compatible with JDK 17. See the JDK 21 announcement in the JetBrains blog for details.
The AsciiDoc plugin uses only language features of Java 17 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.
Setup Gradle
For the Gradle build tool to pick up the Java version, point the environment variable JAVA_HOME
to the folder with the JDK:
export JAVA_HOME=...
JAVA_HOME=c:\workspace\...
Verify the Gradle environment
Developers can check their environment using the following command in the root folder of the project:
./gradlew --version
gradlew --version
The output should be similar to:
------------------------------------------------------------ Gradle ... ------------------------------------------------------------ Build time: ... Revision: ... Kotlin: ... Groovy: ... Ant: ... JVM: 21.0.x (Amazon.com Inc. 21.0....) OS: ...