Paul Krill
Editor at Large

Kotlin 1.8.0 adds recursive copy, delete for directories

news
Jan 12, 20232 mins

Latest upgrade to the Kotlin programming language adds support for Java 19 and introduces experimental functions for the JVM to recursively copy or delete directory content.

Java / coffee
Credit: Robert Shunev

Kotlin 1.8.0, an upgrade to the JetBrains-developed, statically typed language for multiplatform mobile, web, and native development, is now available as a production release. The new version introduces experimental functions for recursively copying or deleting directory content on the JVM.

The standard library in Kotlin 1.8.0 adds new experimental functions for java.nio.file.path that can recursively copy or delete directory content. Experimental functionality also has been added to TimeMarks, allowing elapseNow to read from multiple TimeMarks simultaneously. Opt-in is required for both sets of new functionality. Kotlin 1.8.0 also stabilizes extension functions for working with Optional classes in Java.

Announced as a production release January 11, Kotlin 1.8.0 also adds capabilities such as Gradle 7.3 compatibility but subtracts support of the old JVM back end, with the -Xuse-old-backend compiler option no longer supported. Instructions on updating to Kotlin 1.8.0 can be found at kotlinlang.org.

Other new features and improvements in the Kotlin 1.8.0 beta:

  • Java 19 bytecode is supported for Kotlin/JVM.
  • For Kotlin/JS, the IR (intermediate representation) compiler has been stabilized and set incremental compilation is to be used by default. The old Kotlin/JS back end has been deprecated.
  • For Kotlin Multiplatform, an Android source set layout was added that can be enabled in the Gradle plugin with kotlin.mpp.androidSourceSetLayoutVersion=2. Also, a new naming schema was added for KotlinSourceSet entities.
  • For Kotlin Native, support has been added for the Xcode 14 IDE for Apple development, as well as for the watchosDeviceArm64 target. New annotations are supported to improve Objective-C and Swift language interoperability.

The latest incremental release of Kotlin, Kotlin 1.7.20, arrived in October.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author