This commit is contained in:
huangyuhui
2017-02-19 16:30:27 +08:00
parent fa5ff14ff1
commit 445367532a
18 changed files with 86 additions and 151 deletions

View File

@@ -16,18 +16,10 @@
* along with this program. If not, see {http://www.gnu.org/licenses/}.
*/
buildscript {
repositories {
mavenCentral();
dependencies {
classpath 'me.tatarka:gradle-retrolambda:3.1.0'
}
}
plugins {
id "me.tatarka.retrolambda" version "3.5.0"
}
apply plugin: 'me.tatarka.retrolambda'
if (System.getenv("BUILD_NUMBER") != null)
version = System.getenv("BUILD_NUMBER")

View File

@@ -56,7 +56,7 @@ public final class MinecraftInstallerService extends IMinecraftInstallerService
@Override
public Task downloadForge(String installId, InstallerVersion v) {
File filepath = new File("forge-installer.jar");
File filepath = new File("forge-installer.jar").getAbsoluteFile();
if (v.installer == null)
return null;
else
@@ -67,7 +67,7 @@ public final class MinecraftInstallerService extends IMinecraftInstallerService
@Override
public Task downloadOptiFine(String installId, InstallerVersion v) {
File filepath = new File("optifine-installer.jar");
File filepath = new File("optifine-installer.jar").getAbsoluteFile();
if (v.installer == null)
return null;
OptiFineDownloadFormatter task = new OptiFineDownloadFormatter(v.installer);
@@ -80,7 +80,7 @@ public final class MinecraftInstallerService extends IMinecraftInstallerService
public Task downloadLiteLoader(String installId, InstallerVersion v) {
if (!(v instanceof LiteLoaderInstallerVersion))
throw new Error("Download lite loader but the version is not ll's.");
File filepath = new File("liteloader-universal.jar");
File filepath = new File("liteloader-universal.jar").getAbsoluteFile();
FileDownloadTask task = (FileDownloadTask) new FileDownloadTask(v.universal, filepath).setTag("LiteLoader");
return task.with(new LiteLoaderInstaller(service, installId, (LiteLoaderInstallerVersion) v).registerPreviousResult(task))
.with(new DeleteFileTask(filepath));