What's new in Kotlin plugin 2020.3

This plugin release introduces the following features:

New types of inline refactorings

Cross-language conversion is possible starting with version 2020.3 of the Kotlin plugin. You can now use the inline refactoring actions for Kotlin elements defined in Java.

The Kotlin plugin can inline code from libraries with attached sources. That means you can inline refactor all the Kotlin scope functions: also, let, run, apply, and with.

Also, this release brings refactoring improvements for lambda expressions. Now the IDE analyzes their syntax more thoroughly and formats them correctly.

Structural search and replace

Structural search and replace (SSR) actions are now available for Kotlin. The SSR feature allows you to find and replace code patterns, taking the syntax and semantics of the source code into account.

To start using the feature, open the Structural Search dialog for your .kt file and select one of the templates or create your own.

EditorConfig support

From 2020.3, the Kotlin API has the full support of .editorconfig files for managing code style on a directory level.

Project templates for Jetpack Compose for Desktop

The new experimental Jetpack Compose for Desktop templates are now available in the Kotlin Project Wizard. You can create a project using the following templates:

  • Desktop – a Compose project targeting the desktop JVM platform: Windows, Linux, or macOS.

  • Multiplatform – a Multiplatform Compose project targeting the desktop JVM platform (Windows, Linux, macOS) and Android with shared code in common modules.

Kotlin Project Wizard – Jetpack Compose project

To create a project, select one of the templates while creating a new project and specify the Gradle build system. The Kotlin plugin creates all the configuration files automatically. You can try out this experimental feature by working through Getting Started with Compose for Desktop tutorial.

Read more about Jetpack Compose features in this blog post and look through the examples of Compose applications.

Last modified: 11 February 2021

© 2010–2021 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/docs/whatsnew-plugin-20203.html