Skip to content

Commit 08340a1

Browse files
authored
Merge pull request #629 from diffplug/remove-deprecated
Remove all deprecated code which doesn't require deprecations in the plugins
2 parents 8e0a5d5 + 5e3c41c commit 08340a1

File tree

20 files changed

+26
-639
lines changed

20 files changed

+26
-639
lines changed

CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
1919
* This change allows the maven plugin to cache classloaders across subprojects when loading config resources from the classpath (fixes [#559](https://github.com/diffplug/spotless/issues/559)).
2020
* This change also allows the gradle plugin to work with the remote buildcache (fixes [#280](https://github.com/diffplug/spotless/issues/280)).
2121
* **BREAKING** Heavy refactor of the `LicenseHeaderStep` public API. Doesn't change internal behavior, but makes implementation of the gradle and maven plugins much easier. ([#628](https://github.com/diffplug/spotless/pull/628))
22+
* **BREAKING** Removed all deprecated methods and classes.
23+
* [#629](https://github.com/diffplug/spotless/pull/629) removes the code which wasn't being used in plugin-gradle or plugin-maven.
2224

2325
## [1.34.1] - 2020-06-17
2426
### Changed

lib-extra/src/main/java/com/diffplug/spotless/extra/groovy/GrEclipseFormatterStep.java

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 DiffPlug
2+
* Copyright 2016-2020 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -15,13 +15,11 @@
1515
*/
1616
package com.diffplug.spotless.extra.groovy;
1717

18-
import java.io.File;
1918
import java.lang.reflect.InvocationTargetException;
2019
import java.lang.reflect.Method;
2120
import java.util.Properties;
2221

2322
import com.diffplug.spotless.FormatterFunc;
24-
import com.diffplug.spotless.FormatterStep;
2523
import com.diffplug.spotless.Provisioner;
2624
import com.diffplug.spotless.extra.EclipseBasedStepBuilder;
2725
import com.diffplug.spotless.extra.EclipseBasedStepBuilder.State;
@@ -38,21 +36,6 @@ private GrEclipseFormatterStep() {}
3836
private static final String DEFAULT_VERSION = "4.13.0";
3937
private static final String FORMATTER_METHOD = "format";
4038

41-
/** Creates a formatter step using the default version for the given settings file. */
42-
@Deprecated
43-
public static FormatterStep create(Iterable<File> settingsFiles, Provisioner provisioner) {
44-
return create(defaultVersion(), settingsFiles, provisioner);
45-
}
46-
47-
/** Creates a formatter step for the given version and settings file. */
48-
@Deprecated
49-
public static FormatterStep create(String version, Iterable<File> settingsFiles, Provisioner provisioner) {
50-
EclipseBasedStepBuilder builder = createBuilder(provisioner);
51-
builder.setVersion(version);
52-
builder.setPreferences(settingsFiles);
53-
return builder.build();
54-
}
55-
5639
public static String defaultVersion() {
5740
return DEFAULT_VERSION;
5841
}

lib-extra/src/main/java/com/diffplug/spotless/extra/integration/DiffMessageFormatter.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 DiffPlug
2+
* Copyright 2016-2020 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -57,12 +57,6 @@ public Builder runToFix(String runToFix) {
5757
return this;
5858
}
5959

60-
@Deprecated
61-
public Builder isPaddedCell(boolean isPaddedCell) {
62-
System.err.println("PaddedCell is now always on, and cannot be turned off.");
63-
return this;
64-
}
65-
6660
public Builder formatter(Formatter formatter) {
6761
this.formatter = Objects.requireNonNull(formatter);
6862
return this;

lib-extra/src/main/java/com/diffplug/spotless/extra/java/EclipseFormatterStep.java

Lines changed: 0 additions & 73 deletions
This file was deleted.

lib-extra/src/main/java/com/diffplug/spotless/extra/wtp/EclipseWtpFormatterStep.java

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 DiffPlug
2+
* Copyright 2016-2020 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -65,33 +65,6 @@ public static EclipseBasedStepBuilder createCssBuilder(Provisioner provisioner)
6565
return new EclipseBasedStepBuilder(NAME, " - css", provisioner, state -> applyWithoutFile("EclipseCssFormatterStepImpl", state));
6666
}
6767

68-
/**
69-
* Provides default configuration for HTML formatter.
70-
* Method is deprecated. Use {@link EclipseWtpFormatterStep#createBuilder(Provisioner)} instead.
71-
*/
72-
@Deprecated
73-
public static EclipseBasedStepBuilder createHtmlBuilder(Provisioner provisioner) {
74-
return HTML.createBuilder(provisioner);
75-
}
76-
77-
/**
78-
* Provides default configuration for Java Script formatter.
79-
* Method is deprecated. Use {@link EclipseWtpFormatterStep#createBuilder(Provisioner)} instead.
80-
*/
81-
@Deprecated
82-
public static EclipseBasedStepBuilder createJsBuilder(Provisioner provisioner) {
83-
return JS.createBuilder(provisioner);
84-
}
85-
86-
/**
87-
* Provides default configuration for JSON formatter.
88-
* Method is deprecated. Use {@link EclipseWtpFormatterStep#createBuilder(Provisioner)} instead.
89-
*/
90-
@Deprecated
91-
public static EclipseBasedStepBuilder createJsonBuilder(Provisioner provisioner) {
92-
return JSON.createBuilder(provisioner);
93-
}
94-
9568
/**
9669
* Provides default configuration for XML formatter.
9770
* Method is deprecated. Use {@link EclipseWtpFormatterStep#createBuilder(Provisioner)} instead.

lib-extra/src/test/java/com/diffplug/spotless/extra/groovy/DeprecatedGrEclipseFormatterStepTest.java

Lines changed: 0 additions & 90 deletions
This file was deleted.

lib-extra/src/test/java/com/diffplug/spotless/extra/java/EclipseFormatterStepTest.java

Lines changed: 0 additions & 77 deletions
This file was deleted.

lib/src/main/java/com/diffplug/spotless/FileSignature.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,6 @@ public final class FileSignature implements Serializable {
4747
private final transient List<File> files;
4848
private final Sig[] signatures;
4949

50-
/** Method has been renamed to {@link FileSignature#signAsSet}.
51-
* In case no sorting and removal of duplicates is required,
52-
* use {@link FileSignature#signAsList} instead.*/
53-
@Deprecated
54-
public static FileSignature from(File... files) throws IOException {
55-
return from(Arrays.asList(files));
56-
}
57-
58-
/** Method has been renamed to {@link FileSignature#signAsSet}.
59-
* In case no sorting and removal of duplicates is required,
60-
* use {@link FileSignature#signAsList} instead.*/
61-
@Deprecated
62-
public static FileSignature from(Iterable<File> files) throws IOException {
63-
return signAsSet(files);
64-
}
65-
6650
/** Creates file signature whereas order of the files remains unchanged. */
6751
public static FileSignature signAsList(File... files) throws IOException {
6852
return signAsList(Arrays.asList(files));

0 commit comments

Comments
 (0)