Skip to content

Commit 73264a8

Browse files
committed
Fix the predeclare case.
1 parent ce19481 commit 73264a8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessExtensionPredeclare.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2021 DiffPlug
2+
* Copyright 2021-2022 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.
@@ -21,6 +21,8 @@
2121
import org.gradle.api.Action;
2222
import org.gradle.api.Project;
2323

24+
import com.diffplug.spotless.LazyForwardingEquality;
25+
2426
public class SpotlessExtensionPredeclare extends SpotlessExtension {
2527
private final SortedMap<String, FormatExtension> toSetup = new TreeMap<>();
2628

@@ -33,6 +35,8 @@ public SpotlessExtensionPredeclare(Project project, GradleProvisioner.Policy pol
3335
lazyAction.execute(formatExtension);
3436
}
3537
getRegisterDependenciesTask().steps.addAll(formatExtension.steps);
38+
// needed to fix Deemon memory leaks (#1194), but this line came from https://github.com/diffplug/spotless/pull/1206
39+
LazyForwardingEquality.unlazy(getRegisterDependenciesTask().steps);
3640
});
3741
});
3842
}

0 commit comments

Comments
 (0)