Work around Gradle 8.1 bug causing Files.readString(Path) to call path.toFile().

This commit is contained in:
modmuss50
2023-04-12 19:56:01 +01:00
parent 75a98a5038
commit 4ff9f726e1

View File

@@ -240,7 +240,7 @@ public class MappingConfiguration {
}
private UnpickMetadata parseUnpickMetadata(Path input) throws IOException {
JsonObject jsonObject = LoomGradlePlugin.GSON.fromJson(Files.readString(input), JsonObject.class);
JsonObject jsonObject = LoomGradlePlugin.GSON.fromJson(Files.readString(input, StandardCharsets.UTF_8), JsonObject.class);
if (!jsonObject.has("version") || jsonObject.get("version").getAsInt() != 1) {
throw new UnsupportedOperationException("Unsupported unpick version");