Fix rebuild bug
This commit is contained in:
parent
bf2cd90acf
commit
73d24bf13f
@ -202,14 +202,22 @@ public class SourcesGenerator {
|
|||||||
new GenUpgraderSuperX(genParams).run();
|
new GenUpgraderSuperX(genParams).run();
|
||||||
|
|
||||||
// Update the hash at the end
|
// Update the hash at the end
|
||||||
Files.writeString(hashPath,
|
var newHashRaw = basePackageName + '\n' + useRecordBuilders + '\n' + deepCheckBeforeCreatingNewEqualInstances + '\n' + curHash + '\n';
|
||||||
basePackageName + '\n' + useRecordBuilders + '\n' + deepCheckBeforeCreatingNewEqualInstances + '\n' + curHash
|
String oldHashRaw;
|
||||||
+ '\n',
|
if (Files.exists(hashPath)) {
|
||||||
StandardCharsets.UTF_8,
|
oldHashRaw = Files.readString(hashPath, StandardCharsets.UTF_8);
|
||||||
TRUNCATE_EXISTING,
|
} else {
|
||||||
WRITE,
|
oldHashRaw = null;
|
||||||
CREATE
|
}
|
||||||
);
|
if (!Objects.equals(newHashRaw, oldHashRaw)) {
|
||||||
|
Files.writeString(hashPath,
|
||||||
|
newHashRaw,
|
||||||
|
StandardCharsets.UTF_8,
|
||||||
|
TRUNCATE_EXISTING,
|
||||||
|
WRITE,
|
||||||
|
CREATE
|
||||||
|
);
|
||||||
|
}
|
||||||
generatedFilesToDelete.remove(outPath.relativize(hashPath));
|
generatedFilesToDelete.remove(outPath.relativize(hashPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user