diff --git a/plugin-gradle/CHANGES.md b/plugin-gradle/CHANGES.md index 325b5edfcb..385140120f 100644 --- a/plugin-gradle/CHANGES.md +++ b/plugin-gradle/CHANGES.md @@ -17,6 +17,9 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( * **BREAKING** `createIndepentApplyTask(String taskName)` now requires that `taskName` does not end with `Apply` * Bump minimum required Gradle from `6.1` to `6.1.1`. +### Removed +* **BREAKING** `removeFormat` (which has been broken since `5.0`) has been removed. Use `clearSteps()` as a workaround ([#653](https://github.com/diffplug/spotless/issues/653)). + ## [5.17.1] - 2021-10-26 ### Changed * Added support and bump Eclipse formatter default versions to `4.21` for `eclipse-groovy`. Change is only applied for JVM 11+. diff --git a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessExtension.java b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessExtension.java index 7959bdc71d..52edf06e66 100644 --- a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessExtension.java +++ b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessExtension.java @@ -182,15 +182,6 @@ public void format(String name, Action closure) { format(name, FormatExtension.class, closure); } - /** Makes it possible to remove a format which was created earlier. */ - public void removeFormat(String name) { - requireNonNull(name); - FormatExtension toRemove = formats.remove(name); - if (toRemove == null) { - project.getLogger().warn("Called removeFormat('" + name + "') but there was no such format."); - } - } - boolean enforceCheck = true; /** Returns {@code true} if Gradle's {@code check} task should run {@code spotlessCheck}; {@code false} otherwise. */