days
0
-7
hours
-1
-8
minutes
-2
-7
seconds
-2
-4
search
Time for some Kotlin goodies

Kotlin 1.3.20 brings an extensive list of changes and improvements

Eirini-Eleni Papadopoulou
kotlin
© Shutterstock / niroworld

Don’t let the number fool you! it may be a minor release but it brings some major improvements. From improvements to the compiler and IDE to building multiplatform projects via Gradle Kotlin DSL, Kotlin 1.3.20 features an extensive list of changes. Let’s have a closer look.

A new bugfix and tooling update for Kotlin 1.3 is here with the release of Kotlin 1.3.20.

Even though this is a minor release, it brings tons of improvements and changes so don’t just look past it!

Let’s have a closer look at the most interesting highlights of the new release.

The highlights

Faster Gradle builds by parallelizing tasks – Now runs tasks in parallel within a project. Parallel execution is supported by using the Gradle Worker API. To make use of this, first, make sure that parallel builds are enabled in Gradle (in gradle.properties).

Multiplatform projects update – The work on multiplatform projects continues and the team improves different aspects based on community feedback. Most notably:

  • Support for Kotlin Gradle DSL
  • DSL improvements
  • Android Library (AAR) can be a part of a multiplatform library

Improvements for inline classes – Support for inline classes has been significantly improved, and some constraints have been mitigated. There are also improvements for non-trivial cases.

Kapt improvements – Using Kapt from the command line has been simplified, allowing for direct use as a separate command line tool as opposed to having to use it via the compiler.

IntelliJ IDEA support – This release adds new refactorings, inspections, and intentions to the IntelliJ IDEA plugin. Here are the highlights:

  • Template to generate main without parameters
  • Inspections to improve coroutines code
  • New intention for converting SAM as lambda to an anonymous object
  • String conversion improvements

We also see a couple of changes coming online for Kotlin/Native including:

Code contracts – Contracts functionality is now available in Kotlin/Native.

Better interop – Improved interop including support for more C constructions such as enums with forward declarations, as well as better error reporting for cases of inheritance in Objective-C.

Native frameworks from libraries – You can now produce Apple frameworks not only from source files but also from Kotlin libraries (i.e. .klib files). This is possible using the -Xexport-library command line option or via Gradle plugins.

Performance – Apart from reducing the memory footprint and improving runtime performance, this release also brings compiler optimizations for looping over ranges, making iterations much faster.

Check out the official release notes for all the relevant information and have a look at the changelog for the extensive list of improvements in Kotlin 1.3.20.

SEE ALSO: Kotlin library provides the keys for building interactive web apps

Getting started

If you can’t wait to get started, you need to update your IntelliJ IDEA or Android Studio plugin using  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).

You should also make sure to update the compiler and standard library versions in your Maven and Gradle build scripts.

Author
Eirini-Eleni Papadopoulou
Eirini-Eleni Papadopoulou is an editor for JAXenter.com. Just finished her masters in Modern East Asian Studies and plans to continue with her old hobby that is computer science.

Leave a Reply

Be the First to Comment!

avatar
400
  Subscribe  
Notify of