You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: gradle-palantir-java-format/src/main/java/com/palantir/javaformat/gradle/spotless/NativePalantirJavaFormatStep.java
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,7 @@ static class State implements Serializable {
46
46
privatestaticfinallongserialVersionUID = 1L;
47
47
48
48
// Kept for state serialization purposes.
49
+
// For more details, see PalantirJavaFormatStep.State#jarSignature
Copy file name to clipboardExpand all lines: gradle-palantir-java-format/src/main/java/com/palantir/javaformat/gradle/spotless/PalantirJavaFormatStep.java
+16-1Lines changed: 16 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,18 @@ static final class State implements Serializable {
49
49
@SuppressWarnings("unused")
50
50
privatefinalStringstepName = NAME;
51
51
52
-
// Kept for state serialization purposes.
52
+
// Spotless' `FormatterStepImpl` implements Java's `Serializable` interface in a weird way:
53
+
// It serializes this `State` class[1].
54
+
//
55
+
// Gradle understands Java's `Serializable`, and uses it to invalidate `@Input`s to tasks.
56
+
//
57
+
// Since FormatterStepImpl is an input to `SpotlessTask`[2], anything serialized as part of this `State`
58
+
// is used for up-to-date checking for the `SpotlessTask`
Copy file name to clipboardExpand all lines: gradle-palantir-java-format/src/test/groovy/com/palantir/javaformat/gradle/PalantirJavaFormatSpotlessPluginTest.groovy
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,10 @@ class PalantirJavaFormatSpotlessPluginTest extends IntegrationTestKitSpec {
0 commit comments