Lightning fast Javascript compiler Kotlin New update


The popular programming language Kotlin from Jetbrains continues to make progress. In the latest update, there is a seven times faster JavaScript compiler and many new features in the Intelli-J integration.

The programming language Kotlin of the Czech software company Jetbrains, which is mainly known for its development environment Intelli-J Idea, gets a new update missed. The new version 1.2.70 has a much faster Javascript compiler on board and makes progress on multiplatform projects. That has also happened:

Javascript compiler up to 7 times faster

The incremental compiler for Kotlin / JS should now be able to complete builds up to seven times faster. Depending on the project structure, the speed can even be exceeded again. Another new feature for Kotlin / JS is the cross-module incremental compilation of the Gradle builds. The latter, however, is still experimental and must be explicitly activated. With Intelli-J Idea, you only have to set a check mark for the new feature in the settings for the Kotlin compiler. For other projects, the new line kotlin.incremental.js=true must be added in one of the two properties files local or gradle .

Also new is a native Kotlin compiler that runs on Windows, Mac and Linux. The version of the platform-dependent compiler was developed with Excelsior Jet and should convince with faster start times. The compiler is especially useful for small files and scripts.

Improvements for multiplatform projects

Since the introduction of the version 1.2 Jetbrains works on the so-called multiplatform projects. Means: You can write Kotlin code for multiple platforms at the same time. So far the Java Virtual Machine (short JVM) and Javascript are supported . Kotlin / Native is to be supplemented in the near future. To realize the feature, Jetbrains uses several modules. One of them includes only platform-independent Kotlin code. In the last version 1.2.60 platform-dependent annotations were added for the module, which must be marked with @OptionalExpectation . This causes the subsequent code to be ignored until the compiler associated with the particular platform can read and understand the section.

For example, the feature allows you to use JVM annotation without javascript compiler issues. The update supports additional annotations. In detail these are: @JsName , @JvmOverloads , @JvmStatic , @JvmName , @JvmMultifileClass , @JvmField , @JvmSuppressWildcards , @JvmWildcard , @Volatile , @Transient , @Strictfp and @Synchronized . Details on the individual functions of the JVM annotation can be found in the associated Kotlin documentation .

Improved support in Intelli-J Idea

Jetbrains has also optimized Kotlin support in their in-house development environment. These include new quick-fix options as well as the usual bug fixes and performance optimizations. In detail, these include the following quick fixes:

  • When converting collections, it may be useful for better performance to convert them into a sequence beforehand
  • Where it makes sense, it is offered to replace a null exam with if with a ?.let and vice versa
  • Removal of unnecessary with statements
  • Further news for the IDE can be found in the Kotlin article


So you come to the update

The update is supported by all Intelli-J-Idea versions from 2017.3 to 2018.3 and Android Studio versions 3.1, 3.2 RC and 3.3 Canary. In order to download Kotlin 1.2.70, you choose the path Tools > Kotlin > Configure Kotlin Plugin Updates in both development environments and use the option Check for Updates now or if the update is displayed directly, just click on the Install button. If you use Eclipse, you have to update the Kotlin plugin from the marketplace. You also need to adjust the version numbers in your Gradle or Maven file.

The complete changes of the update can be viewed here .

Share This:

Powered by FrontNet