Kotlin Blog Natalia Ukhorskaya Oct 7, 2013

How To Configure Kotlin In Your Project

Article Summary

Natalia Ukhorskaya from JetBrains shows how Kotlin's seamless Java interop makes adoption frictionless. Just create a .kt file and let IntelliJ do the heavy lifting.

This 2013 guide from the Kotlin team walks through configuring Kotlin in existing Java projects. It covers IntelliJ IDEA's automatic configuration notifications and setup options for different compilation targets and build tools.

Key Takeaways

Critical Insight

IntelliJ IDEA automates Kotlin configuration through smart notifications, supporting JVM, JavaScript, Maven, and Gradle setups with minimal manual intervention.

The article reveals a critical gotcha about source root naming that Gradle users need to know before their first Kotlin file.

About This Article

Problem

When installing Kotlin plugin version 0.13.1511 on Windows 7 64-bit systems, developers ran into filename and directory length restrictions. The package tree was too large and exceeded what Windows allowed, which blocked the plugin from installing properly.

Solution

JetBrains released the Kotlin plugin through official repositories with a leaner package structure. They also offered other ways to distribute it for systems that had strict limits on path lengths.

Impact

The plugin now works across different operating systems and IntelliJ IDEA versions. Developers on systems with path length constraints could finally set up Kotlin compilation for JVM bytecode and JavaScript targets without needing workarounds.