From 60d412a5e7f5557ca2c2b5b856906e164fe9f743 Mon Sep 17 00:00:00 2001 From: Matthew Haughton <3flex@users.noreply.github.com> Date: Tue, 21 Jun 2022 02:18:58 +1000 Subject: [PATCH] Use stable Kotlin compiler frontend (#1506) * Use stable Kotlin compiler frontend Using K2 means library consumers must also update, otherwise they will have errors like " is compiled by the new Kotlin compiler frontend and cannot be loaded by the old compiler" * Update changelog Co-authored-by: paul-dingemans --- CHANGELOG.md | 2 ++ buildSrc/src/main/kotlin/ktlint-kotlin-common.gradle.kts | 7 ------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 561c56918f..c36a0b1352 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ This project adheres to [Semantic Versioning](https://semver.org/). ### Fixed +* Remove experimental flag `-Xuse-k2` as it forces API Consumers to compile their projects with this same flag ([#1506](https://github.com/pinterest/ktlint/issues/1506)). + ### Changed ### Removed diff --git a/buildSrc/src/main/kotlin/ktlint-kotlin-common.gradle.kts b/buildSrc/src/main/kotlin/ktlint-kotlin-common.gradle.kts index 512acbfe8e..f5e1c29b6b 100644 --- a/buildSrc/src/main/kotlin/ktlint-kotlin-common.gradle.kts +++ b/buildSrc/src/main/kotlin/ktlint-kotlin-common.gradle.kts @@ -19,11 +19,4 @@ kotlin { } } -tasks.withType().configureEach { - kotlinOptions { - @Suppress("SuspiciousCollectionReassignment") - freeCompilerArgs += listOf("-Xuse-k2") - } -} - addAdditionalJdkVersionTests()