The official Kotlin compiler from JetBrains, version 2.3.21. Kotlin is a statically typed programming language that targets the JVM, JavaScript, Wasm, and native platforms. The compiler includes support for multiplatform projects, coroutines, and a rich standard library. Released on a frequent cadence with stable releases every few months and previews. Key differentiators include full interoperability with Java, concise syntax, and safety features like null safety and sealed classes. This package provides the command-line compiler (kotlinc) and is also used as a dependency by build tools like Gradle and Maven.
npm install kotlin-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic compilation of a Kotlin source file to a runnable JAR using the command-line compiler.
Enable K1 compiler via -Xuse-k1 compiler flag or update code to be compatible with K2.
Ensure plugin and compiler versions are consistent. Use version catalog or ext.kotlinVersion.
Migrate to Jetpack View Binding or Compose.
Add implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3' (or similar) to build.gradle.
Use tasks.named('compileKotlin', org.jetbrains.kotlin.gradle.tasks.KotlinCompile) { kotlinOptions.jvmTarget = '1.8' }.No dependency data recorded yet.