IntelliJ IDEA

IntelliJ IDEA

Installation

There are two main development environments for Kotlin development: IntelliJ IDEA and Android Studio.

  • IntelliJ IDEA is a polyglot IDE, which can be used for Java, Kotlin, Python and other languages. For desktop development, you can install IntelliJ IDEA and you are set.
  • Android Studio is a fork of IntelliJ IDEA, customized for Android development. The Android Studio installation also includes the Android SDK; Even if you want to use IntelliJ IDEA for everything, it’s still a good idea to install Android Studio for the SDK.

Personally, I prefer to use IntelliJ IDEA for everything. I install Android Studio to get the SDK configured, and then switch to IntelliJ IDEA for coding.

ℹ️
There are two versions of IntelliJ available to you: the Open Source Community edition, and the paid Ultimate version. As a student, you have access to a free educational license for most JetBrains development tools, including IntelliJ IDEA Ultimate. This may be useful for any other development courses too!

Plugins

Your IDE supports a number of plugins that you can install to make your life easier. You can install plugins by opening your IDE, and then going to Settings > Plugins.

We recommend the following plugins:

Software Version
Compose Multiplatform IDE (desktop) 1.7.3
Android (mobile) 251.23744
Markdown 251.23774
Mermaid.js 0.0.25
.ignore 4.5.6

Configuration

There are two types of settings in your IDE.

IDE product settings

  • Changes you make in your editor/IDE preferences, typically in the Settings dialog. Examples: font size, code style, key bindings, etc.
  • Saved in your .idea. directory in your project folder.
  • Normally should NOT be saved to Git, since these represent your personal preferences.

Project settings

  • Settings that affect how your project builds and executes. Examples: JDK version, Gradle settings.
  • Saved in your build.gradle.kts file or other project files.
  • These absolutely SHOULD be saved to Git, since they affect how your project is built.

My Settings

I use IntelliJ IDEA Ultimate. With plugins, I can use it for Python, JS/TS, Markdown, Kotlin and more.

You need to tell IntelliJ how much RAM it is allowed to use; the default is 2 GB, which is low for Android development. I have 24 GB of RAM, so I dedicate 4 GB to IntelliJ IDEA, and it drastically increases performance. Recommended if you can do it!

  • Help > Change Memory Settings > 4096 MB

Next, I set up the environment to maximize my editing window (I prefer hotkeys to toggle windows and navigate).

  • View > Appearance > Compact Mode ON
  • View > Appearance > Toolbar ON
  • View > Appearance > Tool Window Bars OFF
  • View > Appearance > Navigation Bar > In Status Bar

Finally, I install a few extra plugins (Ultimate version):

  • Rainbow Brackets—free
  • Database Tools and SQL
  • Docker

Last Word

We recommend IntelliJ IDEA or Android Studio, but hey, you do you.

Real Programmers
https://xkcd.com/378