mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 05:27:43 -05:00
Use last 16 chars for checksum (#1064)
* Fix deprecation warning in Gradle 8.7 (#1056) * use last 16 chars for checksum * hash the path Co-authored-by: Flemmli97 <Flemmli97@users.noreply.github.com>
This commit is contained in:
@@ -96,6 +96,7 @@ public class Checksum {
|
||||
|
||||
public static String projectHash(Project project) {
|
||||
String str = project.getProjectDir().getAbsolutePath() + ":" + project.getPath();
|
||||
return toHex(str.getBytes(StandardCharsets.UTF_8)).substring(0, 16);
|
||||
String hex = sha1Hex(str.getBytes(StandardCharsets.UTF_8));
|
||||
return hex.substring(hex.length() - 16);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user