File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
plugin-gradle/src/main/java/com/diffplug/gradle/spotless Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 18
18
import static com .diffplug .gradle .spotless .PluginGradlePreconditions .requireElementsNonNull ;
19
19
20
20
import java .util .ArrayList ;
21
- import java .util .HashMap ;
22
21
import java .util .List ;
23
22
import java .util .Map ;
24
23
import java .util .Objects ;
24
+ import java .util .TreeMap ;
25
25
26
26
import javax .inject .Inject ;
27
27
@@ -38,11 +38,7 @@ public class FreshMarkExtension extends FormatExtension {
38
38
@ Inject
39
39
public FreshMarkExtension (SpotlessExtension spotless ) {
40
40
super (spotless );
41
- Map <String , Object > map = new HashMap <>();
42
- for (Action <Map <String , Object >> action : propertyActions ) {
43
- action .execute (map );
44
- }
45
- addStep (FreshMarkStep .create (map , provisioner ()));
41
+ addStep (FreshMarkStep .create (Map .of (), provisioner ()));
46
42
}
47
43
48
44
public void properties (Action <Map <String , Object >> action ) {
@@ -65,6 +61,10 @@ protected void setupTask(SpotlessTask task) {
65
61
if (target == null ) {
66
62
throw noDefaultTargetException ();
67
63
}
64
+ // replace the step
65
+ TreeMap <String , Object > props = new TreeMap <>();
66
+ propertyActions .forEach (action -> action .execute (props ));
67
+ replaceStep (FreshMarkStep .create (props , provisioner ()));
68
68
super .setupTask (task );
69
69
}
70
70
}
You can’t perform that action at this time.
0 commit comments