Use global Gson object with pretty printing

This commit is contained in:
khanhduytran0 2020-11-17 18:01:20 +07:00
parent 0ca33e4517
commit 54341d7cfe
12 changed files with 88 additions and 220 deletions

View file

@ -266,7 +266,7 @@ public class MinecraftDownloaderTask extends AsyncTask<String, String, Throwable
DownloadUtils.downloadFile(verInfo.assetIndex != null ? verInfo.assetIndex.url : "http://s3.amazonaws.com/Minecraft.Download/indexes/" + versionName + ".json", output);
}
return new Gson().fromJson(Tools.read(output.getAbsolutePath()), JAssets.class);
return Tools.GLOBAL_GSON.fromJson(Tools.read(output.getAbsolutePath()), JAssets.class);
}
public void downloadAsset(JAssetInfo asset, File objectsDir) throws IOException, Throwable {