Skip to content

Commit 8433bb6

Browse files
committed
Fix GitVersionValueResult causing configuration cache misses
1 parent b1ae51d commit 8433bb6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

gitversion-gradle/src/main/groovy/net/minecraftforge/gitversion/gradle/GitVersionValueResult.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
package net.minecraftforge.gitversion.gradle;
66

77
import java.io.Serializable;
8+
import java.util.Objects;
89

910
@SuppressWarnings("ClassCanBeRecord") // Gradle hates records -- ctor needs to be public
1011
final class GitVersionValueResult implements Serializable {
@@ -29,4 +30,15 @@ public String errorOutput() {
2930
public Throwable execFailure() {
3031
return this.execFailure;
3132
}
33+
34+
@Override
35+
public boolean equals(Object o) {
36+
return o instanceof GitVersionValueResult that
37+
&& Objects.equals(this.output, that.output);
38+
}
39+
40+
@Override
41+
public int hashCode() {
42+
return Objects.hashCode(output);
43+
}
3244
}

0 commit comments

Comments
 (0)