From 2b4caa10d532307b26f1775ef1292c99278b92ca Mon Sep 17 00:00:00 2001 From: Nacho Lopez Date: Sat, 9 Sep 2023 20:49:11 +0200 Subject: [PATCH] Update ktlint to 1.0.0 Due to the reasons exposed in https://github.com/pinterest/ktlint/pull/2044/, this is not trivial - we need to rewrite the fixes manually or remove them altogether. Not being able to rely on the embedded kotlin compiler plugin for this is less than ideal, I wanted to stay away from ASTNode as much as possible :( TODO: - [x] Fix spotless version - [ ] Fix ViewModelInjection autofix - [ ] Fix PreviewPublic autofix --- build.gradle | 4 +++- gradle/libs.versions.toml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index c4924f6b..c24d1fd5 100644 --- a/build.gradle +++ b/build.gradle @@ -26,7 +26,9 @@ subprojects { spotless { kotlin { target "**/*.kt" - ktlint(libs.versions.ktlint.get()) + // ktlint(libs.versions.ktlint.get()) + ktlint("0.50.0") + licenseHeaderFile rootProject.file('spotless/copyright.txt') } groovyGradle { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 22c58873..d79ae4fa 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] kotlin = "1.9.10" -ktlint = "0.50.0" +ktlint = "1.0.0" detekt = "1.23.1" junit = "5.10.0"