Skip to content

Commit

Permalink
Merge pull request #629 from diffplug/remove-deprecated
Browse files Browse the repository at this point in the history
Remove all deprecated code which doesn't require deprecations in the plugins
  • Loading branch information
nedtwigg authored Jun 30, 2020
2 parents 8e0a5d5 + 5e3c41c commit 08340a1
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 639 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
* 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)).
* This change also allows the gradle plugin to work with the remote buildcache (fixes [#280](https://github.com/diffplug/spotless/issues/280)).
* **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))
* **BREAKING** Removed all deprecated methods and classes.
* [#629](https://github.com/diffplug/spotless/pull/629) removes the code which wasn't being used in plugin-gradle or plugin-maven.

## [1.34.1] - 2020-06-17
### Changed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016 DiffPlug
* Copyright 2016-2020 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,13 +15,11 @@
*/
package com.diffplug.spotless.extra.groovy;

import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Properties;

import com.diffplug.spotless.FormatterFunc;
import com.diffplug.spotless.FormatterStep;
import com.diffplug.spotless.Provisioner;
import com.diffplug.spotless.extra.EclipseBasedStepBuilder;
import com.diffplug.spotless.extra.EclipseBasedStepBuilder.State;
Expand All @@ -38,21 +36,6 @@ private GrEclipseFormatterStep() {}
private static final String DEFAULT_VERSION = "4.13.0";
private static final String FORMATTER_METHOD = "format";

/** Creates a formatter step using the default version for the given settings file. */
@Deprecated
public static FormatterStep create(Iterable<File> settingsFiles, Provisioner provisioner) {
return create(defaultVersion(), settingsFiles, provisioner);
}

/** Creates a formatter step for the given version and settings file. */
@Deprecated
public static FormatterStep create(String version, Iterable<File> settingsFiles, Provisioner provisioner) {
EclipseBasedStepBuilder builder = createBuilder(provisioner);
builder.setVersion(version);
builder.setPreferences(settingsFiles);
return builder.build();
}

public static String defaultVersion() {
return DEFAULT_VERSION;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016 DiffPlug
* Copyright 2016-2020 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -57,12 +57,6 @@ public Builder runToFix(String runToFix) {
return this;
}

@Deprecated
public Builder isPaddedCell(boolean isPaddedCell) {
System.err.println("PaddedCell is now always on, and cannot be turned off.");
return this;
}

public Builder formatter(Formatter formatter) {
this.formatter = Objects.requireNonNull(formatter);
return this;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016 DiffPlug
* Copyright 2016-2020 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -65,33 +65,6 @@ public static EclipseBasedStepBuilder createCssBuilder(Provisioner provisioner)
return new EclipseBasedStepBuilder(NAME, " - css", provisioner, state -> applyWithoutFile("EclipseCssFormatterStepImpl", state));
}

/**
* Provides default configuration for HTML formatter.
* Method is deprecated. Use {@link EclipseWtpFormatterStep#createBuilder(Provisioner)} instead.
*/
@Deprecated
public static EclipseBasedStepBuilder createHtmlBuilder(Provisioner provisioner) {
return HTML.createBuilder(provisioner);
}

/**
* Provides default configuration for Java Script formatter.
* Method is deprecated. Use {@link EclipseWtpFormatterStep#createBuilder(Provisioner)} instead.
*/
@Deprecated
public static EclipseBasedStepBuilder createJsBuilder(Provisioner provisioner) {
return JS.createBuilder(provisioner);
}

/**
* Provides default configuration for JSON formatter.
* Method is deprecated. Use {@link EclipseWtpFormatterStep#createBuilder(Provisioner)} instead.
*/
@Deprecated
public static EclipseBasedStepBuilder createJsonBuilder(Provisioner provisioner) {
return JSON.createBuilder(provisioner);
}

/**
* Provides default configuration for XML formatter.
* Method is deprecated. Use {@link EclipseWtpFormatterStep#createBuilder(Provisioner)} instead.
Expand Down

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions lib/src/main/java/com/diffplug/spotless/FileSignature.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,6 @@ public final class FileSignature implements Serializable {
private final transient List<File> files;
private final Sig[] signatures;

/** Method has been renamed to {@link FileSignature#signAsSet}.
* In case no sorting and removal of duplicates is required,
* use {@link FileSignature#signAsList} instead.*/
@Deprecated
public static FileSignature from(File... files) throws IOException {
return from(Arrays.asList(files));
}

/** Method has been renamed to {@link FileSignature#signAsSet}.
* In case no sorting and removal of duplicates is required,
* use {@link FileSignature#signAsList} instead.*/
@Deprecated
public static FileSignature from(Iterable<File> files) throws IOException {
return signAsSet(files);
}

/** Creates file signature whereas order of the files remains unchanged. */
public static FileSignature signAsList(File... files) throws IOException {
return signAsList(Arrays.asList(files));
Expand Down
Loading

0 comments on commit 08340a1

Please sign in to comment.