final DelayedFile json = delayedFile("{CACHE_DIR}/minecraft/liteloader.json");
{
EtagDownloadTask task = makeTask("getLiteLoaderJson", EtagDownloadTask.class);
task.setUrl("http://dl.liteloader.com/versions/versions.json");
task.setFile(json);
task.setDieWithError(false);
// make sure it happens sometime during the build.
project.getTasks().getByName("setupCIWorkspace").dependsOn(task);
project.getTasks().getByName("setupDevWorkspace").dependsOn(task);
project.getTasks().getByName("setupDecompWorkspace").dependsOn(task);
task.doLast(new Action() {
@Override
public void execute(Object arg0)
{
EtagDownloadTask task = (EtagDownloadTask) arg0;
try
{
readJsonDep(task.getFile());
}
catch (IOException e)
{
Throwables.propagate(e);
}