Kotlin 1.2.70 is Out!
We’re happy to announce the release of Kotlin 1.2.70, a new bugfix and tooling update for Kotlin 1.2. This release:
- Significantly improves incremental compilation for Kotlin/JS
- Marks a number of
- Contains native binaries built with Excelsior JET for the standalone Kotlin compiler
- Adds new refactorings, inspections, and intentions to the IntelliJ IDEA plugin
- Fixes a lot of known issues in the compiler and the IDE plugin and provides performance improvements
The update is compatible with all versions of IntelliJ IDEA from 2017.3 to 2018.3, as well as with Android Studio 3.1, 3.2 RC, and 3.3 Canary.
We’d like to thank our external contributors whose pull requests were included in this release: Toshiaki Kameyama, Lucas Smaira, Raluca Sauciuc, Denis Vnukov, Jonathan Lermitage, Jake Wharton, gen, Takasy, Bloder, Artem Zinnatullin, Kenji Tomita, Nico Mandery and Juan Chen
The complete list of changes in this release can be found in the changelog. Read on for the highlights.
Incremental compilation improvements for Kotlin/JS
Incremental compilation has been greatly improved for Kotlin/JS. Depending on the project structure, this can speed up development builds up to 7 times and even more. Also, Kotlin/JS Gradle builds now support cross-module incremental compilation.
Note that it is still experimental and disabled by default. To try it, you need to enable it explicitly:
- In a Gradle project, add
Your feedback is welcome, and if you face any issues with Kotlin/JS incremental compilation, please tell us.
Multiplatform projects update
A number of platform-specific annotations were introduced in
kotlin-stdlib-common. They are marked with the
@OptionalExpectation annotation introduced in 1.2.60. The compiler will ignore these annotations on common declarations during compilation of platform modules that have no corresponding actual annotation class.
For example, this allows you to use some JVM-specific annotations such as
Those annotations are
IntelliJ IDEA support improvements
Quick Fix to convert chains of collection functions into sequences
There’s a new inspection with a quick fix for converting a non-lazy collection transformations chain into a sequence equivalent. Using sequences helps avoid unnecessary temporary allocations overhead and, may significantly improve performance of complex processing pipelines:
Other improvements in the IntelliJ IDEA plugin
- Intentions to replace an
?.letand the other way around
- Inspection to detect unnecessary
- Intention to convert a property getter to initializer
- Inspection and quickfix to replace
assertTrue(a == b)with
- “Redundant return label” inspection
- Quick-fix for default parameter value removal
forEachparameter unused” inspection
- Lots of bug fixes and performance improvements
Standalone Kotlin compiler native binaries
In addition to the JVM version of the standalone Kotlin compiler, the Github releases now contain a native, system-dependent version for every major platform (Linux, macOS, and Windows). Those binaries are built with the Excelsior JET AOT compiler and have faster startup times, which is suitable for building small files or scripts.
The Excelsior JET runtime supports some JVM and specific options that you may pass with
-J using the
kotlinc wrapper script. All recognized options may be found in the Excelsior JET documentation.
How to update
To update your IntelliJ IDEA or Android Studio plugin, use Tools | Kotlin | Configure Kotlin Plugin Updates and click the “Check for updates now” button. The Eclipse IDE plugin can be installed or updated via the Eclipse Marketplace (Help | Eclipse Marketplace and search for the Kotlin plugin).
Also, don’t forget to update the compiler and standard library version in your Maven and Gradle build scripts.
Subscribe to Blog updates
Thanks, we've got you!
Kotlin 1.9.0 Released
Kotlin 1.9.0 has been released! Highlights include: Kotlin K2 for JVM is in Beta, other K2 compiler updates, new enum class values function, new operator for open-ended ranges, preview of Gradle configuration cache in Kotlin Multiplatform, changes for Android target support in Kotlin Multiplatform, preview of custom memory allocator in Kotlin/Native. Learn more!
Introducing Kotlin Notebook
The first experimental version of the Kotlin Notebook plugin for IntelliJ IDEA is now available! This post will offer insight into the plugin’s functionality and use cases, but before launching into that, we’d like to let the plugin speak for itself: https://youtu.be/2PLYlDJPelQ W…
Kotlin 1.8.20 Released
Kotlin 1.8.20 has been released! Highlights include: Kotlin K2 compiler updates, AutoCloseable interface and Base64 encoding in stdlib, new JVM incremental compilation enabled by default, new Kotlin/Wasm compiler backend. Learn more!