Kotlin 1.4 reaches release candidate stage

Posted on 28-07-2020 , by: admin , in , 0 Comments

Kotlin 1.4, a major upgrade to the JetBrains-developed statically typed language initially built for the JVM, has reached its release candidate (RC) stage, with improved IDE support and a preview of Node.js API bindings.

The Kotlin 1.4 RC, published July 27, features improvements to IDE support for Gradle Kotlin DSL scripts (*.gradle.kt files) including explicit loading of script configurations, either by clicking Load Gradle Changes or reimporting the Gradle project. Previously, when developers added a new plug-in to the buildscript or plugins block of build.gradle.kts, the new script configuration was loaded automatically in the background, a process that often hindered IDE performance. 

The Kotlin 1.4 RC also adds an action in the IntelliJ Idea 2020.1 IDE, called Load Script Configurations, which loads changes to Gradle script configurations without updating the whole project, thus taking less time. Also for gradle.kts IDE support, better error reporting has been enabled by having the Gradle daemon return all information about errors and showing it in the Build tool window.

The Kotlin 1.4 RC’s preview of bindings for Node.js APIs, kotlinx-nodejs, provides type-safe access to the Node API. Although it was possible to target Node.js previously, the new bindings unlock the full potential of the target.

To try Kotlin, developers can access the Kotlin Playground. Developers using IntelliJ Idea and Android Studio can update the Kotlin Plugin to version 1.4.0-RC by following these instructions. The command line compiler can be downloaded from GitHub.

The Kotlin 1.4 RC follows beta releases of Kotlin 1.4 that brought improvements to the standard library and introduced a more powerful type inference algorithm. Also new in the Kotlin 1.4 RC:

  • Integrations have been improved between Kotlin/JS and NPM dependencies, CSS, and ducat in Gradle.
  • Source sets now have the standard library dependency by default, both for multiplatform projects and projects that target a single platform.
  • For Kotlin/Native, management of CocoaPods dependencies has been simplified. CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects.
  • New functionality is offered to debug coroutines and define deep, recursive functions.
  • Improvements to the Kotlin Gradle plug-in enable developers to write less code in Gradle build files.
  • Starting with Kotlin 1.4, old Gradle plug-ins for targeting JavaScript with Kotlin, kotlin2js and kotlin-dce-js, will be officially deprecated in favor of kotlin.js.