kotlin / 1.8 / docs / whatsnew-eap.html

What's new in Kotlin 1.8.0-RC2

Release date: December 20, 2022

The Kotlin 1.8.0-RC2 release is out! Here are some highlights from this release:

IDE support

Kotlin plugins that support 1.8.0-RC2 are available for:

IDE

Supported versions

IntelliJ IDEA

2021.3.x, 2022.1.x, 2022.2.x

Android Studio

Dolphin (213), Electric Eel (221), Flamingo (222)

Kotlin/JVM

  • Removed the old backend. (The -Xuse-old-backend compiler option is no longer supported).

  • Added support for Java 19 bytecode.

Kotlin/Native

  • Added support for Xcode 14.1 and watchosDeviceArm64 target.

  • Added support for new annotations to improve Objective-C and Swift interoperability:

    • @ObjCName

    • @HiddenFromObjC

    • @ShouldRefineInSwift

  • Added improvements to the CocoaPods Gradle plugin so that registered Kotlin frameworks are now dynamically linked by default.

Kotlin/JS

  • Stabilized the IR compiler and set incremental compilation to be used by default.

  • Deprecated the old backend.

  • Added additional reporting options for when yarn.lock is updated during the CI process.

  • Updated the Gradle plugin so that kotlin.js.browser.karma.browsers property can be used to set browser test targets.

Kotlin Multiplatform

  • Added new Android source set layout that can be enabled in Gradle plugin with kotlin.mpp.androidSourceSetLayoutVersion=2.

  • Added new naming schema for KotlinSourceSet entities.

  • Changed the naming scheme of compilation configurations created by the Kotlin Multiplatform Gradle plugin.

Gradle

  • Ensured compatibility with Gradle 7.3.

  • Added the option to disable daemon fallback by using kotlin.daemon.useFallbackStrategy.

  • Exposed available Kotlin compiler options as Gradle lazy properties.

  • Updated minimum supported Gradle version to 6.8.3.

  • Updated minimum supported Android Gradle plugin version to 4.1.3.

Compiler

Updated the Lombok compiler plugin so that it now supports the @Builder annotation.

Standard library

  • Updated the JVM target of the libraries in Kotlin distribution to version 1.8:

    • The contents of the artifacts kotlin-stdlib-jdk7 and kotlin-stdlib-jdk8 have been moved into kotlin-stdlib.

  • Stabilized extension functions for java.util.Optional.

  • Stabilized functions:

    • cbrt()

    • toTimeUnit()

    • toDurationUnit()

  • Added new experimental extension functions for java.nio.file.path that can recursively copy or delete directory content. Opt-in is required (see details below), and you should use them only for evaluation purposes.

  • Added new experimental functionality to TimeMarks, allowing elapsedNow to be read from multiple TimeMarks simultaneously. Opt-in is required (see details below), and you should use them only for evaluation purposes.

How to update to Kotlin 1.8.0-RC2

You can install Kotlin 1.8.0-RC2 in the following ways:

  • If you use the Early Access Preview update channel, the IDE will suggest automatically updating to 1.8.0-RC2 as soon as it becomes available.

  • If you use the Stable update channel, you can change the channel to Early Access Preview at any time by selecting Tools | Kotlin | Configure Kotlin Plugin Updates in your IDE. You'll then be able to install the latest preview release. Check out these instructions for details.

Once you've installed 1.8.0-RC2, don't forget to change the Kotlin version to 1.8.0-RC2 in your build scripts.

Learn more

For more detail about the contents of this release, see our changelog.

Last modified: 10 January 2023

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