diff --git a/.github/renovate.json5 b/.github/renovate.json5 index ef44cb00f9..f94cb27814 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -3,13 +3,4 @@ "extends": [ "config:recommended", ], - "packageRules": [ - { - "groupName": "Ktlint", - "enabled": false, - "matchPackageNames": [ - "/com.pinterest.ktlint:*/", - ] - } - ] } diff --git a/CHANGES.md b/CHANGES.md index f25afca80e..38af879390 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -15,6 +15,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( * Bump JGit from `6.10.1` to `7.3.0` ([#2257](https://github.com/diffplug/spotless/pull/2257)) * Adds support for worktrees (fixes [#1765](https://github.com/diffplug/spotless/issues/1765)) * Bump default `google-java-format` version to latest `1.24.0` -> `1.28.0`. ([#2345](https://github.com/diffplug/spotless/pull/2345)) +* Bump default `ktlint` version to latest `1.5.0` -> `1.7.1`. ([#2555](https://github.com/diffplug/spotless/pull/2555)) ## [3.3.1] - 2025-07-21 ### Fixed diff --git a/lib/src/main/java/com/diffplug/spotless/kotlin/KtLintStep.java b/lib/src/main/java/com/diffplug/spotless/kotlin/KtLintStep.java index 2d0929f60e..90f73d062c 100644 --- a/lib/src/main/java/com/diffplug/spotless/kotlin/KtLintStep.java +++ b/lib/src/main/java/com/diffplug/spotless/kotlin/KtLintStep.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 DiffPlug + * Copyright 2016-2025 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,14 +36,13 @@ /** Wraps up ktlint as a FormatterStep. */ public class KtLintStep implements Serializable { private static final long serialVersionUID = 1L; - private static final String DEFAULT_VERSION = "1.5.0"; + private static final String DEFAULT_VERSION = "1.7.1"; private static final String NAME = "ktlint"; private static final String MAVEN_COORDINATE_0_DOT = "com.pinterest:ktlint:"; private static final String MAVEN_COORDINATE_1_DOT = "com.pinterest.ktlint:ktlint-cli:"; private final JarState.Promised jarState; - @Nullable - private final FileSignature.Promised config; + @Nullable private final FileSignature.Promised config; private final Map editorConfigOverride; private final String version; @@ -95,8 +94,7 @@ private static final class State implements Serializable { private final JarState jarState; private final TreeMap editorConfigOverride; private final String version; - @Nullable - private final FileSignature editorConfigPath; + @Nullable private final FileSignature editorConfigPath; State(String version, JarState jarState, diff --git a/plugin-gradle/CHANGES.md b/plugin-gradle/CHANGES.md index 8fa7012e0d..2ea1692952 100644 --- a/plugin-gradle/CHANGES.md +++ b/plugin-gradle/CHANGES.md @@ -8,6 +8,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( * Bump JGit from `6.10.1` to `7.3.0` ([#2257](https://github.com/diffplug/spotless/pull/2257)) * Adds support for worktrees (fixes [#1765](https://github.com/diffplug/spotless/issues/1765)) * Bump default `google-java-format` version to latest `1.24.0` -> `1.28.0`. ([#2345](https://github.com/diffplug/spotless/pull/2345)) +* Bump default `ktlint` version to latest `1.5.0` -> `1.7.1`. ([#2555](https://github.com/diffplug/spotless/pull/2555)) ## [7.2.1] - 2025-07-21 ### Fixed diff --git a/plugin-gradle/README.md b/plugin-gradle/README.md index fdefbe9a72..9b5cd2d352 100644 --- a/plugin-gradle/README.md +++ b/plugin-gradle/README.md @@ -548,7 +548,7 @@ spotless { ) .customRuleSets( listOf( - "io.nlopez.compose.rules:ktlint:0.4.16" + "io.nlopez.compose.rules:ktlint:0.4.25" ) ) } diff --git a/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/KotlinExtensionTest.java b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/KotlinExtensionTest.java index a32ef06acd..2132ac11e4 100644 --- a/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/KotlinExtensionTest.java +++ b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/KotlinExtensionTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 DiffPlug + * Copyright 2016-2025 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -178,7 +178,7 @@ void withCustomRuleSetApply() throws IOException { " kotlin {", " ktlint(\"1.0.1\")", " .customRuleSets(listOf(", - " \"io.nlopez.compose.rules:ktlint:0.4.16\"", + " \"io.nlopez.compose.rules:ktlint:0.4.25\"", " ))", " .editorConfigOverride(mapOf(", " \"ktlint_function_naming_ignore_when_annotated_with\" to \"Composable\"", diff --git a/plugin-maven/CHANGES.md b/plugin-maven/CHANGES.md index 1803169e8a..f6f6bd14fa 100644 --- a/plugin-maven/CHANGES.md +++ b/plugin-maven/CHANGES.md @@ -8,6 +8,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( * Bump JGit from `6.10.1` to `7.3.0` ([#2257](https://github.com/diffplug/spotless/pull/2257)) * Adds support for worktrees (fixes [#1765](https://github.com/diffplug/spotless/issues/1765)) * Bump default `google-java-format` version to latest `1.24.0` -> `1.28.0`. ([#2345](https://github.com/diffplug/spotless/pull/2345)) +* Bump default `ktlint` version to latest `1.5.0` -> `1.7.1`. ([#2555](https://github.com/diffplug/spotless/pull/2555)) ## [2.46.1] - 2025-07-21 ### Fixed diff --git a/plugin-maven/README.md b/plugin-maven/README.md index f6a1a73c26..05903b7540 100644 --- a/plugin-maven/README.md +++ b/plugin-maven/README.md @@ -499,7 +499,7 @@ Additionally, `editorConfigOverride` options will override what's supplied in `. intellij_idea - io.nlopez.compose.rules:ktlint:0.4.16 + io.nlopez.compose.rules:ktlint:0.4.25 ``` diff --git a/plugin-maven/src/test/java/com/diffplug/spotless/maven/kotlin/KtlintTest.java b/plugin-maven/src/test/java/com/diffplug/spotless/maven/kotlin/KtlintTest.java index 0c67143146..2e4eaee791 100644 --- a/plugin-maven/src/test/java/com/diffplug/spotless/maven/kotlin/KtlintTest.java +++ b/plugin-maven/src/test/java/com/diffplug/spotless/maven/kotlin/KtlintTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 DiffPlug + * Copyright 2016-2025 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -80,7 +80,7 @@ void testSetEditorConfigCanOverrideEditorConfigFile() throws Exception { void testWithCustomRuleSetApply() throws Exception { writePomWithKotlinSteps("\n" + " \n" + - " io.nlopez.compose.rules:ktlint:0.4.16\n" + + " io.nlopez.compose.rules:ktlint:0.4.25\n" + " \n" + " \n" + " Composable\n" +