Introduction
The information below should assist in setting up your computer to run samples from class, and allow you to work on your project. Any modern computer should work reasonably well, as long as you have admin rights to install and configure software.
Please install these tools in the following order.
Tool | Version | Required | |
---|---|---|---|
Git | 2.35+ | Yes | Newest version is fine. This is the minimum. |
Java JDK | 17.05 | Yes | Install version 17. Do not install 18 or 19. |
IntelliJ IDEA | 2022.3 | Optional | Newest version is fine. This is the minimum. |
Kotlin | 1.8.x | Optional | Newest version is fine. This is the minimum. |
Gradle | 7.3 | Optional | Max version supported by Kotlin 1.8. |
Git
We use Git for version control, so you will need Git installed to perform operations on your source code.
Git is pre-installed on macOS and Linux; Windows users can install it from https://git-scm.org. Once it’s installed, you may need to update your path to include the Git installation directory. You can check your installation using the git version
command.
❯ git version
git version 2.37.1 (Apple Git-137.1)
Java JDK
We will be building Kotlin applications and services, and using the Java JDK as our target. To ensure that you get the correct version, you should:
- Download and install the version above from Azul or OpenJDK (again, make sure to match your system architecture).
- Add JAVA_HOME to your system’s environment variables, pointing to the installation.
- Update your path to include the directory containing the Java executables.
For example, I have the following lines in my .zshrc
:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-19.jdk/Contents/Home
export PATH=$PATH:$JAVA_HOME/bin
You can check your installation using the java version
command.
❯ java -version
openjdk version "17.0.5" 2022-10-18 LTS
OpenJDK Runtime Environment Zulu17.38+21-CA (build 17.0.5+8-LTS)
OpenJDK 64-Bit Server VM Zulu17.38+21-CA (build 17.0.5+8-LTS, mixed mode, sharing)
IntelliJ IDEA
IntelliJ IDEA is our recommended development environment. You can install it from https://www.jetbrains.com/idea/download/.
You can check the installed version by opening IntelliJ IDEA and looking at the IntelliJ IDEA - About
dialog.
Kotlin
We will need a Kotlin compiler, and the Kotlin standard libraries.
IntelliJ IDEA includes a Kotlin plugin, so if you have installed IntelliJ IDEA and you are working in the IDE, then you do not need to install Kotlin.
However, if you wish to compile from the command-line, or use a different editor, then you will need to install Kotlin manually. It can be installed from https://www.kotlinlang.org or from most package managers (e.g. brew install kotlin
if you are a Mac user with Homebrew installed).
If you install the command-line version, you can check your installation using the kotlin -version
command.
❯ kotlinc -version
info: kotlinc-jvm 1.7.21 (JRE 17.0.5+8-LTS)
Gradle
Kotlin 1.8 only supports up to Gradle 7.3. Use this version of Gradle in your build files to ensure compatibility.