File tree Expand file tree Collapse file tree 1 file changed +0
-9
lines changed
plugin-gradle/src/main/java/com/diffplug/gradle/spotless Expand file tree Collapse file tree 1 file changed +0
-9
lines changed Original file line number Diff line number Diff line change 16
16
package com .diffplug .gradle .spotless ;
17
17
18
18
import static com .diffplug .gradle .spotless .PluginGradlePreconditions .requireElementsNonNull ;
19
- import static com .diffplug .gradle .spotless .SpotlessPluginRedirect .badSemver ;
20
- import static com .diffplug .gradle .spotless .SpotlessPluginRedirect .badSemverOfGradle ;
21
19
import static java .util .Objects .requireNonNull ;
22
20
23
21
import java .io .File ;
46
44
import org .gradle .api .file .FileCollection ;
47
45
import org .gradle .api .plugins .BasePlugin ;
48
46
import org .gradle .api .tasks .TaskProvider ;
49
- import org .gradle .util .GradleVersion ;
50
47
import org .slf4j .Logger ;
51
48
import org .slf4j .LoggerFactory ;
52
49
@@ -487,12 +484,6 @@ private void readObject(java.io.ObjectInputStream stream) throws java.io.IOExcep
487
484
*/
488
485
public void custom (String name , FormatterFunc formatter ) {
489
486
requireNonNull (formatter , "formatter" );
490
- if (badSemverOfGradle () < badSemver (SpotlessPlugin .VER_GRADLE_minVersionForCustom )) {
491
- throw new GradleException ("The 'custom' method is only available if you are using Gradle "
492
- + SpotlessPlugin .VER_GRADLE_minVersionForCustom
493
- + " or newer, this is "
494
- + GradleVersion .current ().getVersion ());
495
- }
496
487
addStep (FormatterStep .createLazy (name , () -> globalState , SerializedFunction .alwaysReturns (formatter )));
497
488
}
498
489
You can’t perform that action at this time.
0 commit comments