From daaccc87f21fb38b7250b14a7c16cd116f350bd7 Mon Sep 17 00:00:00 2001 From: Adrian Siekierka Date: Sat, 1 Dec 2018 11:03:25 +0100 Subject: [PATCH] download minecraft libraries through maven --- build.gradle | 1 - .../loom/providers/MinecraftLibraryProvider.java | 14 ++++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index 44e1825..17fd740 100644 --- a/build.gradle +++ b/build.gradle @@ -51,7 +51,6 @@ jar { manifest { attributes 'Implementation-Version': version + " Build(" + build + ")" } - from { zipTree("/home/asie/intellij-fernflower-1.0.0.2.jar") } } task sourcesJar(type: Jar, dependsOn: classes) { diff --git a/src/main/java/net/fabricmc/loom/providers/MinecraftLibraryProvider.java b/src/main/java/net/fabricmc/loom/providers/MinecraftLibraryProvider.java index e7c6f12..54aac9c 100644 --- a/src/main/java/net/fabricmc/loom/providers/MinecraftLibraryProvider.java +++ b/src/main/java/net/fabricmc/loom/providers/MinecraftLibraryProvider.java @@ -58,17 +58,15 @@ public class MinecraftLibraryProvider { for (MinecraftVersionInfo.Library library : versionInfo.libraries) { if (library.allowed() && library.getFile(MINECRAFT_LIBS) != null) { + // TODO: Add custom library locations + // By default, they are all available on all sides - boolean isClientOnly = false; + /* boolean isClientOnly = false; if (library.name.contains("java3d") || library.name.contains("paulscode") || library.name.contains("lwjgl") || library.name.contains("twitch") || library.name.contains("jinput") || library.name.contains("text2speech") || library.name.contains("objc")) { isClientOnly = true; - } - if(!library.getFile(MINECRAFT_LIBS).exists()){ - project.getLogger().lifecycle(":downloading " + library.getURL()); - FileUtils.copyURLToFile(new URL(library.getURL()), library.getFile(MINECRAFT_LIBS)); - } - libs.add(library.getFile(MINECRAFT_LIBS)); - minecraftProvider.addDependency(library.getFile(MINECRAFT_LIBS), project); + } */ + + project.getDependencies().add("compile", project.getDependencies().module(library.getArtifactName())); } }